MCPcopy Create free account
hub / github.com/LMMS/lmms / initNote

Method initNote

plugins/lb302/lb302.cpp:672–715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

670 */
671
672void lb302Synth::initNote( lb302Note *n)
673{
674 catch_decay = 0;
675
676 vco_inc = n->vco_inc;
677
678 // Always reset vca on non-dead notes, and
679 // Only reset vca on decaying(decayed) and never-played
680 if(n->dead == 0 || (vca_mode==1 || vca_mode==3)) {
681 //printf(" good\n");
682 sample_cnt = 0;
683 vca_mode = 0;
684 // LB303:
685 //vca_a = 0;
686 }
687 else {
688 vca_mode = 2;
689 }
690
691 initSlide();
692
693 // Slide-from note, save inc for next note
694 if (slideToggle.value()) {
695 vco_slideinc = vco_inc; // May need to equal vco_slidebase+vco_slide if last note slid
696 }
697
698
699 recalcFilter();
700
701 if(n->dead ==0){
702 // Swap next two blocks??
703#if QT_VERSION >= 0x050000
704 vcf.load()->playNote();
705#else
706 vcf->playNote();
707#endif
708 // Ensure envelope is recalculated
709 vcf_envpos = ENVINC;
710
711 // Double Check
712 //vca_mode = 0;
713 //vca_a = 0.0;
714 }
715}
716
717
718void lb302Synth::initSlide()

Callers

nothing calls this directly

Calls 3

loadMethod · 0.80
valueMethod · 0.45
playNoteMethod · 0.45

Tested by

no test coverage detected