Carrier attenuation set according to MIDI velocity (ie implement keyboard volume).
This commit is contained in:
parent
bfaf7fccc4
commit
542d05d7c8
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue