Rename song to Song
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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 <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -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
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#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];
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "AmplifierControls.h"
|
||||
#include "Amplifier.h"
|
||||
#include "engine.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
AmplifierControls::AmplifierControls( AmplifierEffect* effect ) :
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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<QString, int> pattern_length;
|
||||
QHash<QString, int> pattern_id;
|
||||
|
||||
song *s = engine::getSong();
|
||||
Song *s = engine::getSong();
|
||||
int song_num_tracks = s->tracks().size();
|
||||
if ( QFile( filename ).exists() == false )
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "MidiTime.h"
|
||||
#include "debug.h"
|
||||
#include "embed.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
#include "portsmf/allegro.h"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "VstEffect.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
#include "text_float.h"
|
||||
#include "VstSubPluginFeatures.h"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 ),
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "base64.h"
|
||||
#include "graph.h"
|
||||
#include "engine.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
#define onedB 1.1220184543019633f
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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::
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "string_container.h"
|
||||
#include "templates.h"
|
||||
#include "volume.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
#include "embed.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 <QLayout>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "base64.h"
|
||||
#include "graph.h"
|
||||
#include "engine.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
#define onedB 1.1220184543019633f
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <QVector>
|
||||
|
||||
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "Controller.h"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <QVector>
|
||||
|
||||
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "ControllerConnection.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "debug.h"
|
||||
#include "DummyEffect.h"
|
||||
#include "MixHelpers.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
EffectChain::EffectChain( Model * _parent ) :
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <QVector>
|
||||
|
||||
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "LfoController.h"
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "Instrument.h"
|
||||
#include "MidiEvent.h"
|
||||
#include "MidiPort.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
NotePlayHandle::BaseDetuning::BaseDetuning( DetuningHelper *detuning ) :
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "PeakController.h"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QFile>
|
||||
|
||||
#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;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#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<AutomationTrack *>(
|
||||
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<bbTrack *>( 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 )
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "TempoSyncKnobModel.h"
|
||||
#include "engine.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min,
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "InstrumentTrack.h"
|
||||
#include "engine.h"
|
||||
#include "MainWindow.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
TrackContainer::TrackContainer() :
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <QObject>
|
||||
#include <QVector>
|
||||
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "MidiClient.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "MidiPort.h"
|
||||
#include "MidiClient.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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 ),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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() :
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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<note>::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 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<QVBoxLayout *>( 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();
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "export_project_dialog.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "MainWindow.h"
|
||||
#include "bb_track_container.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <QMdiArea>
|
||||
#include <QMessageBox>
|
||||
|
||||
#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 );
|
||||
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "MainWindow.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "embed.h"
|
||||
#include "MainWindow.h"
|
||||
#include "MeterDialog.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "tooltip.h"
|
||||
#include "song.h"
|
||||
#include "Song.h"
|
||||
|
||||
#include "ConfigManager.h"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user