rewrote FLP import filter, various coding style fixes (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1842 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -45,7 +45,7 @@ template<ch_cnt_t CHANNELS/* = DEFAULT_CHANNELS*/>
|
||||
class basicFilters
|
||||
{
|
||||
public:
|
||||
enum filterTypes
|
||||
enum FilterTypes
|
||||
{
|
||||
LowPass,
|
||||
HiPass,
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
Notch,
|
||||
AllPass,
|
||||
Moog,
|
||||
NumOfFilters
|
||||
NumFilters
|
||||
} ;
|
||||
|
||||
static inline float minFreq( void )
|
||||
@@ -69,14 +69,14 @@ public:
|
||||
|
||||
inline void setFilterType( const int _idx )
|
||||
{
|
||||
m_doubleFilter = _idx >= NumOfFilters;
|
||||
m_doubleFilter = _idx >= NumFilters;
|
||||
if( !m_doubleFilter )
|
||||
{
|
||||
m_type = static_cast<filterTypes>( _idx );
|
||||
m_type = static_cast<FilterTypes>( _idx );
|
||||
return;
|
||||
}
|
||||
m_type = static_cast<filterTypes>( LowPass + _idx -
|
||||
NumOfFilters );
|
||||
m_type = static_cast<FilterTypes>( LowPass + _idx -
|
||||
NumFilters );
|
||||
if( m_subFilter == NULL )
|
||||
{
|
||||
m_subFilter = new basicFilters<CHANNELS>(
|
||||
@@ -289,7 +289,7 @@ private:
|
||||
// in/out history for moog-filter
|
||||
frame m_y1, m_y2, m_y3, m_y4, m_oldx, m_oldy1, m_oldy2, m_oldy3;
|
||||
|
||||
filterTypes m_type;
|
||||
FilterTypes m_type;
|
||||
bool m_doubleFilter;
|
||||
|
||||
float m_sampleRate;
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
tact lengthOfBB( int _bb );
|
||||
inline tact lengthOfCurrentBB( void )
|
||||
{
|
||||
return( lengthOfBB( currentBB() ) );
|
||||
return lengthOfBB( currentBB() );
|
||||
}
|
||||
int numOfBBs( void ) const;
|
||||
void removeBB( int _bb );
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "fxchain" );
|
||||
return "fxchain";
|
||||
}
|
||||
|
||||
void appendEffect( effect * _effect );
|
||||
@@ -59,6 +59,11 @@ public:
|
||||
|
||||
void clear( void );
|
||||
|
||||
void setEnabled( bool _on )
|
||||
{
|
||||
m_enabledModel.setValue( _on );
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
typedef QVector<effect *> effectList;
|
||||
|
||||
@@ -187,7 +187,8 @@ public:
|
||||
NotSupported,
|
||||
LoadAsProject,
|
||||
LoadAsPreset,
|
||||
LoadByPlugin
|
||||
LoadByPlugin,
|
||||
ImportAsProject
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,16 @@ public:
|
||||
|
||||
virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "fxmixer" );
|
||||
return "fxmixer";
|
||||
}
|
||||
|
||||
fxChannel * getEffectChannel( int _ch )
|
||||
{
|
||||
if( _ch >= 0 && _ch <= NumFxChannels )
|
||||
{
|
||||
return m_fxChannels[_ch];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -88,12 +88,12 @@ public:
|
||||
QString instrumentName( void ) const;
|
||||
inline const instrument * getInstrument( void ) const
|
||||
{
|
||||
return( m_instrument );
|
||||
return m_instrument;
|
||||
}
|
||||
|
||||
inline instrument * getInstrument( void )
|
||||
{
|
||||
return( m_instrument );
|
||||
return m_instrument;
|
||||
}
|
||||
|
||||
void deleteNotePluginData( notePlayHandle * _n );
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
// translate pitch to midi-pitch [0,16383]
|
||||
inline int midiPitch( void ) const
|
||||
{
|
||||
return( (int)( ( m_pitchModel.value()+100 ) * 81.92 ) );
|
||||
return (int)( ( m_pitchModel.value()+100 ) * 81.92 );
|
||||
}
|
||||
|
||||
// play everything in given frame-range - creates note-play-handles
|
||||
@@ -135,47 +135,53 @@ public:
|
||||
|
||||
inline audioPort * getAudioPort( void )
|
||||
{
|
||||
return( &m_audioPort );
|
||||
return &m_audioPort;
|
||||
}
|
||||
|
||||
inline midiPort * getMidiPort( void )
|
||||
{
|
||||
return( &m_midiPort );
|
||||
return &m_midiPort;
|
||||
}
|
||||
|
||||
intModel * baseNoteModel( void )
|
||||
{
|
||||
return( &m_baseNoteModel );
|
||||
return &m_baseNoteModel;
|
||||
}
|
||||
|
||||
piano * getPiano( void )
|
||||
{
|
||||
return( &m_piano );
|
||||
return &m_piano;
|
||||
}
|
||||
|
||||
bool arpeggiatorEnabled( void ) const
|
||||
{
|
||||
return( m_arpeggiator.m_arpEnabledModel.value() );
|
||||
return m_arpeggiator.m_arpEnabledModel.value();
|
||||
}
|
||||
|
||||
// simple helper for removing midiport-XML-node when loading presets
|
||||
static void removeMidiPortNode( multimediaProject & _mmp );
|
||||
|
||||
floatModel & pitchModel()
|
||||
floatModel * pitchModel( void )
|
||||
{
|
||||
return m_pitchModel;
|
||||
return &m_pitchModel;
|
||||
}
|
||||
|
||||
floatModel & volumeModel()
|
||||
floatModel * volumeModel( void )
|
||||
{
|
||||
return m_volumeModel;
|
||||
return &m_volumeModel;
|
||||
}
|
||||
|
||||
floatModel & panningModel()
|
||||
floatModel * panningModel( void )
|
||||
{
|
||||
return m_panningModel;
|
||||
return &m_panningModel;
|
||||
}
|
||||
|
||||
intModel * effectChannelModel( void )
|
||||
{
|
||||
return &m_effectChannelModel;
|
||||
}
|
||||
|
||||
|
||||
signals:
|
||||
void instrumentChanged( void );
|
||||
void newNote( void );
|
||||
@@ -186,7 +192,7 @@ signals:
|
||||
protected:
|
||||
virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "instrumenttrack" );
|
||||
return "instrumenttrack";
|
||||
}
|
||||
// invalidates all note-play-handles linked to this instrument
|
||||
void invalidateAllMyNPH( void );
|
||||
@@ -245,18 +251,18 @@ public:
|
||||
|
||||
instrumentTrack * model( void )
|
||||
{
|
||||
return( castModel<instrumentTrack>() );
|
||||
return castModel<instrumentTrack>();
|
||||
}
|
||||
|
||||
const instrumentTrack * model( void ) const
|
||||
{
|
||||
return( castModel<instrumentTrack>() );
|
||||
return castModel<instrumentTrack>();
|
||||
}
|
||||
|
||||
|
||||
QMenu * midiMenu( void )
|
||||
{
|
||||
return( m_midiMenu );
|
||||
return m_midiMenu;
|
||||
}
|
||||
|
||||
void freeInstrumentTrackWindow( void );
|
||||
@@ -314,17 +320,17 @@ public:
|
||||
// parent for all internal tab-widgets
|
||||
tabWidget * tabWidgetParent( void )
|
||||
{
|
||||
return( m_tabWidget );
|
||||
return m_tabWidget;
|
||||
}
|
||||
|
||||
instrumentTrack * model( void )
|
||||
{
|
||||
return( castModel<instrumentTrack>() );
|
||||
return castModel<instrumentTrack>();
|
||||
}
|
||||
|
||||
const instrumentTrack * model( void ) const
|
||||
{
|
||||
return( castModel<instrumentTrack>() );
|
||||
return castModel<instrumentTrack>();
|
||||
}
|
||||
|
||||
void setInstrumentTrackView( instrumentTrackView * _tv )
|
||||
|
||||
@@ -68,24 +68,26 @@ public:
|
||||
virtual midiTime length( void ) const;
|
||||
midiTime beatPatternLength( void ) const;
|
||||
|
||||
note * addNote( const note & _new_note, const bool _quant_pos = TRUE );
|
||||
note * addNote( const note & _new_note, const bool _quant_pos = true );
|
||||
|
||||
void removeNote( const note * _note_to_del );
|
||||
|
||||
note * rearrangeNote( const note * _note_to_proc,
|
||||
const bool _quant_pos = TRUE );
|
||||
const bool _quant_pos = true );
|
||||
|
||||
void clearNotes( void );
|
||||
|
||||
inline const noteVector & notes( void )
|
||||
{
|
||||
return( m_notes );
|
||||
return m_notes;
|
||||
}
|
||||
|
||||
void setStep( int _step, bool _enabled );
|
||||
|
||||
// pattern-type stuff
|
||||
inline PatternTypes type( void ) const
|
||||
{
|
||||
return( m_patternType );
|
||||
return m_patternType;
|
||||
}
|
||||
void setType( PatternTypes _new_pattern_type );
|
||||
void checkType( void );
|
||||
@@ -94,17 +96,17 @@ public:
|
||||
// functions which are part of freezing-feature
|
||||
inline bool freezing( void ) const
|
||||
{
|
||||
return( m_freezing );
|
||||
return m_freezing;
|
||||
}
|
||||
|
||||
inline bool frozen( void ) const
|
||||
{
|
||||
return( m_frozenPattern != NULL );
|
||||
return m_frozenPattern != NULL;
|
||||
}
|
||||
|
||||
sampleBuffer * getFrozenPattern( void )
|
||||
{
|
||||
return( m_frozenPattern );
|
||||
return m_frozenPattern;
|
||||
}
|
||||
|
||||
// settings-management
|
||||
@@ -112,12 +114,12 @@ public:
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "pattern" );
|
||||
return "pattern";
|
||||
}
|
||||
|
||||
inline instrumentTrack * getInstrumentTrack( void )
|
||||
{
|
||||
return( m_instrumentTrack );
|
||||
return m_instrumentTrack;
|
||||
}
|
||||
|
||||
bool empty( void );
|
||||
@@ -197,7 +199,7 @@ protected:
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void resizeEvent( QResizeEvent * _re )
|
||||
{
|
||||
m_needsUpdate = TRUE;
|
||||
m_needsUpdate = true;
|
||||
trackContentObjectView::resizeEvent( _re );
|
||||
}
|
||||
virtual void wheelEvent( QWheelEvent * _we );
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
virtual automationPattern * tempoAutomationPattern( void )
|
||||
{
|
||||
return( NULL );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int countTracks( track::TrackTypes _tt = track::NumTrackTypes ) const;
|
||||
@@ -69,14 +69,14 @@ public:
|
||||
|
||||
const trackList & tracks( void ) const
|
||||
{
|
||||
return( m_tracks );
|
||||
return m_tracks;
|
||||
}
|
||||
|
||||
bool isEmpty( void ) const;
|
||||
|
||||
static const QString classNodeName( void )
|
||||
{
|
||||
return( "trackcontainer" );
|
||||
return "trackcontainer";
|
||||
}
|
||||
|
||||
|
||||
@@ -107,12 +107,12 @@ public:
|
||||
|
||||
virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "dummytrackcontainer" );
|
||||
return "dummytrackcontainer";
|
||||
}
|
||||
|
||||
instrumentTrack * dummyInstrumentTrack( void )
|
||||
{
|
||||
return( m_dummyInstrumentTrack );
|
||||
return m_dummyInstrumentTrack;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user