From d7365e4cf3e34eaa4ada7b0c209c7ad9272ddc48 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Wed, 26 Aug 2009 00:38:54 +0200 Subject: [PATCH] Fixed mistakes made by sed-mass-replaces Some variables got renamed the way the shouldn't. Doesn't have any functional impact but fix it for the sake of cosmetics. --- include/note_play_handle.h | 4 +- .../audio_file_processor.cpp | 24 ++++----- .../audio_file_processor.h | 4 +- src/core/note_play_handle.cpp | 52 +++++++++---------- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/include/note_play_handle.h b/include/note_play_handle.h index d4f20331b..3341058dc 100644 --- a/include/note_play_handle.h +++ b/include/note_play_handle.h @@ -132,7 +132,7 @@ public: // returns instrument-track this note-play-handle plays inline InstrumentTrack * instrumentTrack() { - return m_InstrumentTrack; + return m_instrumentTrack; } // returns whether note is a base-note, e.g. is not part of an arpeggio @@ -223,7 +223,7 @@ private: } ; - InstrumentTrack * m_InstrumentTrack; // needed for calling + InstrumentTrack * m_instrumentTrack; // needed for calling // InstrumentTrack::playNote f_cnt_t m_frames; // total frames to play f_cnt_t m_totalFramesPlayed; // total frame-counter - used for diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index 57309f34d..4ab69c3f0 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -73,8 +73,8 @@ audioFileProcessor::audioFileProcessor( InstrumentTrack * _instrument_track ) : Instrument( _instrument_track, &audiofileprocessor_plugin_descriptor ), m_sampleBuffer(), m_ampModel( 100, 0, 500, 1, this, tr( "Amplify" ) ), - m_startPoIntModel( 0, 0, 1, 0.0000001f, this, tr( "Start of sample") ), - m_endPoIntModel( 1, 0, 1, 0.0000001f, this, tr( "End of sample" ) ), + m_startPointModel( 0, 0, 1, 0.0000001f, this, tr( "Start of sample") ), + m_endPointModel( 1, 0, 1, 0.0000001f, this, tr( "End of sample" ) ), m_reverseModel( false, this, tr( "Reverse sample" ) ), m_loopModel( false, this, tr( "Loop") ) { @@ -82,9 +82,9 @@ audioFileProcessor::audioFileProcessor( InstrumentTrack * _instrument_track ) : this, SLOT( reverseModelChanged() ) ); connect( &m_ampModel, SIGNAL( dataChanged() ), this, SLOT( ampModelChanged() ) ); - connect( &m_startPoIntModel, SIGNAL( dataChanged() ), + connect( &m_startPointModel, SIGNAL( dataChanged() ), this, SLOT( loopPointChanged() ) ); - connect( &m_endPoIntModel, SIGNAL( dataChanged() ), + connect( &m_endPointModel, SIGNAL( dataChanged() ), this, SLOT( loopPointChanged() ) ); } @@ -143,8 +143,8 @@ void audioFileProcessor::saveSettings( QDomDocument & _doc, m_reverseModel.saveSettings( _doc, _this, "reversed" ); m_loopModel.saveSettings( _doc, _this, "looped" ); m_ampModel.saveSettings( _doc, _this, "amp" ); - m_startPoIntModel.saveSettings( _doc, _this, "sframe" ); - m_endPoIntModel.saveSettings( _doc, _this, "eframe" ); + m_startPointModel.saveSettings( _doc, _this, "sframe" ); + m_endPointModel.saveSettings( _doc, _this, "eframe" ); } @@ -163,8 +163,8 @@ void audioFileProcessor::loadSettings( const QDomElement & _this ) m_reverseModel.loadSettings( _this, "reversed" ); m_loopModel.loadSettings( _this, "looped" ); m_ampModel.loadSettings( _this, "amp" ); - m_startPoIntModel.loadSettings( _this, "sframe" ); - m_endPoIntModel.loadSettings( _this, "eframe" ); + m_startPointModel.loadSettings( _this, "sframe" ); + m_endPointModel.loadSettings( _this, "eframe" ); loopPointChanged(); } @@ -251,9 +251,9 @@ void audioFileProcessor::ampModelChanged() void audioFileProcessor::loopPointChanged() { - const f_cnt_t f1 = static_cast( m_startPoIntModel.value() * + const f_cnt_t f1 = static_cast( m_startPointModel.value() * ( m_sampleBuffer.frames()-1 ) ); - const f_cnt_t f2 = static_cast( m_endPoIntModel.value() * + const f_cnt_t f2 = static_cast( m_endPointModel.value() * ( m_sampleBuffer.frames()-1 ) ); m_sampleBuffer.setStartFrame( qMin( f1, f2 ) ); m_sampleBuffer.setEndFrame( qMax( f1, f2 ) ); @@ -472,8 +472,8 @@ void AudioFileProcessorView::modelChanged() connect( &a->m_sampleBuffer, SIGNAL( sampleUpdated() ), this, SLOT( sampleUpdated() ) ); m_ampKnob->setModel( &a->m_ampModel ); - m_startKnob->setModel( &a->m_startPoIntModel ); - m_endKnob->setModel( &a->m_endPoIntModel ); + m_startKnob->setModel( &a->m_startPointModel ); + m_endKnob->setModel( &a->m_endPointModel ); m_reverseButton->setModel( &a->m_reverseModel ); m_loopButton->setModel( &a->m_loopModel ); sampleUpdated(); diff --git a/plugins/audio_file_processor/audio_file_processor.h b/plugins/audio_file_processor/audio_file_processor.h index 48c4bdd98..5f32c3bf7 100644 --- a/plugins/audio_file_processor/audio_file_processor.h +++ b/plugins/audio_file_processor/audio_file_processor.h @@ -82,8 +82,8 @@ private: sampleBuffer m_sampleBuffer; FloatModel m_ampModel; - FloatModel m_startPoIntModel; - FloatModel m_endPoIntModel; + FloatModel m_startPointModel; + FloatModel m_endPointModel; BoolModel m_reverseModel; BoolModel m_loopModel; diff --git a/src/core/note_play_handle.cpp b/src/core/note_play_handle.cpp index 20fa1586e..f2f437000 100644 --- a/src/core/note_play_handle.cpp +++ b/src/core/note_play_handle.cpp @@ -56,7 +56,7 @@ notePlayHandle::notePlayHandle( InstrumentTrack * _it, _n.getVolume(), _n.getPanning(), _n.detuning() ), m_pluginData( NULL ), m_filter( NULL ), - m_InstrumentTrack( _it ), + m_instrumentTrack( _it ), m_frames( 0 ), m_totalFramesPlayed( 0 ), m_framesBeforeRelease( 0 ), @@ -75,7 +75,7 @@ notePlayHandle::notePlayHandle( InstrumentTrack * _it, if( m_baseNote ) { m_baseDetuning = new baseDetuning( detuning() ); - m_InstrumentTrack->m_processHandles.push_back( this ); + m_instrumentTrack->m_processHandles.push_back( this ); } else { @@ -102,8 +102,8 @@ notePlayHandle::notePlayHandle( InstrumentTrack * _it, if( !isBaseNote() || !instrumentTrack()->isArpeggiatorEnabled() ) { // send MIDI-note-on-event - m_InstrumentTrack->processOutEvent( midiEvent( MidiNoteOn, - m_InstrumentTrack->midiPort()->realOutputChannel(), + m_instrumentTrack->processOutEvent( midiEvent( MidiNoteOn, + m_instrumentTrack->midiPort()->realOutputChannel(), key(), getMidiVelocity() ), midiTime::fromFrames( offset(), engine::framesPerTick() ) ); @@ -120,17 +120,17 @@ notePlayHandle::~notePlayHandle() if( m_baseNote ) { delete m_baseDetuning; - m_InstrumentTrack->m_processHandles.removeAll( this ); + m_instrumentTrack->m_processHandles.removeAll( this ); } if( m_pluginData != NULL ) { - m_InstrumentTrack->deleteNotePluginData( this ); + m_instrumentTrack->deleteNotePluginData( this ); } - if( m_InstrumentTrack->m_notes[key()] == this ) + if( m_instrumentTrack->m_notes[key()] == this ) { - m_InstrumentTrack->m_notes[key()] = NULL; + m_instrumentTrack->m_notes[key()] = NULL; } for( NotePlayHandleList::Iterator it = m_subNotes.begin(); @@ -149,8 +149,8 @@ notePlayHandle::~notePlayHandle() void notePlayHandle::setVolume( const volume_t _volume ) { note::setVolume( _volume ); - m_InstrumentTrack->processOutEvent( midiEvent( MidiKeyPressure, - m_InstrumentTrack->midiPort()->realOutputChannel(), + m_instrumentTrack->processOutEvent( midiEvent( MidiKeyPressure, + m_instrumentTrack->midiPort()->realOutputChannel(), key(), getMidiVelocity() ), 0 ); } @@ -161,9 +161,9 @@ void notePlayHandle::setVolume( const volume_t _volume ) int notePlayHandle::getMidiVelocity() const { int vel = getVolume(); - if( m_InstrumentTrack->getVolume() < DefaultVolume ) + if( m_instrumentTrack->getVolume() < DefaultVolume ) { - vel = ( vel * m_InstrumentTrack->getVolume() ) / DefaultVolume; + vel = ( vel * m_instrumentTrack->getVolume() ) / DefaultVolume; } return qMin( MidiMaxVelocity, vel * MidiMaxVelocity / DefaultVolume ); } @@ -191,7 +191,7 @@ void notePlayHandle::play( sampleFrame * _working_buffer ) if( framesLeft() > 0 ) { // play note! - m_InstrumentTrack->playNote( this, _working_buffer ); + m_instrumentTrack->playNote( this, _working_buffer ); } if( m_released ) @@ -299,7 +299,7 @@ f_cnt_t notePlayHandle::framesLeft() const bool notePlayHandle::isFromTrack( const track * _track ) const { - return m_InstrumentTrack == _track || m_bbTrack == _track; + return m_instrumentTrack == _track || m_bbTrack == _track; } @@ -322,13 +322,13 @@ void notePlayHandle::noteOff( const f_cnt_t _s ) // then set some variables indicating release-state m_framesBeforeRelease = _s; m_releaseFramesToDo = qMax( 0, // 10, - m_InstrumentTrack->m_soundShaping.releaseFrames() ); + m_instrumentTrack->m_soundShaping.releaseFrames() ); if( !isBaseNote() || !instrumentTrack()->isArpeggiatorEnabled() ) { // send MIDI-note-off-event - m_InstrumentTrack->processOutEvent( midiEvent( MidiNoteOff, - m_InstrumentTrack->midiPort()->realOutputChannel(), + m_instrumentTrack->processOutEvent( midiEvent( MidiNoteOff, + m_instrumentTrack->midiPort()->realOutputChannel(), key(), 0 ), midiTime::fromFrames( m_framesBeforeRelease, engine::framesPerTick() ) ); @@ -342,7 +342,7 @@ void notePlayHandle::noteOff( const f_cnt_t _s ) f_cnt_t notePlayHandle::actualReleaseFramesToDo() const { - return m_InstrumentTrack->m_soundShaping.releaseFrames(/* + return m_instrumentTrack->m_soundShaping.releaseFrames(/* isArpeggioBaseNote()*/ ); } @@ -354,7 +354,7 @@ void notePlayHandle::setFrames( const f_cnt_t _frames ) m_frames = _frames; if( m_frames == 0 ) { - m_frames = m_InstrumentTrack->beatLen( this ); + m_frames = m_instrumentTrack->beatLen( this ); } m_origFrames = m_frames; } @@ -364,7 +364,7 @@ void notePlayHandle::setFrames( const f_cnt_t _frames ) float notePlayHandle::volumeLevel( const f_cnt_t _frame ) { - return m_InstrumentTrack->m_soundShaping.volumeLevel( this, _frame ); + return m_instrumentTrack->m_soundShaping.volumeLevel( this, _frame ); } @@ -373,7 +373,7 @@ float notePlayHandle::volumeLevel( const f_cnt_t _frame ) bool notePlayHandle::isArpeggioBaseNote() const { return isBaseNote() && ( m_partOfArpeggio || - m_InstrumentTrack->isArpeggiatorEnabled() ); + m_instrumentTrack->isArpeggiatorEnabled() ); } @@ -404,7 +404,7 @@ int notePlayHandle::index() const const notePlayHandle * nph = dynamic_cast( *it ); if( nph == NULL || - nph->m_InstrumentTrack != m_InstrumentTrack || + nph->m_instrumentTrack != m_instrumentTrack || nph->released() == true ) { continue; @@ -432,7 +432,7 @@ ConstNotePlayHandleList notePlayHandle::nphsOfInstrumentTrack( { const notePlayHandle * nph = dynamic_cast( *it ); - if( nph != NULL && nph->m_InstrumentTrack == _it && + if( nph != NULL && nph->m_instrumentTrack == _it && ( nph->released() == false || _all_ph == true ) ) { cnphv.push_back( nph ); @@ -451,7 +451,7 @@ bool notePlayHandle::operator==( const notePlayHandle & _nph ) const key() == _nph.key() && getVolume() == _nph.getVolume() && getPanning() == _nph.getPanning() && - m_InstrumentTrack == _nph.m_InstrumentTrack && + m_instrumentTrack == _nph.m_instrumentTrack && m_frames == _nph.m_frames && offset() == _nph.offset() && m_totalFramesPlayed == _nph.m_totalFramesPlayed && @@ -467,10 +467,10 @@ bool notePlayHandle::operator==( const notePlayHandle & _nph ) const void notePlayHandle::updateFrequency() { const float pitch = - ( key() - m_InstrumentTrack->baseNoteModel()->value() + + ( key() - m_instrumentTrack->baseNoteModel()->value() + engine::getSong()->masterPitch() ) / 12.0f; m_frequency = BaseFreq * powf( 2.0f, pitch + - m_InstrumentTrack->pitchModel()->value() / ( 100 * 12.0f ) ); + m_instrumentTrack->pitchModel()->value() / ( 100 * 12.0f ) ); m_unpitchedFrequency = BaseFreq * powf( 2.0f, pitch ); for( NotePlayHandleList::Iterator it = m_subNotes.begin();