| 206 | } |
| 207 | |
| 208 | void SignalGenerator::PlayNote(double time, int pitch, int velocity, int voiceIdx, ModulationParameters modulation) |
| 209 | { |
| 210 | if (velocity > 0) |
| 211 | { |
| 212 | if (mFreqMode == kFreqMode_Instant) |
| 213 | { |
| 214 | mFreq = TheScale->PitchToFreq(pitch); |
| 215 | } |
| 216 | else if (mFreqMode == kFreqMode_Ramp) |
| 217 | { |
| 218 | mFreqRamp.Start(time, TheScale->PitchToFreq(pitch), time + mFreqRampTime); |
| 219 | } |
| 220 | else if (mFreqMode == kFreqMode_Slider) |
| 221 | { |
| 222 | float freq = TheScale->PitchToFreq(pitch); |
| 223 | if (freq >= mFreq) |
| 224 | { |
| 225 | mFreqSliderAmount = 0; |
| 226 | mFreqSliderStart = mFreq; |
| 227 | mFreqSliderEnd = freq; |
| 228 | } |
| 229 | else |
| 230 | { |
| 231 | mFreqSliderAmount = 1; |
| 232 | mFreqSliderStart = freq; |
| 233 | mFreqSliderEnd = mFreq; |
| 234 | } |
| 235 | } |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | void SignalGenerator::OnPulse(double time, float velocity, int flags) |
| 240 | { |
nothing calls this directly
no test coverage detected