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:
Paul Giblock
2008-06-06 09:39:56 +00:00
parent f003b34791
commit 7cd212a335
6 changed files with 43 additions and 9 deletions

View File

@@ -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 &&

View File

@@ -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 );