101 void collectError(
const QString error );
103 QString errorSummary();
105 void processNextBuffer();
196 bool isExportDone()
const;
197 int getExportProgress()
const;
250 void createNewProject();
251 void createNewProjectFromTemplate(
const QString & templ );
252 void loadProject(
const QString &
filename );
253 bool guiSaveProject();
254 bool guiSaveProjectAs(
const QString &
filename);
255 bool saveProjectFile(
const QString &
filename,
bool withResources =
false);
313 void exportProjectMidi(
const std::filesystem::path& filePath)
const;
320 bool isSavingProject()
const;
322 std::shared_ptr<const Scale> getScale(
unsigned int index)
const;
323 std::shared_ptr<const Keymap> getKeymap(
unsigned int index)
const;
324 void setScale(
unsigned int index, std::shared_ptr<Scale> newScale);
325 void setKeymap(
unsigned int index, std::shared_ptr<Keymap> newMap);
336 void playAndRecord();
338 void playMidiClip(
const lmms::MidiClip * midiClipToPlay,
bool loop =
true );
350 void addPatternTrack();
356 void addSampleTrack();
357 void addAutomationTrack();
360 void setTimeSignature();
362 void masterVolumeChanged();
364 void savePlayStartPosition();
366 void updateFramesPerTick();
391 void saveControllerStates( QDomDocument & doc, QDomElement & element );
392 void restoreControllerStates(
const QDomElement & element );
394 void removeAllControllers();
396 void saveScaleStates(QDomDocument &doc, QDomElement &element);
397 void restoreScaleStates(
const QDomElement &element);
399 void saveKeymapStates(QDomDocument &doc, QDomElement &element);
400 void restoreKeymapStates(
const QDomElement &element);
402 void processAutomations(
const TrackList& tracks,
TimePos timeStart,
f_cnt_t frames);
403 void processMetronome(
size_t bufferOffset);
405 void setModified(
bool value);
407 void setProjectFileName(QString
const & projectFileName);
Definition AutomatableModel.h:77
void setValue(const float value, const bool isAutomated=false)
Definition AutomatableModel.cpp:294
Definition AutomationClip.h:52
Definition AutomationTrack.h:36
Definition AutomatableModel.h:510
Definition Controller.h:51
static float framesPerTick()
Definition Engine.h:96
static AudioEngine * audioEngine()
Definition Engine.h:59
Definition AutomatableModel.h:494
Definition MeterModel.h:35
Definition Metronome.h:32
const ControllerVector & controllers() const
Definition Song.h:297
int m_loopRenderCount
Definition Song.h:451
PlayMode m_playMode
Definition Song.h:443
Metronome & metronome()
Definition Song.h:329
volatile bool m_playing
Definition Song.h:430
void controllerAdded(lmms::Controller *)
mapPropertyFromModel(int, getTempo, setTempo, m_tempoModel)
Metronome m_metronome
Definition Song.h:464
TimePos m_exportLoopEnd
Definition Song.h:455
void setLoadOnLaunch(bool value)
Definition Song.h:315
int getBeatTicks() const
Definition Song.h:140
std::array< Timeline, PlayModeCount > m_timelines
Definition Song.h:441
TimePos m_exportLoopBegin
Definition Song.h:454
void keymapListChanged(int index)
IntModel m_tempoModel
Definition Song.h:411
bool m_loadOnLaunch
Definition Song.h:424
f_cnt_t getFrames() const
Definition Song.h:148
bar_t length() const
Definition Song.h:233
IntModel m_masterPitchModel
Definition Song.h:415
volatile bool m_exporting
Definition Song.h:427
bool m_isCancelled
Definition Song.h:435
QString nodeName() const override
Definition Song.h:283
const std::string & syncKey() const noexcept
Definition Song.h:327
bool isCancelled()
Definition Song.h:273
volatile bool m_renderBetweenMarkers
Definition Song.h:429
void setExportLoop(bool exportLoop)
Definition Song.h:172
int getLoopRenderCount() const
Definition Song.h:191
bool m_loadingProject
Definition Song.h:434
friend class Engine
Definition Song.h:466
std::shared_ptr< Keymap > m_keymaps[MaxKeymapCount]
Definition Song.h:460
void playbackStateChanged()
const QString & projectFileName() const
Definition Song.h:257
void scaleListChanged(int index)
auto getTimeline(PlayMode mode) const -> const Timeline &
Definition Song.h:228
volatile bool m_paused
Definition Song.h:431
bar_t currentBar() const
Definition Song.h:376
void setPlayPos(tick_t ticks, PlayMode playMode)
Definition Song.h:218
bool isLoadingProject() const
Definition Song.h:262
volatile bool m_exportLoop
Definition Song.h:428
const MidiClip * m_midiClipToPlay
Definition Song.h:446
MeterModel & getTimeSigModel()
Definition Song.h:303
mapPropertyFromModel(int, masterPitch, setMasterPitch, m_masterPitchModel)
f_cnt_t currentFrame() const
Definition Song.h:386
auto getTimeline(PlayMode mode) -> Timeline &
Definition Song.h:227
auto getTimeline() const -> const Timeline &
Definition Song.h:230
Song()
Definition Song.cpp:67
QHash< QString, int > m_errors
Definition Song.h:439
TimePos m_exportEffectiveLength
Definition Song.h:457
TimePos m_exportSongBegin
Definition Song.h:453
bool m_savingProject
Definition Song.h:433
tick_t currentTick() const
Definition Song.h:381
int getBeat() const
Definition Song.h:135
std::shared_ptr< Scale > m_scales[MaxScaleCount]
Definition Song.h:459
bool m_loopMidiClip
Definition Song.h:447
void tempoChanged(lmms::bpm_t newBPM)
IntModel m_masterVolumeModel
Definition Song.h:414
QString m_fileName
Definition Song.h:421
void projectFileNameChanged()
bar_t m_length
Definition Song.h:444
bool isExporting() const
Definition Song.h:167
void setRenderBetweenMarkers(bool renderBetweenMarkers)
Definition Song.h:199
TimePos m_exportSongEnd
Definition Song.h:456
bool isStopped() const
Definition Song.h:162
void playbackPositionJumped()
int getMilliseconds(PlayMode playMode) const
Definition Song.h:119
int getLoadingTrackCount() const
Definition Song.h:107
bool isPlaying() const
Definition Song.h:157
bpm_t getTempo()
Definition Song.cpp:839
SaveOptions m_saveOptions
Definition Song.h:437
const TimePos & getPlayPos() const
Definition Song.h:213
IntModel & tempoModel()
Definition Song.h:308
bool m_modified
Definition Song.h:423
bool isModified() const
Definition Song.h:278
static constexpr auto PlayModeCount
Definition Song.h:82
AutomatedValueMap m_oldAutomatedValues
Definition Song.h:462
mapPropertyFromModel(int, masterVolume, setMasterVolume, m_masterVolumeModel)
VstSyncController m_vstSyncController
Definition Song.h:449
void timeSignatureChanged(int oldTicksPerBar, int ticksPerBar)
QString m_oldFileName
Definition Song.h:422
auto getTimeline() -> Timeline &
Definition Song.h:229
virtual bool fixedClips() const
Definition Song.h:288
volatile bool m_recording
Definition Song.h:426
AutomationTrack * globalAutomationTrack()
Definition Song.h:241
const TimePos & getPlayPos(PlayMode pm) const
Definition Song.h:209
AutomationTrack * m_globalAutomationTrack
Definition Song.h:409
PlayMode
Definition Song.h:74
@ Count
Definition Song.h:80
bool isPaused() const
Definition Song.h:152
int getBars() const
Definition Song.h:124
bool isRecording() const
Definition Song.h:177
void setLoopRenderCount(int count)
Definition Song.h:182
int getMilliseconds() const
Definition Song.h:112
void controllerRemoved(lmms::Controller *)
int m_nLoadingTrack
Definition Song.h:419
SaveOptions & getSaveOptions()
Definition Song.h:316
void loadingCancelled()
Definition Song.h:267
ControllerVector m_controllers
Definition Song.h:417
int ticksPerBar() const
Definition Song.h:129
void setTempo()
Definition Song.cpp:158
void setPlayPos(tick_t ticks)
Definition Song.h:222
int m_oldTicksPerBar
Definition Song.h:413
int m_loopRenderRemaining
Definition Song.h:452
MeterModel m_timeSigModel
Definition Song.h:412
PlayMode playMode() const
Definition Song.h:204
void lengthChanged(int bars)
int getTicks() const
Definition Song.h:144
static tick_t ticksPerBar()
Definition TimePos.h:127
TrackContainer()
Definition TrackContainer.cpp:48
Definition VstSyncController.h:38
Definition ControllerRackView.h:48
Definition SongEditor.h:57
Definition AudioPortAudio.cpp:209
Definition RemotePluginBase.cpp:34
const int DefaultTicksPerBar
Definition TimePos.h:38
constexpr unsigned MaxKeymapCount
number of keyboard mappings per project
Definition lmms_constants.h:44
const bpm_t MinTempo
Definition Song.h:60
constexpr unsigned MaxScaleCount
number of scales per project
Definition lmms_constants.h:43
std::int32_t bar_t
Definition LmmsTypes.h:34
const tick_t MaxSongLength
Definition Song.h:63
QMap< AutomatableModel *, float > AutomatedValueMap
Definition AutomatableModel.h:524
std::vector< Controller * > ControllerVector
Definition Controller.h:48
std::int32_t tick_t
Definition LmmsTypes.h:35
@ Count
Definition Sfxr.h:43
const bpm_t MaxTempo
Definition Song.h:62
std::uint64_t f_cnt_t
Definition LmmsTypes.h:43
QString filename
Definition HydrogenImport.cpp:42
std::uint16_t bpm_t
Definition LmmsTypes.h:45
@ None
Definition LadspaBase.h:49
const bpm_t DefaultTempo
Definition Song.h:61
void setDefaultOptions()
Definition Song.h:94
BoolModel discardMIDIConnections
Definition Song.h:88
BoolModel saveAsProjectBundle
Definition Song.h:92