MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / PlayNote

Method PlayNote

Source/Capo.cpp:62–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void Capo::PlayNote(double time, int pitch, int velocity, int voiceIdx, ModulationParameters modulation)
63{
64 if (!mEnabled)
65 {
66 PlayNoteOutput(time, pitch, velocity, voiceIdx, modulation);
67 return;
68 }
69
70 if (pitch >= 0 && pitch < 128)
71 {
72 if (velocity > 0)
73 {
74 mInputNotes[pitch].mOn = true;
75 mInputNotes[pitch].mVelocity = velocity;
76 mInputNotes[pitch].mVoiceIdx = voiceIdx;
77 mInputNotes[pitch].mOutputPitch = TransformPitch(pitch);
78 }
79 else
80 {
81 mInputNotes[pitch].mOn = false;
82 }
83
84 PlayNoteOutput(time, mInputNotes[pitch].mOutputPitch, velocity, mInputNotes[pitch].mVoiceIdx, modulation);
85 }
86}
87
88int Capo::TransformPitch(int pitch)
89{

Callers 5

OnStepMethod · 0.45
OnTransportAdvancedMethod · 0.45
oscMessageReceivedMethod · 0.45
ProcessMethod · 0.45
ButtonClickedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected