MCPcopy Create free account
hub / github.com/BambooTracker/BambooTracker / executeRhythmStepEvents

Method executeRhythmStepEvents

BambooTracker/playback.cpp:597–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595}
596
597void PlaybackManager::executeRhythmStepEvents(const Step& step, int ch, bool calledByNoteDelay)
598{
599 if (!calledByNoteDelay && !step.isEmptyNote()) clearRhythmDelayBeyondStepCounts(ch); // Except no key event
600
601 // Set volume
602 int vol = step.getVolume();
603 if (step.hasVolume() && vol < bt_defs::NSTEP_RHYTHM_VOLUME) {
604 opnaCtrl_->setVolumeRhythm(ch, vol);
605 }
606
607 // Set effect
608 executeStoredEffectsRhythm(ch);
609
610 // Set key
611 switch (step.getNoteNumber()) {
612 case Step::NOTE_NONE:
613 if (!calledByNoteDelay) {
614 // When this is called by note delay, skip delay check because it has already checked.
615 checkRhythmDelayEventsInTick(step, ch);
616 }
617 opnaCtrl_->tickEvent(SoundSource::RHYTHM, ch);
618 break;
619 case Step::NOTE_KEY_OFF:
620 case Step::NOTE_KEY_CUT:
621 opnaCtrl_->setKeyOffFlagRhythm(ch);
622 break;
623 default: // Key on & Echo
624 opnaCtrl_->setKeyOnFlagRhythm(ch);
625 break;
626 }
627}
628
629void PlaybackManager::executeADPCMStepEvents(const Step& step, bool calledByNoteDelay)
630{

Callers

nothing calls this directly

Calls 8

isEmptyNoteMethod · 0.80
getVolumeMethod · 0.80
hasVolumeMethod · 0.80
setVolumeRhythmMethod · 0.80
tickEventMethod · 0.80
setKeyOffFlagRhythmMethod · 0.80
setKeyOnFlagRhythmMethod · 0.80
getNoteNumberMethod · 0.45

Tested by

no test coverage detected