| 60 | } |
| 61 | |
| 62 | void 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 | |
| 88 | int Capo::TransformPitch(int pitch) |
| 89 | { |
no outgoing calls
no test coverage detected