diff --git a/include/PianoRoll.h b/include/PianoRoll.h index e5fb626c8..d4ef00776 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -34,7 +34,7 @@ #include "SerializingObject.h" #include "note.h" #include "lmms_basics.h" -#include "song.h" +#include "Song.h" #include "tooltip.h" class QPainter; @@ -83,7 +83,7 @@ public: return m_pattern != NULL; } - song::PlayModes desiredPlayModeForAccompany() const; + Song::PlayModes desiredPlayModeForAccompany() const; int quantization() const; diff --git a/include/song.h b/include/Song.h similarity index 98% rename from include/song.h rename to include/Song.h index 436318b8b..24afc4377 100644 --- a/include/song.h +++ b/include/Song.h @@ -1,5 +1,5 @@ /* - * song.h - class song - the root of the model-tree + * Song.h - class song - the root of the model-tree * * Copyright (c) 2004-2014 Tobias Doerffel * @@ -45,7 +45,7 @@ const bpm_t MaxTempo = 999; const tick_t MaxSongLength = 9999 * DefaultTicksPerTact; -class EXPORT song : public TrackContainer +class EXPORT Song : public TrackContainer { Q_OBJECT mapPropertyFromModel(int,getTempo,setTempo,m_tempoModel); @@ -300,9 +300,9 @@ private slots: private: - song(); - song( const song & ); - virtual ~song(); + Song(); + Song( const Song & ); + virtual ~Song(); inline tact_t currentTact() const diff --git a/include/SongEditor.h b/include/SongEditor.h index ff540d221..439c8d6b7 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -36,7 +36,7 @@ class automatableSlider; class comboBox; class LcdSpinBox; class MeterDialog; -class song; +class Song; class textFloat; class timeLine; class toolButton; @@ -56,7 +56,7 @@ class SongEditor : public TrackContainerView { Q_OBJECT public: - SongEditor( song * _song ); + SongEditor( Song * _song ); virtual ~SongEditor(); void setPauseIcon( bool pause ); @@ -98,7 +98,7 @@ private: virtual bool allowRubberband() const; - song * m_s; + Song * m_song; QScrollBar * m_leftRightScroll; diff --git a/include/engine.h b/include/engine.h index 7ca7e78f2..263345162 100644 --- a/include/engine.h +++ b/include/engine.h @@ -44,7 +44,7 @@ class MainWindow; class Mixer; class PianoRoll; class projectNotes; -class song; +class Song; class SongEditor; class ladspa2LMMS; class ControllerRackView; @@ -82,7 +82,7 @@ public: return s_fxMixer; } - static song * getSong() + static Song * getSong() { return s_song; } @@ -178,7 +178,7 @@ private: // core static Mixer *s_mixer; static FxMixer * s_fxMixer; - static song * s_song; + static Song * s_song; static bbTrackContainer * s_bbTrackContainer; static ProjectJournal * s_projectJournal; static DummyTrackContainer * s_dummyTC; diff --git a/include/timeline.h b/include/timeline.h index 5eb280e45..bfde02b4e 100644 --- a/include/timeline.h +++ b/include/timeline.h @@ -28,7 +28,7 @@ #include -#include "song.h" +#include "Song.h" class QPixmap; @@ -60,11 +60,11 @@ public: } ; - timeLine( int _xoff, int _yoff, float _ppt, song::playPos & _pos, + timeLine( int _xoff, int _yoff, float _ppt, Song::playPos & _pos, const MidiTime & _begin, QWidget * _parent ); virtual ~timeLine(); - inline song::playPos & pos() + inline Song::playPos & pos() { return( m_pos ); } @@ -162,7 +162,7 @@ private: int m_xOffset; int m_posMarkerX; float m_ppt; - song::playPos & m_pos; + Song::playPos & m_pos; const MidiTime & m_begin; MidiTime m_loopPos[2]; diff --git a/plugins/Amplifier/AmplifierControls.cpp b/plugins/Amplifier/AmplifierControls.cpp index 33996a577..a18d0c5a8 100644 --- a/plugins/Amplifier/AmplifierControls.cpp +++ b/plugins/Amplifier/AmplifierControls.cpp @@ -29,7 +29,7 @@ #include "AmplifierControls.h" #include "Amplifier.h" #include "engine.h" -#include "song.h" +#include "Song.h" AmplifierControls::AmplifierControls( AmplifierEffect* effect ) : diff --git a/plugins/DualFilter/DualFilterControls.cpp b/plugins/DualFilter/DualFilterControls.cpp index 531fc1323..90a0b4792 100644 --- a/plugins/DualFilter/DualFilterControls.cpp +++ b/plugins/DualFilter/DualFilterControls.cpp @@ -29,7 +29,7 @@ #include "DualFilterControls.h" #include "DualFilter.h" #include "engine.h" -#include "song.h" +#include "Song.h" #include "basic_filters.h" #include "embed.h" diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index 414e1c58b..076f21e6d 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -8,7 +8,7 @@ #include "LocalFileMng.h" #include "HydrogenImport.h" -#include "song.h" +#include "Song.h" #include "engine.h" #include "Instrument.h" #include "InstrumentTrack.h" @@ -143,7 +143,7 @@ bool HydrogenImport::readSong() QHash pattern_length; QHash pattern_id; - song *s = engine::getSong(); + Song *s = engine::getSong(); int song_num_tracks = s->tracks().size(); if ( QFile( filename ).exists() == false ) { diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index a5e8476e3..d50770553 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -41,7 +41,7 @@ #include "MidiTime.h" #include "debug.h" #include "embed.h" -#include "song.h" +#include "Song.h" #include "portsmf/allegro.h" diff --git a/plugins/VstEffect/VstEffect.cpp b/plugins/VstEffect/VstEffect.cpp index 718f78e00..8d0462cba 100644 --- a/plugins/VstEffect/VstEffect.cpp +++ b/plugins/VstEffect/VstEffect.cpp @@ -25,7 +25,7 @@ #include #include "VstEffect.h" -#include "song.h" +#include "Song.h" #include "text_float.h" #include "VstSubPluginFeatures.h" diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index e2da3d1e4..b5f4b06ae 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -33,7 +33,7 @@ #include "audio_file_processor.h" #include "engine.h" -#include "song.h" +#include "Song.h" #include "InstrumentTrack.h" #include "NotePlayHandle.h" #include "interpolation.h" diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index 27bb5afb1..3978440ee 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -37,7 +37,7 @@ #include "pixmap_button.h" #include "templates.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "interpolation.h" #include "embed.cpp" diff --git a/plugins/delay/delaycontrols.cpp b/plugins/delay/delaycontrols.cpp index 938b90f05..ecc91e94d 100644 --- a/plugins/delay/delaycontrols.cpp +++ b/plugins/delay/delaycontrols.cpp @@ -27,7 +27,7 @@ #include "delaycontrols.h" #include "delayeffect.h" #include "engine.h" -#include "song.h" +#include "Song.h" DelayControls::DelayControls( DelayEffect* effect ): EffectControls( effect ), diff --git a/plugins/dynamics_processor/dynamics_processor_controls.cpp b/plugins/dynamics_processor/dynamics_processor_controls.cpp index 7298669cf..3a6619853 100644 --- a/plugins/dynamics_processor/dynamics_processor_controls.cpp +++ b/plugins/dynamics_processor/dynamics_processor_controls.cpp @@ -31,7 +31,7 @@ #include "base64.h" #include "graph.h" #include "engine.h" -#include "song.h" +#include "Song.h" #define onedB 1.1220184543019633f diff --git a/plugins/flp_import/FlpImport.cpp b/plugins/flp_import/FlpImport.cpp index 49fff2acd..ff5399544 100644 --- a/plugins/flp_import/FlpImport.cpp +++ b/plugins/flp_import/FlpImport.cpp @@ -52,7 +52,7 @@ #include "Piano.h" #include "ProjectJournal.h" #include "project_notes.h" -#include "song.h" +#include "Song.h" #include "TrackContainer.h" #include "embed.h" #include "lmmsconfig.h" diff --git a/plugins/monstro/Monstro.cpp b/plugins/monstro/Monstro.cpp index 139f0b7d6..e34c36039 100644 --- a/plugins/monstro/Monstro.cpp +++ b/plugins/monstro/Monstro.cpp @@ -31,7 +31,7 @@ #include "templates.h" #include "gui_templates.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "lmms_math.h" #include "interpolation.h" diff --git a/plugins/nes/Nes.cpp b/plugins/nes/Nes.cpp index b32dc25a3..b5ee3f5e2 100644 --- a/plugins/nes/Nes.cpp +++ b/plugins/nes/Nes.cpp @@ -30,7 +30,7 @@ #include "InstrumentTrack.h" #include "templates.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "lmms_math.h" #include "interpolation.h" #include "Oscillator.h" diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index bb9574ea2..8a97fc577 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -35,7 +35,7 @@ #include "InstrumentTrack.h" #include "NotePlayHandle.h" #include "pixmap_button.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "tooltip.h" #include "FileDialog.h" diff --git a/plugins/peak_controller_effect/peak_controller_effect.cpp b/plugins/peak_controller_effect/peak_controller_effect.cpp index 136f22cbe..238006357 100644 --- a/plugins/peak_controller_effect/peak_controller_effect.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect.cpp @@ -25,7 +25,7 @@ #include "Controller.h" -#include "song.h" +#include "Song.h" #include "PeakController.h" #include "peak_controller_effect.h" #include "lmms_math.h" diff --git a/plugins/peak_controller_effect/peak_controller_effect_controls.cpp b/plugins/peak_controller_effect/peak_controller_effect_controls.cpp index 78109366b..c200903ba 100644 --- a/plugins/peak_controller_effect/peak_controller_effect_controls.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect_controls.cpp @@ -30,7 +30,7 @@ #include "peak_controller_effect_controls.h" #include "peak_controller_effect.h" #include "PresetPreviewPlayHandle.h" -#include "song.h" +#include "Song.h" PeakControllerEffectControls:: diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index b6aefc123..9fae191fc 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -35,7 +35,7 @@ #include "InstrumentPlayHandle.h" #include "NotePlayHandle.h" #include "knob.h" -#include "song.h" +#include "Song.h" #include "patches_dialog.h" #include "tooltip.h" diff --git a/plugins/sfxr/sfxr.cpp b/plugins/sfxr/sfxr.cpp index d342a88c1..66d412ff7 100644 --- a/plugins/sfxr/sfxr.cpp +++ b/plugins/sfxr/sfxr.cpp @@ -46,7 +46,7 @@ float frnd(float range) #include "pixmap_button.h" #include "templates.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "MidiEvent.h" #include "MidiTime.h" diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index f2d0f0ed7..248944102 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -37,7 +37,7 @@ #include "string_container.h" #include "templates.h" #include "volume.h" -#include "song.h" +#include "Song.h" #include "embed.cpp" diff --git a/plugins/vst_base/VstPlugin.cpp b/plugins/vst_base/VstPlugin.cpp index 863338070..683e25951 100644 --- a/plugins/vst_base/VstPlugin.cpp +++ b/plugins/vst_base/VstPlugin.cpp @@ -48,7 +48,7 @@ #include "ConfigManager.h" #include "engine.h" #include "MainWindow.h" -#include "song.h" +#include "Song.h" #include "templates.h" #include "FileDialog.h" #include diff --git a/plugins/watsyn/Watsyn.cpp b/plugins/watsyn/Watsyn.cpp index 93bb5b4c3..8deb012a2 100644 --- a/plugins/watsyn/Watsyn.cpp +++ b/plugins/watsyn/Watsyn.cpp @@ -30,7 +30,7 @@ #include "InstrumentTrack.h" #include "templates.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "lmms_math.h" #include "interpolation.h" diff --git a/plugins/waveshaper/waveshaper_controls.cpp b/plugins/waveshaper/waveshaper_controls.cpp index 1a0a3404f..6b612234b 100644 --- a/plugins/waveshaper/waveshaper_controls.cpp +++ b/plugins/waveshaper/waveshaper_controls.cpp @@ -31,7 +31,7 @@ #include "base64.h" #include "graph.h" #include "engine.h" -#include "song.h" +#include "Song.h" #define onedB 1.1220184543019633f diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index ed7d4cf67..d89df1dde 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -34,7 +34,7 @@ #include "AutomationTrack.h" #include "ProjectJournal.h" #include "bb_track_container.h" -#include "song.h" +#include "Song.h" #include "text_float.h" #include "embed.h" diff --git a/src/core/Controller.cpp b/src/core/Controller.cpp index 41f3a54a8..3e1ee0ba5 100644 --- a/src/core/Controller.cpp +++ b/src/core/Controller.cpp @@ -29,7 +29,7 @@ #include -#include "song.h" +#include "Song.h" #include "engine.h" #include "Mixer.h" #include "Controller.h" diff --git a/src/core/ControllerConnection.cpp b/src/core/ControllerConnection.cpp index ff18629e3..7ba723925 100644 --- a/src/core/ControllerConnection.cpp +++ b/src/core/ControllerConnection.cpp @@ -29,7 +29,7 @@ #include -#include "song.h" +#include "Song.h" #include "engine.h" #include "Mixer.h" #include "ControllerConnection.h" diff --git a/src/core/EffectChain.cpp b/src/core/EffectChain.cpp index 708cd9698..f5bd9b95c 100644 --- a/src/core/EffectChain.cpp +++ b/src/core/EffectChain.cpp @@ -32,7 +32,7 @@ #include "debug.h" #include "DummyEffect.h" #include "MixHelpers.h" -#include "song.h" +#include "Song.h" EffectChain::EffectChain( Model * _parent ) : diff --git a/src/core/FxMixer.cpp b/src/core/FxMixer.cpp index e36f1f59d..4b6decb79 100644 --- a/src/core/FxMixer.cpp +++ b/src/core/FxMixer.cpp @@ -28,7 +28,7 @@ #include "MixerWorkerThread.h" #include "MixHelpers.h" #include "Effect.h" -#include "song.h" +#include "Song.h" #include "InstrumentTrack.h" #include "bb_track_container.h" diff --git a/src/core/LfoController.cpp b/src/core/LfoController.cpp index edcb37c7f..f72191496 100644 --- a/src/core/LfoController.cpp +++ b/src/core/LfoController.cpp @@ -29,7 +29,7 @@ #include -#include "song.h" +#include "Song.h" #include "engine.h" #include "Mixer.h" #include "LfoController.h" diff --git a/src/core/Mixer.cpp b/src/core/Mixer.cpp index 2027fed15..0ae8743e1 100644 --- a/src/core/Mixer.cpp +++ b/src/core/Mixer.cpp @@ -28,7 +28,7 @@ #include "FxMixer.h" #include "MixHelpers.h" #include "MixerWorkerThread.h" -#include "song.h" +#include "Song.h" #include "templates.h" #include "EnvelopeAndLfoParameters.h" #include "NotePlayHandle.h" @@ -318,11 +318,11 @@ const surroundSampleFrame * Mixer::renderNextBuffer() { m_profiler.startPeriod(); - static song::playPos last_metro_pos = -1; + static Song::playPos last_metro_pos = -1; - song::playPos p = engine::getSong()->getPlayPos( - song::Mode_PlayPattern ); - if( engine::getSong()->playMode() == song::Mode_PlayPattern && + Song::playPos p = engine::getSong()->getPlayPos( + Song::Mode_PlayPattern ); + if( engine::getSong()->playMode() == Song::Mode_PlayPattern && engine::pianoRoll()->isRecording() == true && p != last_metro_pos ) { diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index 16f7e0ebe..53e277370 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -32,7 +32,7 @@ #include "Instrument.h" #include "MidiEvent.h" #include "MidiPort.h" -#include "song.h" +#include "Song.h" NotePlayHandle::BaseDetuning::BaseDetuning( DetuningHelper *detuning ) : diff --git a/src/core/PeakController.cpp b/src/core/PeakController.cpp index 87ea7a948..af6493048 100644 --- a/src/core/PeakController.cpp +++ b/src/core/PeakController.cpp @@ -30,7 +30,7 @@ #include -#include "song.h" +#include "Song.h" #include "engine.h" #include "Mixer.h" #include "PeakController.h" diff --git a/src/core/ProjectJournal.cpp b/src/core/ProjectJournal.cpp index c04f81d26..662a694b6 100644 --- a/src/core/ProjectJournal.cpp +++ b/src/core/ProjectJournal.cpp @@ -27,7 +27,7 @@ #include "ProjectJournal.h" #include "engine.h" #include "JournallingObject.h" -#include "song.h" +#include "Song.h" const int ProjectJournal::MAX_UNDO_STATES = 100; // TODO: make this configurable in settings diff --git a/src/core/ProjectRenderer.cpp b/src/core/ProjectRenderer.cpp index 41c2655cc..d076cd18a 100644 --- a/src/core/ProjectRenderer.cpp +++ b/src/core/ProjectRenderer.cpp @@ -26,7 +26,7 @@ #include #include "ProjectRenderer.h" -#include "song.h" +#include "Song.h" #include "engine.h" #include "AudioFileWave.h" @@ -161,8 +161,8 @@ void ProjectRenderer::run() engine::getSong()->startExport(); - song::playPos & pp = engine::getSong()->getPlayPos( - song::Mode_PlaySong ); + Song::playPos & pp = engine::getSong()->getPlayPos( + Song::Mode_PlaySong ); m_progress = 0; const int sl = ( engine::getSong()->length() + 1 ) * 192; diff --git a/src/core/song.cpp b/src/core/Song.cpp similarity index 94% rename from src/core/song.cpp rename to src/core/Song.cpp index fb9a52f7f..07d729dc1 100644 --- a/src/core/song.cpp +++ b/src/core/Song.cpp @@ -30,7 +30,7 @@ #include -#include "song.h" +#include "Song.h" #include "AutomationTrack.h" #include "AutomationEditor.h" #include "bb_editor.h" @@ -68,7 +68,7 @@ tick_t MidiTime::s_ticksPerTact = DefaultTicksPerTact; -song::song() : +Song::Song() : TrackContainer(), m_globalAutomationTrack( dynamic_cast( Track::create( Track::HiddenAutomationTrack, @@ -118,7 +118,7 @@ song::song() : -song::~song() +Song::~Song() { m_playing = false; delete m_globalAutomationTrack; @@ -127,7 +127,7 @@ song::~song() -void song::masterVolumeChanged() +void Song::masterVolumeChanged() { engine::mixer()->setMasterGain( m_masterVolumeModel.value() / 100.0f ); @@ -136,7 +136,7 @@ void song::masterVolumeChanged() -void song::setTempo() +void Song::setTempo() { engine::mixer()->lockPlayHandleRemoval(); const bpm_t tempo = (bpm_t) m_tempoModel.value(); @@ -164,7 +164,7 @@ void song::setTempo() -void song::setTimeSignature() +void Song::setTimeSignature() { MidiTime::setTicksPerTact( ticksPerTact() ); emit timeSignatureChanged( m_oldTicksPerTact, ticksPerTact() ); @@ -177,7 +177,7 @@ void song::setTimeSignature() -void song::savePos() +void Song::savePos() { timeLine * tl = m_playPos[m_playMode].m_timeLine; @@ -190,7 +190,7 @@ void song::savePos() -void song::processNextBuffer() +void Song::processNextBuffer() { if( m_playing == false ) { @@ -389,7 +389,7 @@ void song::processNextBuffer() -void song::playSong() +void Song::playSong() { m_recording = false; @@ -412,7 +412,7 @@ void song::playSong() -void song::record() +void Song::record() { m_recording = true; // TODO: Implement @@ -421,7 +421,7 @@ void song::record() -void song::playAndRecord() +void Song::playAndRecord() { playSong(); m_recording = true; @@ -430,7 +430,7 @@ void song::playAndRecord() -void song::playTrack( Track * _trackToPlay ) +void Song::playTrack( Track * _trackToPlay ) { if( isStopped() == false ) { @@ -452,7 +452,7 @@ void song::playTrack( Track * _trackToPlay ) -void song::playBB() +void Song::playBB() { if( isStopped() == false ) { @@ -473,7 +473,7 @@ void song::playBB() -void song::playPattern( Pattern* patternToPlay, bool _loop ) +void Song::playPattern( Pattern* patternToPlay, bool _loop ) { if( isStopped() == false ) { @@ -498,7 +498,7 @@ void song::playPattern( Pattern* patternToPlay, bool _loop ) -void song::updateLength() +void Song::updateLength() { m_length = 0; m_tracksMutex.lockForRead(); @@ -519,7 +519,7 @@ void song::updateLength() -void song::setPlayPos( tick_t _ticks, PlayModes _play_mode ) +void Song::setPlayPos( tick_t _ticks, PlayModes _play_mode ) { m_elapsedTicks += m_playPos[_play_mode].getTicks() - _ticks; m_elapsedMilliSeconds += (((( _ticks - m_playPos[_play_mode].getTicks()))*60*1000/48)/getTempo()); @@ -536,7 +536,7 @@ void song::setPlayPos( tick_t _ticks, PlayModes _play_mode ) -void song::togglePause() +void Song::togglePause() { if( m_paused == true ) { @@ -557,7 +557,7 @@ void song::togglePause() -void song::stop() +void Song::stop() { // do not stop/reset things again if we're stopped already if( m_playMode == Mode_None ) @@ -616,7 +616,7 @@ void song::stop() -void song::startExport() +void Song::startExport() { stop(); @@ -630,7 +630,7 @@ void song::startExport() -void song::stopExport() +void Song::stopExport() { stop(); m_exporting = false; @@ -642,7 +642,7 @@ void song::stopExport() -void song::insertBar() +void Song::insertBar() { m_tracksMutex.lockForRead(); for( TrackList::const_iterator it = tracks().begin(); @@ -656,7 +656,7 @@ void song::insertBar() -void song::removeBar() +void Song::removeBar() { m_tracksMutex.lockForRead(); for( TrackList::const_iterator it = tracks().begin(); @@ -670,7 +670,7 @@ void song::removeBar() -void song::addBBTrack() +void Song::addBBTrack() { Track * t = Track::create( Track::BBTrack, this ); engine::getBBTrackContainer()->setCurrentBB( dynamic_cast( t )->index() ); @@ -679,7 +679,7 @@ void song::addBBTrack() -void song::addSampleTrack() +void Song::addSampleTrack() { (void) Track::create( Track::SampleTrack, this ); } @@ -687,7 +687,7 @@ void song::addSampleTrack() -void song::addAutomationTrack() +void Song::addAutomationTrack() { (void) Track::create( Track::AutomationTrack, this ); } @@ -695,7 +695,7 @@ void song::addAutomationTrack() -bpm_t song::getTempo() +bpm_t Song::getTempo() { return (bpm_t) m_tempoModel.value(); } @@ -703,7 +703,7 @@ bpm_t song::getTempo() -AutomationPattern * song::tempoAutomationPattern() +AutomationPattern * Song::tempoAutomationPattern() { return AutomationPattern::globalAutomationPattern( &m_tempoModel ); } @@ -711,7 +711,7 @@ AutomationPattern * song::tempoAutomationPattern() -void song::clearProject() +void Song::clearProject() { engine::projectJournal()->setJournalling( false ); @@ -793,7 +793,7 @@ void song::clearProject() // create new file -void song::createNewProject() +void Song::createNewProject() { QString default_template = ConfigManager::inst()->userProjectsDir() + "templates/default.mpt"; @@ -858,7 +858,7 @@ void song::createNewProject() -void song::createNewProjectFromTemplate( const QString & _template ) +void Song::createNewProjectFromTemplate( const QString & _template ) { loadProject( _template ); // clear file-name so that user doesn't overwrite template when @@ -876,7 +876,7 @@ void song::createNewProjectFromTemplate( const QString & _template ) // load given song -void song::loadProject( const QString & _file_name ) +void Song::loadProject( const QString & _file_name ) { QDomNode node; @@ -1005,7 +1005,7 @@ void song::loadProject( const QString & _file_name ) // only save current song as _filename and do nothing else -bool song::saveProjectFile( const QString & _filename ) +bool Song::saveProjectFile( const QString & _filename ) { DataFile::LocaleHelper localeHelper( DataFile::LocaleHelper::ModeSave ); @@ -1037,7 +1037,7 @@ bool song::saveProjectFile( const QString & _filename ) // save current song and update the gui -bool song::guiSaveProject() +bool Song::guiSaveProject() { DataFile dataFile( DataFile::SongProject ); m_fileName = dataFile.nameWithExtension( m_fileName ); @@ -1068,7 +1068,7 @@ bool song::guiSaveProject() // save current song in given filename -bool song::guiSaveProjectAs( const QString & _file_name ) +bool Song::guiSaveProjectAs( const QString & _file_name ) { QString o = m_oldFileName; m_oldFileName = m_fileName; @@ -1086,7 +1086,7 @@ bool song::guiSaveProjectAs( const QString & _file_name ) -void song::importProject() +void Song::importProject() { FileDialog ofd( NULL, tr( "Import file" ), ConfigManager::inst()->userProjectsDir(), @@ -1109,7 +1109,7 @@ void song::importProject() -void song::saveControllerStates( QDomDocument & _doc, QDomElement & _this ) +void Song::saveControllerStates( QDomDocument & _doc, QDomElement & _this ) { // save settings of controllers QDomElement controllersNode =_doc.createElement( "controllers" ); @@ -1123,7 +1123,7 @@ void song::saveControllerStates( QDomDocument & _doc, QDomElement & _this ) -void song::restoreControllerStates( const QDomElement & _this ) +void Song::restoreControllerStates( const QDomElement & _this ) { QDomNode node = _this.firstChild(); while( !node.isNull() ) @@ -1144,12 +1144,12 @@ void song::restoreControllerStates( const QDomElement & _this ) } -void song::exportProjectTracks() +void Song::exportProjectTracks() { exportProject(true); } -void song::exportProject(bool multiExport) +void Song::exportProject(bool multiExport) { if( isEmpty() ) { @@ -1229,7 +1229,7 @@ void song::exportProject(bool multiExport) -void song::updateFramesPerTick() +void Song::updateFramesPerTick() { engine::updateFramesPerTick(); } @@ -1237,7 +1237,7 @@ void song::updateFramesPerTick() -void song::setModified() +void Song::setModified() { if( !m_loadingProject ) { @@ -1253,7 +1253,7 @@ void song::setModified() -void song::addController( Controller * _c ) +void Song::addController( Controller * _c ) { if( _c != NULL && !m_controllers.contains( _c ) ) { @@ -1265,7 +1265,7 @@ void song::addController( Controller * _c ) -void song::removeController( Controller * _controller ) +void Song::removeController( Controller * _controller ) { int index = m_controllers.indexOf( _controller ); if( index != -1 ) diff --git a/src/core/TempoSyncKnobModel.cpp b/src/core/TempoSyncKnobModel.cpp index 03cdb0f4c..7d6235898 100644 --- a/src/core/TempoSyncKnobModel.cpp +++ b/src/core/TempoSyncKnobModel.cpp @@ -28,7 +28,7 @@ #include "TempoSyncKnobModel.h" #include "engine.h" -#include "song.h" +#include "Song.h" TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min, diff --git a/src/core/Track.cpp b/src/core/Track.cpp index db8d2d3f9..fdb70f2ea 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -63,7 +63,7 @@ #include "pixmap_button.h" #include "ProjectJournal.h" #include "SampleTrack.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "templates.h" #include "text_float.h" diff --git a/src/core/TrackContainer.cpp b/src/core/TrackContainer.cpp index c2027198c..fb529d159 100644 --- a/src/core/TrackContainer.cpp +++ b/src/core/TrackContainer.cpp @@ -32,7 +32,7 @@ #include "InstrumentTrack.h" #include "engine.h" #include "MainWindow.h" -#include "song.h" +#include "Song.h" TrackContainer::TrackContainer() : diff --git a/src/core/bb_track_container.cpp b/src/core/bb_track_container.cpp index f876f93fb..56015add1 100644 --- a/src/core/bb_track_container.cpp +++ b/src/core/bb_track_container.cpp @@ -28,7 +28,7 @@ #include "combobox.h" #include "embed.h" #include "engine.h" -#include "song.h" +#include "Song.h" @@ -182,7 +182,7 @@ void bbTrackContainer::fixIncorrectPositions() void bbTrackContainer::play() { - if( engine::getSong()->playMode() != song::Mode_PlayBB ) + if( engine::getSong()->playMode() != Song::Mode_PlayBB ) { engine::getSong()->playBB(); } diff --git a/src/core/engine.cpp b/src/core/engine.cpp index 39f7c38fe..e281972ec 100644 --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -42,7 +42,7 @@ #include "project_notes.h" #include "Plugin.h" #include "SongEditor.h" -#include "song.h" +#include "Song.h" #include "BandLimitedWave.h" @@ -54,7 +54,7 @@ FxMixer * engine::s_fxMixer = NULL; FxMixerView * engine::s_fxMixerView = NULL; MainWindow * engine::s_mainWindow = NULL; bbTrackContainer * engine::s_bbTrackContainer = NULL; -song * engine::s_song = NULL; +Song * engine::s_song = NULL; SongEditor* engine::s_songEditor = NULL; AutomationEditor * engine::s_automationEditor = NULL; bbEditor * engine::s_bbEditor = NULL; @@ -80,7 +80,7 @@ void engine::init( const bool _has_gui ) s_projectJournal = new ProjectJournal; s_mixer = new Mixer; - s_song = new song; + s_song = new Song; s_fxMixer = new FxMixer; s_bbTrackContainer = new bbTrackContainer; diff --git a/src/core/main.cpp b/src/core/main.cpp index dd95eaf64..5f303bba3 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -74,7 +74,7 @@ #include "MainWindow.h" #include "ProjectRenderer.h" #include "DataFile.h" -#include "song.h" +#include "Song.h" #include "LmmsPalette.h" static inline QString baseName( const QString & _file ) diff --git a/src/core/midi/MidiAlsaSeq.cpp b/src/core/midi/MidiAlsaSeq.cpp index 466afe5f8..7dec9e676 100644 --- a/src/core/midi/MidiAlsaSeq.cpp +++ b/src/core/midi/MidiAlsaSeq.cpp @@ -29,7 +29,7 @@ #include "ConfigManager.h" #include "engine.h" #include "gui_templates.h" -#include "song.h" +#include "Song.h" #include "MidiPort.h" #include "MidiTime.h" #include "note.h" diff --git a/src/core/midi/MidiController.cpp b/src/core/midi/MidiController.cpp index 7ed471fa4..99e846016 100644 --- a/src/core/midi/MidiController.cpp +++ b/src/core/midi/MidiController.cpp @@ -27,7 +27,7 @@ #include #include -#include "song.h" +#include "Song.h" #include "engine.h" #include "Mixer.h" #include "MidiClient.h" diff --git a/src/core/midi/MidiPort.cpp b/src/core/midi/MidiPort.cpp index 60d35b9ec..5219bbf0a 100644 --- a/src/core/midi/MidiPort.cpp +++ b/src/core/midi/MidiPort.cpp @@ -27,7 +27,7 @@ #include "MidiPort.h" #include "MidiClient.h" -#include "song.h" +#include "Song.h" diff --git a/src/core/timeline.cpp b/src/core/timeline.cpp index ad8cdc331..90a1dcde8 100644 --- a/src/core/timeline.cpp +++ b/src/core/timeline.cpp @@ -51,7 +51,7 @@ QPixmap * timeLine::s_loopPointBeginPixmap = NULL; QPixmap * timeLine::s_loopPointEndPixmap = NULL; timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt, - song::playPos & _pos, const MidiTime & _begin, + Song::playPos & _pos, const MidiTime & _begin, QWidget * _parent ) : QWidget( _parent ), m_autoScroll( AutoScrollEnabled ), diff --git a/src/gui/AutomationEditor.cpp b/src/gui/AutomationEditor.cpp index 2e2c32423..da5ca6ce9 100644 --- a/src/gui/AutomationEditor.cpp +++ b/src/gui/AutomationEditor.cpp @@ -134,7 +134,7 @@ AutomationEditor::AutomationEditor() : // add time-line m_timeLine = new timeLine( VALUES_WIDTH, 32, m_ppt, engine::getSong()->getPlayPos( - song::Mode_PlayAutomationPattern ), + Song::Mode_PlayAutomationPattern ), m_currentPosition, this ); connect( this, SIGNAL( positionChanged( const MidiTime & ) ), m_timeLine, SLOT( updatePosition( const MidiTime & ) ) ); @@ -1819,7 +1819,7 @@ void AutomationEditor::resizeEvent( QResizeEvent * ) if( engine::getSong() ) { - engine::getSong()->getPlayPos( song::Mode_PlayAutomationPattern + engine::getSong()->getPlayPos( Song::Mode_PlayAutomationPattern ).m_timeLine->setFixedWidth( width() ); } m_toolBar->setFixedWidth( width() ); @@ -1931,7 +1931,7 @@ void AutomationEditor::play() if( !m_pattern->getTrack() ) { - if( engine::getSong()->playMode() != song::Mode_PlayPattern ) + if( engine::getSong()->playMode() != Song::Mode_PlayPattern ) { engine::getSong()->stop(); engine::getSong()->playPattern( (Pattern *) engine::pianoRoll()->currentPattern() ); @@ -2309,7 +2309,7 @@ void AutomationEditor::updatePosition( const MidiTime & _t ) { if( ( engine::getSong()->isPlaying() && engine::getSong()->playMode() == - song::Mode_PlayAutomationPattern ) || + Song::Mode_PlayAutomationPattern ) || m_scrollBack == true ) { const int w = width() - VALUES_WIDTH; diff --git a/src/gui/ControllerConnectionDialog.cpp b/src/gui/ControllerConnectionDialog.cpp index 36d7d78ef..35f42df97 100644 --- a/src/gui/ControllerConnectionDialog.cpp +++ b/src/gui/ControllerConnectionDialog.cpp @@ -39,7 +39,7 @@ #include "combobox.h" #include "tab_widget.h" #include "group_box.h" -#include "song.h" +#include "Song.h" #include "tool_button.h" #include "gui_templates.h" diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index 34e34073b..6895233b1 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -46,7 +46,7 @@ #include "DataFile.h" #include "PresetPreviewPlayHandle.h" #include "SamplePlayHandle.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "text_float.h" diff --git a/src/gui/FxMixerView.cpp b/src/gui/FxMixerView.cpp index d17f63f6a..0e2463380 100644 --- a/src/gui/FxMixerView.cpp +++ b/src/gui/FxMixerView.cpp @@ -44,7 +44,7 @@ #include "MainWindow.h" #include "gui_templates.h" #include "InstrumentTrack.h" -#include "song.h" +#include "Song.h" #include "bb_track_container.h" FxMixerView::FxMixerView() : diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index ec266e55d..9df27df61 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -39,7 +39,7 @@ #include "MainWindow.h" #include "bb_editor.h" #include "SongEditor.h" -#include "song.h" +#include "Song.h" #include "PianoRoll.h" #include "embed.h" #include "engine.h" @@ -957,19 +957,19 @@ void MainWindow::updatePlayPauseIcons() { switch( engine::getSong()->playMode() ) { - case song::Mode_PlaySong: + case Song::Mode_PlaySong: engine::songEditor()->setPauseIcon( true ); break; - case song::Mode_PlayAutomationPattern: + case Song::Mode_PlayAutomationPattern: engine::automationEditor()->setPauseIcon( true ); break; - case song::Mode_PlayBB: + case Song::Mode_PlayBB: engine::getBBEditor()->setPauseIcon( true ); break; - case song::Mode_PlayPattern: + case Song::Mode_PlayPattern: engine::pianoRoll()->setPauseIcon( true ); break; diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 06bbd00c5..543c4ed19 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -61,7 +61,7 @@ #include "Pattern.h" #include "Piano.h" #include "pixmap_button.h" -#include "song.h" +#include "Song.h" #include "SongEditor.h" #include "templates.h" #include "text_float.h" @@ -293,7 +293,7 @@ PianoRoll::PianoRoll() : // add time-line m_timeLine = new timeLine( WHITE_KEY_WIDTH, 32, m_ppt, engine::getSong()->getPlayPos( - song::Mode_PlayPattern ), + Song::Mode_PlayPattern ), m_currentPosition, this ); connect( this, SIGNAL( positionChanged( const MidiTime & ) ), m_timeLine, SLOT( updatePosition( const MidiTime & ) ) ); @@ -301,12 +301,12 @@ PianoRoll::PianoRoll() : this, SLOT( updatePosition( const MidiTime & ) ) ); // update timeline when in record-accompany mode - connect( engine::getSong()->getPlayPos( song::Mode_PlaySong ).m_timeLine, + connect( engine::getSong()->getPlayPos( Song::Mode_PlaySong ).m_timeLine, SIGNAL( positionChanged( const MidiTime & ) ), this, SLOT( updatePositionAccompany( const MidiTime & ) ) ); // TODO -/* connect( engine::getSong()->getPlayPos( song::Mode_PlayBB ).m_timeLine, +/* connect( engine::getSong()->getPlayPos( Song::Mode_PlayBB ).m_timeLine, SIGNAL( positionChanged( const MidiTime & ) ), this, SLOT( updatePositionAccompany( const MidiTime & ) ) );*/ @@ -796,7 +796,7 @@ void PianoRoll::setCurrentPattern( Pattern* newPattern ) // force the song-editor to stop playing if it played pattern before if( engine::getSong()->isPlaying() && - engine::getSong()->playMode() == song::Mode_PlayPattern ) + engine::getSong()->playMode() == Song::Mode_PlayPattern ) { engine::getSong()->playPattern( NULL ); } @@ -3482,7 +3482,7 @@ void PianoRoll::resizeEvent( QResizeEvent * ) } m_topBottomScroll->setValue( m_totalKeysToScroll - m_startKey ); - engine::getSong()->getPlayPos( song::Mode_PlayPattern + engine::getSong()->getPlayPos( Song::Mode_PlayPattern ).m_timeLine->setFixedWidth( width() ); m_toolBar->setFixedWidth( width() ); update(); @@ -3649,14 +3649,14 @@ int PianoRoll::getKey( int _y ) const -song::PlayModes PianoRoll::desiredPlayModeForAccompany() const +Song::PlayModes PianoRoll::desiredPlayModeForAccompany() const { if( m_pattern->getTrack()->trackContainer() == engine::getBBTrackContainer() ) { - return song::Mode_PlayBB; + return Song::Mode_PlayBB; } - return song::Mode_PlaySong; + return Song::Mode_PlaySong; } @@ -3669,7 +3669,7 @@ void PianoRoll::play() return; } - if( engine::getSong()->playMode() != song::Mode_PlayPattern ) + if( engine::getSong()->playMode() != Song::Mode_PlayPattern ) { engine::getSong()->playPattern( m_pattern ); } @@ -3745,10 +3745,10 @@ void PianoRoll::startRecordNote( const note & _n ) ( engine::getSong()->playMode() == desiredPlayModeForAccompany() || engine::getSong()->playMode() == - song::Mode_PlayPattern ) ) + Song::Mode_PlayPattern ) ) { MidiTime sub; - if( engine::getSong()->playMode() == song::Mode_PlaySong ) + if( engine::getSong()->playMode() == Song::Mode_PlaySong ) { sub = m_pattern->startPosition(); } @@ -3772,7 +3772,7 @@ void PianoRoll::finishRecordNote( const note & _n ) ( engine::getSong()->playMode() == desiredPlayModeForAccompany() || engine::getSong()->playMode() == - song::Mode_PlayPattern ) ) + Song::Mode_PlayPattern ) ) { for( QList::Iterator it = m_recordingNotes.begin(); it != m_recordingNotes.end(); ++it ) @@ -4165,7 +4165,7 @@ void PianoRoll::updatePosition( const MidiTime & _t ) { if( ( engine::getSong()->isPlaying() && engine::getSong()->playMode() == - song::Mode_PlayPattern && + Song::Mode_PlayPattern && m_timeLine->autoScroll() == timeLine::AutoScrollEnabled ) || m_scrollBack == true ) { @@ -4178,19 +4178,19 @@ void PianoRoll::updatePosition( const MidiTime & _t ) void PianoRoll::updatePositionAccompany( const MidiTime & _t ) { - song * s = engine::getSong(); + Song * s = engine::getSong(); if( m_recording && hasValidPattern() && - s->playMode() != song::Mode_PlayPattern ) + s->playMode() != Song::Mode_PlayPattern ) { MidiTime pos = _t; - if( s->playMode() != song::Mode_PlayBB ) + if( s->playMode() != Song::Mode_PlayBB ) { pos -= m_pattern->startPosition(); } if( (int) pos > 0 ) { - s->getPlayPos( song::Mode_PlayPattern ).setTicks( pos ); + s->getPlayPos( Song::Mode_PlayPattern ).setTicks( pos ); autoScroll( pos ); } } diff --git a/src/gui/SongEditor.cpp b/src/gui/SongEditor.cpp index 5ec475cd2..194b2ed0d 100644 --- a/src/gui/SongEditor.cpp +++ b/src/gui/SongEditor.cpp @@ -74,9 +74,9 @@ void positionLine::paintEvent( QPaintEvent * _pe ) -SongEditor::SongEditor( song * _song ) : +SongEditor::SongEditor( Song * _song ) : TrackContainerView( _song ), - m_s( _song ), + m_song( _song ), m_scrollBack( false ), m_smoothScroll( ConfigManager::inst()->value( "ui", "smoothscroll" ).toInt() ) { @@ -93,10 +93,10 @@ SongEditor::SongEditor( song * _song ) : DEFAULT_SETTINGS_WIDGET_WIDTH + TRACK_OP_WIDTH; m_timeLine = new timeLine( widgetTotal, 32, pixelsPerTact(), - m_s->m_playPos[song::Mode_PlaySong], + m_song->m_playPos[Song::Mode_PlaySong], m_currentPosition, this ); connect( this, SIGNAL( positionChanged( const MidiTime & ) ), - m_s->m_playPos[song::Mode_PlaySong].m_timeLine, + m_song->m_playPos[Song::Mode_PlaySong].m_timeLine, SLOT( updatePosition( const MidiTime & ) ) ); connect( m_timeLine, SIGNAL( positionChanged( const MidiTime & ) ), this, SLOT( updatePosition( const MidiTime & ) ) ); @@ -105,7 +105,7 @@ SongEditor::SongEditor( song * _song ) : // let's get notified when loading a project - connect( m_s, SIGNAL( projectLoaded() ), + connect( m_song, SIGNAL( projectLoaded() ), this, SLOT( adjustUiAfterProjectLoad() ) ); @@ -115,7 +115,7 @@ SongEditor::SongEditor( song * _song ) : engine::mainWindow()->addSpacingToToolBar( 10 ); m_tempoSpinBox = new LcdSpinBox( 3, tb, tr( "Tempo" ) ); - m_tempoSpinBox->setModel( &m_s->m_tempoModel ); + m_tempoSpinBox->setModel( &m_song->m_tempoModel ); m_tempoSpinBox->setLabel( tr( "TEMPO/BPM" ) ); toolTip::add( m_tempoSpinBox, tr( "tempo of song" ) ); @@ -145,7 +145,7 @@ SongEditor::SongEditor( song * _song ) : engine::mainWindow()->addSpacingToToolBar( 10 ); m_timeSigDisplay = new MeterDialog( this, true ); - m_timeSigDisplay->setModel( &m_s->m_timeSigModel ); + m_timeSigDisplay->setModel( &m_song->m_timeSigModel ); engine::mainWindow()->addWidgetToToolBar( m_timeSigDisplay ); engine::mainWindow()->addSpacingToToolBar( 10 ); @@ -156,7 +156,7 @@ SongEditor::SongEditor( song * _song ) : m_masterVolumeSlider = new automatableSlider( tb, tr( "Master volume" ) ); - m_masterVolumeSlider->setModel( &m_s->m_masterVolumeModel ); + m_masterVolumeSlider->setModel( &m_song->m_masterVolumeModel ); m_masterVolumeSlider->setOrientation( Qt::Vertical ); m_masterVolumeSlider->setPageStep( 1 ); m_masterVolumeSlider->setTickPosition( QSlider::TicksLeft ); @@ -189,7 +189,7 @@ SongEditor::SongEditor( song * _song ) : master_pitch_lbl->setFixedHeight( 64 ); m_masterPitchSlider = new automatableSlider( tb, tr( "Master pitch" ) ); - m_masterPitchSlider->setModel( &m_s->m_masterPitchModel ); + m_masterPitchSlider->setModel( &m_song->m_masterPitchModel ); m_masterPitchSlider->setOrientation( Qt::Vertical ); m_masterPitchSlider->setPageStep( 1 ); m_masterPitchSlider->setTickPosition( QSlider::TicksLeft ); @@ -283,19 +283,19 @@ SongEditor::SongEditor( song * _song ) : m_addBBTrackButton = new toolButton( embed::getIconPixmap( "add_bb_track" ), tr( "Add beat/bassline" ), - m_s, SLOT( addBBTrack() ), + m_song, SLOT( addBBTrack() ), m_toolBar ); m_addSampleTrackButton = new toolButton( embed::getIconPixmap( "add_sample_track" ), tr( "Add sample-track" ), - m_s, SLOT( addSampleTrack() ), + m_song, SLOT( addSampleTrack() ), m_toolBar ); m_addAutomationTrackButton = new toolButton( embed::getIconPixmap( "add_automation" ), tr( "Add automation-track" ), - m_s, SLOT( addAutomationTrack() ), + m_song, SLOT( addAutomationTrack() ), m_toolBar ); m_drawModeButton = new toolButton( embed::getIconPixmap( @@ -386,7 +386,7 @@ SongEditor::SongEditor( song * _song ) : static_cast( layout() )->addWidget( m_leftRightScroll ); connect( m_leftRightScroll, SIGNAL( valueChanged( int ) ), this, SLOT( scrolled( int ) ) ); - connect( m_s, SIGNAL( lengthChanged( int ) ), + connect( m_song, SIGNAL( lengthChanged( int ) ), this, SLOT( updateScrollBar( int ) ) ); @@ -443,7 +443,7 @@ void SongEditor::setPauseIcon( bool pause ) void SongEditor::play() { - if( engine::getSong()->playMode() != song::Mode_PlaySong ) + if( engine::getSong()->playMode() != Song::Mode_PlaySong ) { engine::getSong()->playSong(); } @@ -458,7 +458,7 @@ void SongEditor::play() void SongEditor::record() { - m_s->record(); + m_song->record(); } @@ -466,7 +466,7 @@ void SongEditor::record() void SongEditor::recordAccompany() { - m_s->playAndRecord(); + m_song->playAndRecord(); } @@ -474,7 +474,7 @@ void SongEditor::recordAccompany() void SongEditor::stop() { - m_s->stop(); + m_song->stop(); engine::pianoRoll()->stopRecording(); } @@ -487,33 +487,33 @@ void SongEditor::keyPressEvent( QKeyEvent * _ke ) engine::mainWindow()->isShiftPressed() == true && _ke->key() == Qt::Key_Insert ) { - m_s->insertBar(); + m_song->insertBar(); } else if(/* _ke->modifiers() & Qt::ShiftModifier &&*/ engine::mainWindow()->isShiftPressed() == true && _ke->key() == Qt::Key_Delete ) { - m_s->removeBar(); + m_song->removeBar(); } else if( _ke->key() == Qt::Key_Left ) { - tick_t t = m_s->currentTick() - MidiTime::ticksPerTact(); + tick_t t = m_song->currentTick() - MidiTime::ticksPerTact(); if( t >= 0 ) { - m_s->setPlayPos( t, song::Mode_PlaySong ); + m_song->setPlayPos( t, Song::Mode_PlaySong ); } } else if( _ke->key() == Qt::Key_Right ) { - tick_t t = m_s->currentTick() + MidiTime::ticksPerTact(); + tick_t t = m_song->currentTick() + MidiTime::ticksPerTact(); if( t < MaxSongLength ) { - m_s->setPlayPos( t, song::Mode_PlaySong ); + m_song->setPlayPos( t, Song::Mode_PlaySong ); } } else if( _ke->key() == Qt::Key_Space ) { - if( m_s->isPlaying() ) + if( m_song->isPlaying() ) { stop(); } @@ -524,7 +524,7 @@ void SongEditor::keyPressEvent( QKeyEvent * _ke ) } else if( _ke->key() == Qt::Key_Home ) { - m_s->setPlayPos( 0, song::Mode_PlaySong ); + m_song->setPlayPos( 0, Song::Mode_PlaySong ); } else { @@ -556,7 +556,7 @@ void SongEditor::wheelEvent( QWheelEvent * _we ) 100 / DEFAULT_PIXELS_PER_TACT ) ) + "%" ) ); // update timeline - m_s->m_playPos[song::Mode_PlaySong].m_timeLine-> + m_song->m_playPos[Song::Mode_PlaySong].m_timeLine-> setPixelsPerTact( pixelsPerTact() ); // and make sure, all TCO's are resized and relocated realignTracks(); @@ -580,7 +580,7 @@ void SongEditor::wheelEvent( QWheelEvent * _we ) void SongEditor::masterVolumeChanged( int _new_val ) { masterVolumeMoved( _new_val ); - if( m_mvsStatus->isVisible() == false && m_s->m_loadingProject == false + if( m_mvsStatus->isVisible() == false && m_song->m_loadingProject == false && m_masterVolumeSlider->showStatus() ) { m_mvsStatus->moveGlobal( m_masterVolumeSlider, @@ -598,7 +598,7 @@ void SongEditor::masterVolumePressed( void ) m_mvsStatus->moveGlobal( m_masterVolumeSlider, QPoint( m_masterVolumeSlider->width() + 2, -2 ) ); m_mvsStatus->show(); - masterVolumeMoved( m_s->m_masterVolumeModel.value() ); + masterVolumeMoved( m_song->m_masterVolumeModel.value() ); } @@ -623,7 +623,7 @@ void SongEditor::masterVolumeReleased( void ) void SongEditor::masterPitchChanged( int _new_val ) { masterPitchMoved( _new_val ); - if( m_mpsStatus->isVisible() == false && m_s->m_loadingProject == false + if( m_mpsStatus->isVisible() == false && m_song->m_loadingProject == false && m_masterPitchSlider->showStatus() ) { m_mpsStatus->moveGlobal( m_masterPitchSlider, @@ -640,7 +640,7 @@ void SongEditor::masterPitchPressed( void ) m_mpsStatus->moveGlobal( m_masterPitchSlider, QPoint( m_masterPitchSlider->width() + 2, -2 ) ); m_mpsStatus->show(); - masterPitchMoved( m_s->m_masterPitchModel.value() ); + masterPitchMoved( m_song->m_masterPitchModel.value() ); } @@ -716,7 +716,7 @@ void SongEditor::updatePosition( const MidiTime & _t ) trackOpWidth = TRACK_OP_WIDTH; } - if( ( m_s->isPlaying() && m_s->m_playMode == song::Mode_PlaySong + if( ( m_song->isPlaying() && m_song->m_playMode == Song::Mode_PlaySong && m_timeLine->autoScroll() == timeLine::AutoScrollEnabled) || m_scrollBack == true ) { @@ -739,7 +739,7 @@ void SongEditor::updatePosition( const MidiTime & _t ) m_scrollBack = false; } - const int x = m_s->m_playPos[song::Mode_PlaySong].m_timeLine-> + const int x = m_song->m_playPos[Song::Mode_PlaySong].m_timeLine-> markerX( _t ) + 8; if( x >= trackOpWidth + widgetWidth -1 ) { @@ -762,7 +762,7 @@ void SongEditor::zoomingChanged() const QString & zfac = m_zoomingComboBox->model()->currentText(); setPixelsPerTact( zfac.left( zfac.length() - 1 ).toInt() * DEFAULT_PIXELS_PER_TACT / 100 ); - m_s->m_playPos[song::Mode_PlaySong].m_timeLine-> + m_song->m_playPos[Song::Mode_PlaySong].m_timeLine-> setPixelsPerTact( pixelsPerTact() ); realignTracks(); } diff --git a/src/gui/TrackContainerView.cpp b/src/gui/TrackContainerView.cpp index 6ffb8b1cf..79a36aa5e 100644 --- a/src/gui/TrackContainerView.cpp +++ b/src/gui/TrackContainerView.cpp @@ -42,7 +42,7 @@ #include "InstrumentTrack.h" #include "DataFile.h" #include "rubberband.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "Track.h" diff --git a/src/gui/bb_editor.cpp b/src/gui/bb_editor.cpp index 654af2fe1..de1c1b946 100644 --- a/src/gui/bb_editor.cpp +++ b/src/gui/bb_editor.cpp @@ -32,7 +32,7 @@ #include "bb_track_container.h" #include "embed.h" #include "MainWindow.h" -#include "song.h" +#include "Song.h" #include "tool_button.h" #include "ConfigManager.h" #include "DataFile.h" @@ -209,7 +209,7 @@ void bbEditor::setPauseIcon( bool pause ) void bbEditor::play() { - if( engine::getSong()->playMode() != song::Mode_PlayBB ) + if( engine::getSong()->playMode() != Song::Mode_PlayBB ) { engine::getSong()->playBB(); } diff --git a/src/gui/export_project_dialog.cpp b/src/gui/export_project_dialog.cpp index 2ee53c2cd..6965160d0 100644 --- a/src/gui/export_project_dialog.cpp +++ b/src/gui/export_project_dialog.cpp @@ -27,7 +27,7 @@ #include #include "export_project_dialog.h" -#include "song.h" +#include "Song.h" #include "engine.h" #include "MainWindow.h" #include "bb_track_container.h" diff --git a/src/gui/widgets/ControllerRackView.cpp b/src/gui/widgets/ControllerRackView.cpp index 5648ab498..906fe7e48 100644 --- a/src/gui/widgets/ControllerRackView.cpp +++ b/src/gui/widgets/ControllerRackView.cpp @@ -32,7 +32,7 @@ #include #include -#include "song.h" +#include "Song.h" #include "embed.h" #include "MainWindow.h" #include "group_box.h" @@ -148,7 +148,7 @@ void ControllerRackView::deleteController( ControllerView * _view ) void ControllerRackView::update() { QWidget * w = m_scrollArea->widget(); - song * s = engine::getSong(); + Song * s = engine::getSong(); setUpdatesEnabled( false ); diff --git a/src/gui/widgets/TimeDisplayWidget.cpp b/src/gui/widgets/TimeDisplayWidget.cpp index 2a2fe2642..66c243bc9 100644 --- a/src/gui/widgets/TimeDisplayWidget.cpp +++ b/src/gui/widgets/TimeDisplayWidget.cpp @@ -28,7 +28,7 @@ #include "MainWindow.h" #include "engine.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" @@ -95,7 +95,7 @@ void TimeDisplayWidget::setDisplayMode( DisplayMode displayMode ) void TimeDisplayWidget::updateTime() { - song* s = engine::getSong(); + Song* s = engine::getSong(); switch( m_displayMode ) { diff --git a/src/gui/widgets/knob.cpp b/src/gui/widgets/knob.cpp index b1a16f55f..4302fb099 100644 --- a/src/gui/widgets/knob.cpp +++ b/src/gui/widgets/knob.cpp @@ -45,7 +45,7 @@ #include "gui_templates.h" #include "MainWindow.h" #include "ProjectJournal.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "templates.h" #include "text_float.h" diff --git a/src/gui/widgets/project_notes.cpp b/src/gui/widgets/project_notes.cpp index 6ffa6d847..81383ad4c 100644 --- a/src/gui/widgets/project_notes.cpp +++ b/src/gui/widgets/project_notes.cpp @@ -40,7 +40,7 @@ #include "embed.h" #include "engine.h" #include "MainWindow.h" -#include "song.h" +#include "Song.h" diff --git a/src/gui/widgets/tempo_sync_knob.cpp b/src/gui/widgets/tempo_sync_knob.cpp index 1131ba441..94365b1e9 100644 --- a/src/gui/widgets/tempo_sync_knob.cpp +++ b/src/gui/widgets/tempo_sync_knob.cpp @@ -32,7 +32,7 @@ #include "embed.h" #include "MainWindow.h" #include "MeterDialog.h" -#include "song.h" +#include "Song.h" diff --git a/src/gui/widgets/visualization_widget.cpp b/src/gui/widgets/visualization_widget.cpp index a5712d3b9..0d3fac3cf 100644 --- a/src/gui/widgets/visualization_widget.cpp +++ b/src/gui/widgets/visualization_widget.cpp @@ -32,7 +32,7 @@ #include "embed.h" #include "engine.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "ConfigManager.h" diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 718fbaefc..1ac7fd15f 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -71,7 +71,7 @@ #include "Pattern.h" #include "PluginView.h" #include "SamplePlayHandle.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "tab_widget.h" #include "tooltip.h" diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index 3d31a1951..95223d7c8 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -44,7 +44,7 @@ #include "rename_dialog.h" #include "SampleBuffer.h" #include "AudioSampleRecorder.h" -#include "song.h" +#include "Song.h" #include "tooltip.h" #include "bb_track_container.h" #include "string_pair_drag.h" diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index 20114a8ad..959b02a96 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -34,7 +34,7 @@ #include "gui_templates.h" #include "SampleTrack.h" -#include "song.h" +#include "Song.h" #include "embed.h" #include "engine.h" #include "tooltip.h" diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp index 19c1c97d9..f04d2a3ff 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/bb_track.cpp @@ -36,7 +36,7 @@ #include "MainWindow.h" #include "Mixer.h" #include "rename_dialog.h" -#include "song.h" +#include "Song.h" #include "SongEditor.h" #include "templates.h" #include "track_label_button.h"