refactored MIDI tab in instrumentTrackWindow which now also allows setting arbitrary fixed velocity and defining a program for MIDI output
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1679 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -44,6 +44,11 @@ public:
|
||||
|
||||
virtual void modelChanged( void );
|
||||
|
||||
pixmapButton * ledButton( void )
|
||||
{
|
||||
return m_led;
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
#include "mv_base.h"
|
||||
|
||||
|
||||
class tabWidget;
|
||||
class ledCheckBox;
|
||||
class groupBox;
|
||||
class lcdSpinBox;
|
||||
class midiPortMenu;
|
||||
class QToolButton;
|
||||
@@ -49,14 +48,15 @@ public:
|
||||
private:
|
||||
virtual void modelChanged( void );
|
||||
|
||||
tabWidget * m_setupTabWidget;
|
||||
groupBox * m_midiInputGroupBox;
|
||||
lcdSpinBox * m_inputChannelSpinBox;
|
||||
lcdSpinBox * m_outputChannelSpinBox;
|
||||
ledCheckBox * m_receiveCheckBox;
|
||||
ledCheckBox * m_sendCheckBox;
|
||||
ledCheckBox * m_defaultVelocityInCheckBox;
|
||||
ledCheckBox * m_defaultVelocityOutCheckBox;
|
||||
lcdSpinBox * m_fixedInputVelocitySpinBox;
|
||||
QToolButton * m_rpBtn;
|
||||
|
||||
groupBox * m_midiOutputGroupBox;
|
||||
lcdSpinBox * m_outputChannelSpinBox;
|
||||
lcdSpinBox * m_fixedOutputVelocitySpinBox;
|
||||
lcdSpinBox * m_outputProgramSpinBox;
|
||||
QToolButton * m_wpBtn;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -81,6 +81,7 @@ enum MidiMetaEvents
|
||||
|
||||
const int MidiChannelCount = 16;
|
||||
const int MidiControllerCount = 128;
|
||||
const int MidiProgramCount = 128;
|
||||
const int MidiMaxVelocity = 127;
|
||||
|
||||
|
||||
|
||||
@@ -53,6 +53,12 @@ class midiPort : public model, public serializingObject
|
||||
m_inputControllerModel);
|
||||
mapPropertyFromModel(int,outputController,setOutputController,
|
||||
m_outputControllerModel);
|
||||
mapPropertyFromModel(int,fixedInputVelocity,setFixedInputVelocity,
|
||||
m_fixedInputVelocityModel);
|
||||
mapPropertyFromModel(int,fixedOutputVelocity,setFixedOutputVelocity,
|
||||
m_fixedOutputVelocityModel);
|
||||
mapPropertyFromModel(int,outputProgram,setOutputProgram,
|
||||
m_outputProgramModel);
|
||||
mapPropertyFromModel(bool,isReadable,setReadable,m_readableModel);
|
||||
mapPropertyFromModel(bool,isWritable,setWritable,m_writableModel);
|
||||
public:
|
||||
@@ -73,11 +79,6 @@ public:
|
||||
Modes _mode = Disabled );
|
||||
virtual ~midiPort();
|
||||
|
||||
inline const QString & name( void ) const
|
||||
{
|
||||
return( m_name );
|
||||
}
|
||||
|
||||
void setName( const QString & _name );
|
||||
|
||||
inline Modes mode( void ) const
|
||||
@@ -97,16 +98,6 @@ public:
|
||||
return( mode() == Output || mode() == Duplex );
|
||||
}
|
||||
|
||||
inline void enableDefaultVelocityForInEvents( const bool _on )
|
||||
{
|
||||
m_defaultVelocityInEnabledModel.setValue( _on );
|
||||
}
|
||||
|
||||
inline void enableDefaultVelocityForOutEvents( const bool _on )
|
||||
{
|
||||
m_defaultVelocityOutEnabledModel.setValue( _on );
|
||||
}
|
||||
|
||||
|
||||
void processInEvent( const midiEvent & _me, const midiTime & _time );
|
||||
void processOutEvent( const midiEvent & _me, const midiTime & _time );
|
||||
@@ -139,12 +130,6 @@ public:
|
||||
midiPortMenu * m_writablePortsMenu;
|
||||
|
||||
|
||||
signals:
|
||||
void readablePortsChanged( void );
|
||||
void writeablePortsChanged( void );
|
||||
void modeChanged( void );
|
||||
|
||||
|
||||
public slots:
|
||||
void updateMidiPortMode( void );
|
||||
|
||||
@@ -152,24 +137,24 @@ public slots:
|
||||
private slots:
|
||||
void updateReadablePorts( void );
|
||||
void updateWriteablePorts( void );
|
||||
void updateOutputProgram( void );
|
||||
|
||||
|
||||
private:
|
||||
midiClient * m_midiClient;
|
||||
midiEventProcessor * m_midiEventProcessor;
|
||||
|
||||
QString m_name; // TODO: replace with model-name-property!
|
||||
|
||||
Modes m_mode;
|
||||
|
||||
intModel m_inputChannelModel;
|
||||
intModel m_outputChannelModel;
|
||||
intModel m_inputControllerModel;
|
||||
intModel m_outputControllerModel;
|
||||
intModel m_fixedInputVelocityModel;
|
||||
intModel m_fixedOutputVelocityModel;
|
||||
intModel m_outputProgramModel;
|
||||
boolModel m_readableModel;
|
||||
boolModel m_writableModel;
|
||||
boolModel m_defaultVelocityInEnabledModel;
|
||||
boolModel m_defaultVelocityOutEnabledModel;
|
||||
|
||||
map m_readablePorts;
|
||||
map m_writablePorts;
|
||||
@@ -178,6 +163,13 @@ private:
|
||||
friend class controllerConnectionDialog;
|
||||
friend class instrumentMidiIOView;
|
||||
|
||||
|
||||
signals:
|
||||
void readablePortsChanged( void );
|
||||
void writeablePortsChanged( void );
|
||||
void modeChanged( void );
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user