InstrumentTrack: scale output volume by 2 for MIDI-based instruments
As of 0ca3901ab8 MIDI-based instruments are
played at velocity 63 for volume=100%. In order to get the same output
volume, we need to scale it by 2.
This commit is contained in:
@@ -185,6 +185,13 @@ void InstrumentTrack::processAudioBuffer( sampleFrame* buf, const fpp_t frames,
|
||||
|
||||
float v_scale = (float) getVolume() / DefaultVolume;
|
||||
|
||||
// We play MIDI-based instruments at velocity 63 for volume=100%. In order
|
||||
// to get the same output volume, we need to scale it by 2
|
||||
if( m_instrument->flags().testFlag( Instrument::IsMidiBased ) )
|
||||
{
|
||||
v_scale *= 2;
|
||||
}
|
||||
|
||||
// instruments using instrument-play-handles will call this method
|
||||
// without any knowledge about notes, so they pass NULL for n, which
|
||||
// is no problem for us since we just bypass the envelopes+LFOs
|
||||
|
||||
Reference in New Issue
Block a user