2
0
Fork 0

Carrier attenuation set according to MIDI velocity (ie implement keyboard volume).

This commit is contained in:
bruce 2013-09-21 01:44:59 +08:00
parent bfaf7fccc4
commit 542d05d7c8
1 changed files with 1 additions and 0 deletions

View File

@ -499,6 +499,7 @@ void JuceOplvstiAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuf
while (ch <= Hiopl::CHANNELS && NO_NOTE != active_notes[ch]) {
ch += 1;
}
Opl->SetAttenuation(ch, 2, 63 - (midi_message.getVelocity() / 2));
Opl->KeyOn(ch, noteHz);
active_notes[ch] = n;
}