diff --git a/ChangeLog b/ChangeLog index b81a48e97..6680babc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -70,6 +70,19 @@ * plugins/stk/mallets/mallets.h: Add support for pitch bend + * src/tracks/instrument_track.cpp: + * include/instrument_track.h: + - Correctly update instrumentTrackView when changing the instrument plugin + - Add bendable property to hide pitchBend knob for Vibed + + * plugins/vibed/vibed.h: + * include/instrument.h: + * src/tracks/instrument_track.cpp: + Hide pitch bend one vibed instrument + + * src/gui/setup_dialog.cpp: + Minor layout fix + 2008-09-20 Paul Giblock * plugins/sf2_player/sf2_player.cpp: diff --git a/include/instrument.h b/include/instrument.h index 9e5243c41..0dc1f5707 100644 --- a/include/instrument.h +++ b/include/instrument.h @@ -90,7 +90,12 @@ public: // instrument-play-handle-based instruments should return FALSE inline virtual bool notePlayHandleBased( void ) const { - return( TRUE ); + return( true ); + } + + inline virtual bool bendable( void ) const + { + return( true ); } // sub-classes can re-implement this for receiving all incoming @@ -98,7 +103,7 @@ public: inline virtual bool handleMidiEvent( const midiEvent & _me, const midiTime & _time ) { - return( FALSE ); + return( false ); } virtual QString fullDisplayName( void ) const; diff --git a/plugins/vibed/vibed.h b/plugins/vibed/vibed.h index 694dda73c..c0c735a9c 100644 --- a/plugins/vibed/vibed.h +++ b/plugins/vibed/vibed.h @@ -53,8 +53,12 @@ public: virtual QString nodeName( void ) const; - virtual pluginView * instantiateView( QWidget * _parent ); + inline virtual bool bendable( void ) const + { + return( false ); + } + virtual pluginView * instantiateView( QWidget * _parent ); private: QList m_pickKnobs; diff --git a/src/core/main.cpp b/src/core/main.cpp index 54b053b53..b02282409 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -330,7 +330,7 @@ int main( int argc, char * * argv ) sched_get_priority_min( SCHED_FIFO ) ) / 2; if( sched_setscheduler( 0, SCHED_FIFO, &sparam ) == -1 ) { - printf( "could not set realtime priority.\n" ); + printf( "Notice: could not set realtime priority.\n" ); } #endif #endif diff --git a/src/gui/setup_dialog.cpp b/src/gui/setup_dialog.cpp index c857aac87..101105f00 100644 --- a/src/gui/setup_dialog.cpp +++ b/src/gui/setup_dialog.cpp @@ -237,14 +237,14 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : QWidget * paths = new QWidget( ws ); - int pathsHeight = 346; + int pathsHeight = 356; #ifdef LMMS_HAVE_STK - pathsHeight += 50; + pathsHeight += 55; #endif #ifdef LMMS_HAVE_FLUIDSYNTH - pathsHeight += 50; + pathsHeight += 55; #endif - paths->setFixedSize( 410, pathsHeight ); + paths->setFixedSize( 360, pathsHeight ); QVBoxLayout * dir_layout = new QVBoxLayout( paths ); dir_layout->setSpacing( 0 ); dir_layout->setMargin( 0 ); diff --git a/src/tracks/instrument_track.cpp b/src/tracks/instrument_track.cpp index 8863e069c..5871cf002 100644 --- a/src/tracks/instrument_track.cpp +++ b/src/tracks/instrument_track.cpp @@ -1259,10 +1259,20 @@ void instrumentTrackWindow::modelChanged( void ) m_volumeKnob->setModel( &m_track->m_volumeModel ); m_panningKnob->setModel( &m_track->m_panningModel ); - m_pitchKnob->setModel( &m_track->m_pitchModel ); m_effectChannelNumber->setModel( &m_track->m_effectChannelModel ); m_pianoView->setModel( &m_track->m_piano ); + if( m_track->getInstrument() && m_track->getInstrument()->bendable() ) + { + m_pitchKnob->setModel( &m_track->m_pitchModel ); + m_pitchKnob->show(); + } + else + { + m_pitchKnob->hide(); + m_pitchKnob->setModel( NULL ); + } + m_ssView->setModel( &m_track->m_soundShaping ); m_chordView->setModel( &m_track->m_chordCreator ); m_arpView->setModel( &m_track->m_arpeggiator ); @@ -1332,6 +1342,9 @@ void instrumentTrackWindow::updateInstrumentView( void ) m_tabWidget ); m_tabWidget->addTab( m_instrumentView, tr( "PLUGIN" ), 0 ); m_tabWidget->setActiveTab( 0 ); + + modelChanged(); // Get the instrument window to refresh + m_track->dataChanged(); // Get the text on the trackButton to change } }