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:
Tobias Doerffel
2014-03-17 21:55:20 +01:00
parent f32c89bd13
commit 5e2d299360
10 changed files with 68 additions and 20 deletions

View File

@@ -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 );