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

Method PlayNote

Source/MPETweaker.cpp:85–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void MPETweaker::PlayNote(double time, int pitch, int velocity, int voiceIdx, ModulationParameters modulation)
86{
87 if (mEnabled)
88 {
89 mModulationMult.GetPitchBend(voiceIdx)->MultiplyIn(modulation.pitchBend);
90 mModulationOffset.GetPitchBend(voiceIdx)->AppendTo(mModulationMult.GetPitchBend(voiceIdx));
91 modulation.pitchBend = mModulationOffset.GetPitchBend(voiceIdx);
92
93 mModulationMult.GetPressure(voiceIdx)->MultiplyIn(modulation.pressure);
94 mModulationOffset.GetPressure(voiceIdx)->AppendTo(mModulationMult.GetPressure(voiceIdx));
95 modulation.pressure = mModulationOffset.GetPressure(voiceIdx);
96
97 mModulationMult.GetModWheel(voiceIdx)->MultiplyIn(modulation.modWheel);
98 mModulationOffset.GetModWheel(voiceIdx)->AppendTo(mModulationMult.GetModWheel(voiceIdx));
99 modulation.modWheel = mModulationOffset.GetModWheel(voiceIdx);
100 }
101
102 PlayNoteOutput(time, pitch, velocity, voiceIdx, modulation);
103}
104
105void MPETweaker::FloatSliderUpdated(FloatSlider* slider, float oldVal, double time)
106{

Callers

nothing calls this directly

Calls 5

MultiplyInMethod · 0.80
AppendToMethod · 0.80
GetPitchBendMethod · 0.45
GetPressureMethod · 0.45
GetModWheelMethod · 0.45

Tested by

no test coverage detected