Last commit for a few hours. Demonstrate new midi portnames - beta
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1083 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -52,6 +52,14 @@
|
||||
* include/effect_lib.h:
|
||||
* src/core/lfo_controller.cpp:
|
||||
Fix compile time warnings
|
||||
|
||||
* include/automatable_model.h:
|
||||
* include/instrument_track.h:
|
||||
* include/controller_connection_dialog.h:
|
||||
* src/gui/controller_connection_dialog.cpp:
|
||||
* src/tracks/instrument_track.cpp:
|
||||
Test to see if we can now generate reasonable midi-port names. We can,
|
||||
the feature is very beta right now (no screenupdating, loading, etc..)
|
||||
|
||||
2008-06-05 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
|
||||
@@ -103,11 +103,16 @@ public:
|
||||
m_track = _track;
|
||||
}
|
||||
|
||||
inline bool nullTrack( void )
|
||||
inline bool nullTrack( void ) const
|
||||
{
|
||||
return( m_track == NULL );
|
||||
}
|
||||
|
||||
inline track * getTrack( void ) const
|
||||
{
|
||||
return( m_track );
|
||||
}
|
||||
|
||||
void initAutomationPattern( void );
|
||||
|
||||
inline controllerConnection * getControllerConnection( void ) const
|
||||
|
||||
@@ -78,8 +78,8 @@ private:
|
||||
lcdSpinBox * m_midiChannelSpinBox;
|
||||
lcdSpinBox * m_midiControllerSpinBox;
|
||||
ledCheckBox * m_midiAutoDetectCheckBox;
|
||||
boolModel m_midiAutoDetect;
|
||||
QMenu * m_readablePorts;
|
||||
boolModel m_midiAutoDetect;
|
||||
|
||||
groupBox * m_userGroupBox;
|
||||
comboBox * m_userController;
|
||||
|
||||
@@ -144,6 +144,7 @@ public:
|
||||
return( m_arpeggiator.m_arpEnabledModel.value() );
|
||||
}
|
||||
|
||||
virtual QString displayName( void ) const;
|
||||
|
||||
signals:
|
||||
void instrumentChanged( void );
|
||||
|
||||
@@ -121,8 +121,8 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
|
||||
m_readablePorts( NULL ),
|
||||
m_midiAutoDetect( FALSE ),
|
||||
m_controller( NULL ),
|
||||
m_targetModel( _target_model )
|
||||
m_midiController( NULL ),
|
||||
m_targetModel( _target_model ),
|
||||
m_midiController( NULL )
|
||||
{
|
||||
setWindowIcon( embed::getIconPixmap( "setup_audio" ) );
|
||||
setWindowTitle( tr( "Connection Settings" ) );
|
||||
@@ -295,6 +295,7 @@ controllerConnectionDialog::~controllerConnectionDialog()
|
||||
|
||||
void controllerConnectionDialog::selectController( void )
|
||||
{
|
||||
// Midi
|
||||
if( m_midiGroupBox->model()->value() > 0 )
|
||||
{
|
||||
if( m_midiControllerSpinBox->model()->value() > 0 )
|
||||
@@ -302,10 +303,22 @@ void controllerConnectionDialog::selectController( void )
|
||||
midiController * mc;
|
||||
mc = m_midiController->copyToMidiController(
|
||||
engine::getSong() );
|
||||
mc->getMidiPort()->setName( m_targetModel->displayName() );
|
||||
|
||||
if( m_targetModel->getTrack() &&
|
||||
!m_targetModel->getTrack()->displayName().isEmpty() )
|
||||
{
|
||||
mc->getMidiPort()->setName( QString( "%1 (%2)" ).
|
||||
arg( m_targetModel->getTrack()->displayName() ).
|
||||
arg( m_targetModel->displayName() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mc->getMidiPort()->setName( m_targetModel->displayName() );
|
||||
}
|
||||
m_controller = mc;
|
||||
}
|
||||
}
|
||||
// User
|
||||
else
|
||||
{
|
||||
if( m_userGroupBox->model()->value() > 0 &&
|
||||
|
||||
@@ -109,8 +109,8 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) :
|
||||
m_audioPort( tr( "unnamed_channel" ), this ),
|
||||
m_notes(),
|
||||
m_baseNoteModel( 0, 0, KeysPerOctave * NumOctaves - 1, this ),
|
||||
m_volumeModel( DefaultVolume, MinVolume, MaxVolume, 1.0f, this ),
|
||||
m_panningModel( DefaultPanning, PanningLeft, PanningRight, 1.0f, this ),
|
||||
m_volumeModel( DefaultVolume, MinVolume, MaxVolume, 1.0f, this, tr( "Volume" ) ),
|
||||
m_panningModel( DefaultPanning, PanningLeft, PanningRight, 1.0f, this, tr( "Panning" ) ),
|
||||
m_effectChannelModel( 0, 0, NumFxChannels, this ),
|
||||
m_instrument( NULL ),
|
||||
m_soundShaping( this ),
|
||||
@@ -501,6 +501,14 @@ int instrumentTrack::masterKey( notePlayHandle * _n ) const
|
||||
|
||||
|
||||
|
||||
QString instrumentTrack::displayName( void ) const
|
||||
{
|
||||
return instrumentName() + ":" + name();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool FASTCALL instrumentTrack::play( const midiTime & _start,
|
||||
const fpp_t _frames,
|
||||
const f_cnt_t _offset,
|
||||
@@ -829,8 +837,7 @@ instrumentTrackView::instrumentTrackView( instrumentTrack * _it,
|
||||
|
||||
// creation of widgets for track-settings-widget
|
||||
m_tswVolumeKnob = new volumeKnob( knobSmall_17,
|
||||
getTrackSettingsWidget(),
|
||||
tr( "Volume" ) );
|
||||
getTrackSettingsWidget() );
|
||||
m_tswVolumeKnob->setModel( &_it->m_volumeModel );
|
||||
m_tswVolumeKnob->setHintText( tr( "Volume:" ) + " ", "%" );
|
||||
m_tswVolumeKnob->move( 4, 4 );
|
||||
|
||||
Reference in New Issue
Block a user