MidiPort: introduced internal base velocity property
In order to keep compatibility with projects created with LMMS < 1.0.0 we maintain a property specifying the base velocity (i.e. the velocity sent to MIDI-based instruments at volume=100%). For new projects this always will be 64 while compat code enforces a value of 127 for old projects. We can also think about hiding the new groupbox in order to hide complexity from the user. Closes #430.
This commit is contained in:
@@ -565,8 +565,9 @@ void sf2Instrument::playNote( NotePlayHandle * _n, sampleFrame * )
|
||||
id[i] = fluid_voice_get_id( voices[i] );
|
||||
}
|
||||
|
||||
fluid_synth_noteon( m_synth, m_channel, midiNote,
|
||||
_n->midiVelocity() );
|
||||
const int baseVelocity = instrumentTrack()->midiPort()->baseVelocity();
|
||||
|
||||
fluid_synth_noteon( m_synth, m_channel, midiNote, _n->midiVelocity( baseVelocity ) );
|
||||
|
||||
// get new voice and save it
|
||||
fluid_synth_get_voicelist( m_synth, voices, poly, -1 );
|
||||
|
||||
Reference in New Issue
Block a user