InstrumentTrack: replaced numbers by newly introduced constants

This commit is contained in:
Tobias Doerffel
2014-01-26 14:06:46 +01:00
parent 8c9778c945
commit 0e00fc6aa1

View File

@@ -103,7 +103,7 @@ InstrumentTrack::InstrumentTrack( TrackContainer* tc ) :
tr( "Base note" ) ),
m_volumeModel( DefaultVolume, MinVolume, MaxVolume, 0.1f, this, tr( "Volume" ) ),
m_panningModel( DefaultPanning, PanningLeft, PanningRight, 0.1f, this, tr( "Panning" ) ),
m_pitchModel( 0, -100, 100, 1, this, tr( "Pitch" ) ),
m_pitchModel( 0, MinPitchDefault, MaxPitchDefault, 1, this, tr( "Pitch" ) ),
m_pitchRangeModel( 1, 1, 24, this, tr( "Pitch range" ) ),
m_effectChannelModel( 0, 0, NumFxChannels, this, tr( "FX channel" ) ),
m_instrument( NULL ),
@@ -294,7 +294,7 @@ void InstrumentTrack::processInEvent( const MidiEvent& event, const MidiTime& ti
case MidiPitchBend:
// updatePitch() is connected to m_pitchModel::dataChanged() which will send out
// MidiPitchBend events
m_pitchModel.setValue( m_pitchModel.minValue() + event.pitchBend() * m_pitchModel.range() / 16384 );
m_pitchModel.setValue( m_pitchModel.minValue() + event.pitchBend() * m_pitchModel.range() / MidiMaxPitchBend );
break;
case MidiControlChange: