Hide pitch-bend knob on vibed instrument.

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1672 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-09-21 19:46:43 +00:00
parent 668cc77a47
commit b17bbed325
6 changed files with 44 additions and 9 deletions

View File

@@ -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 <drfaygo/at/gmail/dot/com>
* plugins/sf2_player/sf2_player.cpp:

View File

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

View File

@@ -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<knobModel*> m_pickKnobs;

View File

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

View File

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

View File

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