added panningToMidi function to easily convert panning to a midi value, dragging around a note in the piano roll makes the correct volume and panning noises
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1921 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "volume.h"
|
||||
#include "templates.h"
|
||||
#include "panning_constants.h"
|
||||
#include "midi.h"
|
||||
|
||||
inline stereoVolumeVector panningToVolumeVector( panning _p,
|
||||
float _scale = 1.0f )
|
||||
@@ -40,4 +41,12 @@ inline stereoVolumeVector panningToVolumeVector( panning _p,
|
||||
return v;
|
||||
}
|
||||
|
||||
inline Sint16 panningToMidi( panning _p )
|
||||
{
|
||||
return MidiMinPanning +
|
||||
( (float)( _p - PanningLeft ) ) /
|
||||
( (float)( PanningRight - PanningLeft ) ) *
|
||||
( (float)( MidiMaxPanning - MidiMinPanning ) );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -182,6 +182,8 @@ private:
|
||||
void shiftSemiTone(int amount);
|
||||
bool isSelection() const;
|
||||
void testPlayNote( note * n );
|
||||
void testPlayKey( int _key, int _vol, int _pan );
|
||||
void pauseTestNotes( bool _pause = true );
|
||||
|
||||
inline int noteEditTop() const;
|
||||
inline int keyAreaBottom() const;
|
||||
|
||||
Reference in New Issue
Block a user