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);
334 void playAndRecord();
336 void playMidiClip(
const lmms::MidiClip * midiClipToPlay,
bool loop =
true );
348 void addPatternTrack();
354 void addSampleTrack();
355 void addAutomationTrack();
358 void setTimeSignature();
360 void masterVolumeChanged();
362 void savePlayStartPosition();
364 void updateFramesPerTick();
389 void saveControllerStates( QDomDocument & doc, QDomElement & element );
390 void restoreControllerStates(
const QDomElement & element );
392 void removeAllControllers();
394 void saveScaleStates(QDomDocument &doc, QDomElement &element);
395 void restoreScaleStates(
const QDomElement &element);
397 void saveKeymapStates(QDomDocument &doc, QDomElement &element);
398 void restoreKeymapStates(
const QDomElement &element);
400 void processAutomations(
const TrackList& tracks,
TimePos timeStart,
f_cnt_t frames);
401 void processMetronome(
size_t bufferOffset);
403 void setModified(
bool value);
405 void setProjectFileName(QString
const & projectFileName);
void setValue(const float value, const bool isAutomated=false)
Definition AutomatableModel.cpp:294
Definition AutomationClip.h:52
Definition AutomationTrack.h:36
Definition AutomatableModel.h:502
Definition Controller.h:51
static float framesPerTick()
Definition Engine.h:96
static AudioEngine * audioEngine()
Definition Engine.h:59
Definition AutomatableModel.h:486
Definition MeterModel.h:35
Definition Metronome.h:32
const ControllerVector & controllers() const
Definition Song.h:297
int m_loopRenderCount
Definition Song.h:449
PlayMode m_playMode
Definition Song.h:441
Metronome & metronome()
Definition Song.h:329
volatile bool m_playing
Definition Song.h:428
void controllerAdded(lmms::Controller *)
mapPropertyFromModel(int, getTempo, setTempo, m_tempoModel)
Metronome m_metronome
Definition Song.h:462
TimePos m_exportLoopEnd
Definition Song.h:453
void setLoadOnLaunch(bool value)
Definition Song.h:315
int getBeatTicks() const
Definition Song.h:140
std::array< Timeline, PlayModeCount > m_timelines
Definition Song.h:439
TimePos m_exportLoopBegin
Definition Song.h:452
void keymapListChanged(int index)
IntModel m_tempoModel
Definition Song.h:409
bool m_loadOnLaunch
Definition Song.h:422
f_cnt_t getFrames() const
Definition Song.h:148
bar_t length() const
Definition Song.h:233
IntModel m_masterPitchModel
Definition Song.h:413
volatile bool m_exporting
Definition Song.h:425
bool m_isCancelled
Definition Song.h:433
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:427
void setExportLoop(bool exportLoop)
Definition Song.h:172
int getLoopRenderCount() const
Definition Song.h:191
bool m_loadingProject
Definition Song.h:432
friend class Engine
Definition Song.h:464
std::shared_ptr< Keymap > m_keymaps[MaxKeymapCount]
Definition Song.h:458
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:429
bar_t currentBar() const
Definition Song.h:374
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:426
const MidiClip * m_midiClipToPlay
Definition Song.h:444
MeterModel & getTimeSigModel()
Definition Song.h:303
mapPropertyFromModel(int, masterPitch, setMasterPitch, m_masterPitchModel)
f_cnt_t currentFrame() const
Definition Song.h:384
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:437
TimePos m_exportEffectiveLength
Definition Song.h:455
TimePos m_exportSongBegin
Definition Song.h:451
bool m_savingProject
Definition Song.h:431
tick_t currentTick() const
Definition Song.h:379
int getBeat() const
Definition Song.h:135
std::shared_ptr< Scale > m_scales[MaxScaleCount]
Definition Song.h:457
bool m_loopMidiClip
Definition Song.h:445
void tempoChanged(lmms::bpm_t newBPM)
IntModel m_masterVolumeModel
Definition Song.h:412
QString m_fileName
Definition Song.h:419
void projectFileNameChanged()
bar_t m_length
Definition Song.h:442
bool isExporting() const
Definition Song.h:167
void setRenderBetweenMarkers(bool renderBetweenMarkers)
Definition Song.h:199
TimePos m_exportSongEnd
Definition Song.h:454
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:834
SaveOptions m_saveOptions
Definition Song.h:435
const TimePos & getPlayPos() const
Definition Song.h:213
IntModel & tempoModel()
Definition Song.h:308
bool m_modified
Definition Song.h:421
bool isModified() const
Definition Song.h:278
static constexpr auto PlayModeCount
Definition Song.h:82
AutomatedValueMap m_oldAutomatedValues
Definition Song.h:460
mapPropertyFromModel(int, masterVolume, setMasterVolume, m_masterVolumeModel)
VstSyncController m_vstSyncController
Definition Song.h:447
void timeSignatureChanged(int oldTicksPerBar, int ticksPerBar)
QString m_oldFileName
Definition Song.h:420
auto getTimeline() -> Timeline &
Definition Song.h:229
virtual bool fixedClips() const
Definition Song.h:288
volatile bool m_recording
Definition Song.h:424
AutomationTrack * globalAutomationTrack()
Definition Song.h:241
const TimePos & getPlayPos(PlayMode pm) const
Definition Song.h:209
AutomationTrack * m_globalAutomationTrack
Definition Song.h:407
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:417
SaveOptions & getSaveOptions()
Definition Song.h:316
void loadingCancelled()
Definition Song.h:267
ControllerVector m_controllers
Definition Song.h:415
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:411
int m_loopRenderRemaining
Definition Song.h:450
MeterModel m_timeSigModel
Definition Song.h:410
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:516
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