hydrogen 1.2.3
Song.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2024 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY, without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23#ifndef SONG_H
24#define SONG_H
25
26
27#include <QString>
28#include <QDomNode>
29#include <vector>
30#include <map>
31#include <memory>
32
33#include <core/License.h>
34#include <core/Object.h>
36#include <core/Helpers/Xml.h>
37
38class TiXmlNode;
39
40namespace H2Core
41{
42
43class ADSR;
44class Sample;
45class Note;
46class Instrument;
47class InstrumentList;
48class Pattern;
49class Drumkit;
50class DrumkitComponent;
51class PatternList;
52class AutomationPath;
53class Timeline;
54
60class Song : public H2Core::Object<Song>, public std::enable_shared_from_this<Song>
61{
63 public:
64 enum class Mode {
65 Pattern = 0,
66 Song = 1,
69 None = 2
70 };
71
74 enum class ActionMode {
77 selectMode = 0,
80 drawMode = 1,
83 None = 2
84 };
85
86 enum class LoopMode {
87 Disabled = 0,
88 Enabled = 1,
94 Finishing = 2
95 };
96
101 enum class PatternMode {
103 Stacked = 0,
106 Selected = 1,
110 None = 2
111 };
112
115 enum class PlaybackTrack {
117 Unavailable = 0,
119 Muted = 1,
121 Enabled = 2,
124 None = 3
125 };
126
127 Song( const QString& sName, const QString& sAuthor, float fBpm, float fVolume );
128 ~Song();
129
130 static std::shared_ptr<Song> getEmptySong();
131
132 static std::shared_ptr<Song> load( const QString& sFilename, bool bSilent = false );
133 bool save( const QString& sFilename, bool bSilent = false );
134
135 bool getIsTimelineActivated() const;
136 void setIsTimelineActivated( bool bIsTimelineActivated );
137
138 bool getIsPatternEditorLocked() const;
139 void setIsPatternEditorLocked( bool bIsPatternEditorLocked );
140
141 bool getIsMuted() const;
142 void setIsMuted( bool bIsMuted );
143
144 unsigned getResolution() const;
145 void setResolution( unsigned resolution );
146
147 float getBpm() const;
148 void setBpm( float fBpm );
149
150 const QString& getName() const;
151 void setName( const QString& sName );
152
153 void setVolume( float fVolume );
154 float getVolume() const;
155
156 void setMetronomeVolume( float fVolume );
157 float getMetronomeVolume() const;
158
160 void setPatternList( PatternList* pList );
161
165 std::vector<PatternList*>* getPatternGroupVector();
169 const std::vector<PatternList*>* getPatternGroupVector() const;
170
175 void setPatternGroupVector( std::vector<PatternList*>* pGroupVect );
176
178 long lengthInTicks() const;
179
180 std::shared_ptr<InstrumentList> getInstrumentList() const;
181 void setInstrumentList( std::shared_ptr<InstrumentList> pList );
182
183 void setNotes( const QString& sNotes );
184 const QString& getNotes() const;
185
186 void setLicense( const License& license );
187 const License& getLicense() const;
188
189 void setAuthor( const QString& sAuthor );
190 const QString& getAuthor() const;
191
192 const QString& getFilename() const;
193 void setFilename( const QString& sFilename );
194
195 LoopMode getLoopMode() const;
196 void setLoopMode( LoopMode loopMode );
197 bool isLoopEnabled() const;
198
200 void setPatternMode( PatternMode patternMode );
201
202 float getHumanizeTimeValue() const;
203 void setHumanizeTimeValue( float fValue );
204
205 float getHumanizeVelocityValue() const;
206 void setHumanizeVelocityValue( float fValue );
207
208 float getSwingFactor() const;
209 void setSwingFactor( float fFactor );
210
211 Mode getMode() const;
212 void setMode( Mode mode );
213
214 bool getIsModified() const;
215 void setIsModified( bool bIsModified);
216
217 std::shared_ptr<std::vector<std::shared_ptr<DrumkitComponent>>> getComponents() const;
218
220
221 std::shared_ptr<DrumkitComponent> getComponent( int nID ) const;
222
223 void readTempPatternList( const QString& sFilename );
224 bool writeTempPatternList( const QString& sFilename );
225
226 QString copyInstrumentLineToString( int selectedInstrument );
227 bool pasteInstrumentLineFromString( const QString& sSerialized, int nSelectedInstrument, std::list<Pattern *>& patterns );
228
229 int getLatestRoundRobin( float fStartVelocity );
230 void setLatestRoundRobin( float fStartVelocity, int nLatestRoundRobin );
232 const QString& getPlaybackTrackFilename() const;
234 void setPlaybackTrackFilename( const QString sFilename );
235
237 bool getPlaybackTrackEnabled() const;
241 void setPlaybackTrackEnabled( const bool bEnabled );
242
244 float getPlaybackTrackVolume() const;
246 void setPlaybackTrackVolume( const float fVolume );
247
249
250
252 void setActionMode( const ActionMode actionMode );
253
256 bool hasMissingSamples() const;
257 void clearMissingSamples();
258
259 void setPanLawType( int nPanLawType );
260 int getPanLawType() const;
261 void setPanLawKNorm( float fKNorm );
262 float getPanLawKNorm() const;
263
264 bool isPatternActive( int nColumn, int nRow ) const;
265
266 std::shared_ptr<Timeline> getTimeline() const;
267
268 void setDrumkit( std::shared_ptr<Drumkit> pDrumkit, bool bConditional );
269 void removeInstrument( int nInstrumentNumber, bool bConditional );
270
271 std::vector<std::shared_ptr<Note>> getAllNotes() const;
272
278 int findExistingComponent( const QString& sComponentName ) const;
279 int findFreeComponentID( int nStartingID = 0 ) const;
282 QString makeComponentNameUnique( const QString& sComponentName ) const;
283
284
285 const QString& getLastLoadedDrumkitName() const;
286 void setLastLoadedDrumkitName( const QString& sName );
287 QString getLastLoadedDrumkitPath() const;
288 void setLastLoadedDrumkitPath( const QString& sPath );
289
298 QString toQString( const QString& sPrefix = "", bool bShort = true ) const override;
299
300private:
301
302 static std::shared_ptr<Song> loadFrom( XMLNode* pNode, const QString& sFilename, bool bSilent = false );
303 void writeTo( XMLNode* pNode, bool bSilent = false );
304
305 void loadVirtualPatternsFrom( XMLNode* pNode, bool bSilent = false );
306 void loadPatternGroupVectorFrom( XMLNode* pNode, bool bSilent = false );
307 void writeVirtualPatternsTo( XMLNode* pNode, bool bSilent = false );
308 void writePatternGroupVectorTo( XMLNode* pNode, bool bSilent = false );
309
313
316 unsigned m_resolution;
323 float m_fBpm;
324
326 QString m_sName;
328 QString m_sAuthor;
329
334 QString m_sNotes;
338 std::vector<PatternList*>* m_pPatternGroupSequence;
340 std::shared_ptr<InstrumentList> m_pInstrumentList;
342 std::shared_ptr<std::vector<std::shared_ptr<DrumkitComponent>>> m_pComponents;
343 QString m_sFilename;
344
369 std::map< float, int> m_latestRoundRobins;
371
402
405
416
418 // k such that L^k+R^k = 1. Used in constant k-Norm pan law
420
421 void setTimeline( std::shared_ptr<Timeline> pTimeline );
422 std::shared_ptr<Timeline> m_pTimeline;
423
442
443};
444
445inline bool Song::getIsTimelineActivated() const {
447}
448inline void Song::setIsTimelineActivated( bool bIsTimelineActivated ) {
449 m_bIsTimelineActivated = bIsTimelineActivated;
450}
453}
454inline void Song::setIsPatternEditorLocked( bool bIsPatternEditorLocked ) {
455 m_bIsPatternEditorLocked = bIsPatternEditorLocked;
456}
457inline std::shared_ptr<Timeline> Song::getTimeline() const {
458 return m_pTimeline;
459}
460inline void Song::setTimeline( std::shared_ptr<Timeline> pTimeline ) {
461 m_pTimeline = pTimeline;
462}
463
464inline bool Song::getIsMuted() const
465{
466 return m_bIsMuted;
467}
468
469inline void Song::setIsMuted( bool bIsMuted )
470{
471 m_bIsMuted = bIsMuted;
472}
473
474inline unsigned Song::getResolution() const
475{
476 return m_resolution;
477}
478
479inline void Song::setResolution( unsigned resolution )
480{
481 m_resolution = resolution;
482}
483
484inline float Song::getBpm() const
485{
486 return m_fBpm;
487}
488
489inline void Song::setName( const QString& sName )
490{
491 m_sName = sName;
492}
493
494inline const QString& Song::getName() const
495{
496 return m_sName;
497}
498
499inline float Song::getVolume() const
500{
501 return m_fVolume;
502}
503
504inline void Song::setVolume( float fValue )
505{
506 m_fVolume = fValue;
507}
508
509inline float Song::getMetronomeVolume() const
510{
511 return m_fMetronomeVolume;
512}
513
514inline void Song::setMetronomeVolume( float fValue )
515{
516 m_fMetronomeVolume = fValue;
517}
518
519inline bool Song::getIsModified() const
520{
521 return m_bIsModified;
522}
523
524inline std::shared_ptr<InstrumentList> Song::getInstrumentList() const
525{
526 return m_pInstrumentList;
527}
528
529inline void Song::setInstrumentList( std::shared_ptr<InstrumentList> pList )
530{
531 m_pInstrumentList = pList;
532}
533
535{
536 return m_pPatternList;
537}
538
540{
541 m_pPatternList = pList;
542}
543
544inline std::vector<PatternList*>* Song::getPatternGroupVector() {
546}
547
548inline const std::vector<PatternList*>* Song::getPatternGroupVector() const
549{
551}
552
553inline void Song::setPatternGroupVector( std::vector<PatternList*>* pGroupVector )
554{
555 m_pPatternGroupSequence = pGroupVector;
556}
557
558inline void Song::setNotes( const QString& sNotes )
559{
560 m_sNotes = sNotes;
561}
562
563inline const QString& Song::getNotes() const
564{
565 return m_sNotes;
566}
567
568inline void Song::setLicense( const License& license )
569{
570 m_license = license;
571}
572
573inline const License& Song::getLicense() const
574{
575 return m_license;
576}
577
578inline void Song::setAuthor( const QString& sAuthor )
579{
580 m_sAuthor = sAuthor;
581}
582
583inline const QString& Song::getAuthor() const
584{
585 return m_sAuthor;
586}
587
588inline const QString& Song::getFilename() const
589{
590 return m_sFilename;
591}
592
593inline void Song::setFilename( const QString& sFilename )
594{
595 m_sFilename = sFilename;
596}
597
598inline bool Song::isLoopEnabled() const
599{
600 return m_loopMode == LoopMode::Enabled ||
602}
603
605{
606 return m_loopMode;
607}
608inline void Song::setLoopMode( Song::LoopMode loopMode )
609{
610 m_loopMode = loopMode;
611}
612
614{
615 return m_patternMode;
616}
617inline void Song::setPatternMode( Song::PatternMode patternMode )
618{
619 m_patternMode = patternMode;
620}
621
622inline float Song::getHumanizeTimeValue() const
623{
625}
626
627inline void Song::setHumanizeTimeValue( float fValue )
628{
629 m_fHumanizeTimeValue = fValue;
630}
631
633{
635}
636
637inline void Song::setHumanizeVelocityValue( float fValue )
638{
640}
641
642inline float Song::getSwingFactor() const
643{
644 return m_fSwingFactor;
645}
646
648{
649 return m_mode;
650}
651
652inline void Song::setMode( Song::Mode mode )
653{
654 m_mode = mode;
655}
656
657inline std::shared_ptr<std::vector<std::shared_ptr<DrumkitComponent>>> Song::getComponents() const
658{
659 return m_pComponents;
660}
661
666
667inline int Song::getLatestRoundRobin( float fStartVelocity )
668{
669 if ( m_latestRoundRobins.find( fStartVelocity ) == m_latestRoundRobins.end() ) {
670 return 0;
671 } else {
672 return m_latestRoundRobins[ fStartVelocity ];
673 }
674}
675
676inline void Song::setLatestRoundRobin( float fStartVelocity, int nLatestRoundRobin )
677{
678 m_latestRoundRobins[ fStartVelocity ] = nLatestRoundRobin;
679}
680
681inline const QString& Song::getPlaybackTrackFilename() const
682{
684}
685
686inline void Song::setPlaybackTrackFilename( const QString sFilename )
687{
688 m_sPlaybackTrackFilename = sFilename;
689}
690
692{
694}
695
696inline void Song::setPlaybackTrackEnabled( const bool bEnabled )
697{
698 m_bPlaybackTrackEnabled = bEnabled;
699}
700
702{
704}
705
706inline void Song::setPlaybackTrackVolume( const float fVolume )
707{
708 m_fPlaybackTrackVolume = fVolume;
709}
711 if ( m_sPlaybackTrackFilename.isEmpty() ) {
713 }
714
715 if ( ! m_bPlaybackTrackEnabled ) {
717 }
718
720}
721
723 return m_actionMode;
724}
725
726inline void Song::setPanLawType( int nPanLawType ) {
727 m_nPanLawType = nPanLawType;
728}
729
730inline int Song::getPanLawType() const {
731 return m_nPanLawType;
732}
733
734inline float Song::getPanLawKNorm() const {
735 return m_fPanLawKNorm;
736}
737
738inline const QString& Song::getLastLoadedDrumkitName() const
739{
741}
742inline void Song::setLastLoadedDrumkitName( const QString& sName )
743{
745}
746inline void Song::setLastLoadedDrumkitPath( const QString& sPath )
747{
749}
750};
751
752#endif
#define H2_OBJECT(name)
Definition Object.h:224
Wrapper class to help Hydrogen deal with the license information specified in a drumkit.
Definition License.h:48
PatternList is a collection of patterns.
Definition PatternList.h:43
Pattern class is a Note container.
Definition Pattern.h:46
Song class.
Definition Song.h:61
void setPatternMode(PatternMode patternMode)
Definition Song.h:617
std::vector< PatternList * > * getPatternGroupVector()
Return a pointer to a vector storing all Pattern present in the Song.
Definition Song.h:544
bool m_bIsTimelineActivated
Whether the Timeline button was pressed in the GUI or it was activated via an OSC command.
Definition Song.h:312
void setPanLawKNorm(float fKNorm)
Definition Song.cpp:1243
bool getIsTimelineActivated() const
Definition Song.h:445
std::shared_ptr< Timeline > m_pTimeline
Definition Song.h:422
void loadVirtualPatternsFrom(XMLNode *pNode, bool bSilent=false)
Definition Song.cpp:644
std::shared_ptr< InstrumentList > getInstrumentList() const
Definition Song.h:524
PatternList * getPatternList() const
Definition Song.h:534
const QString & getNotes() const
Definition Song.h:563
int m_nPanLawType
Definition Song.h:417
void setPlaybackTrackVolume(const float fVolume)
Definition Song.h:706
bool getIsMuted() const
Definition Song.h:464
QString m_sName
author of the song
Definition Song.h:326
bool getIsPatternEditorLocked() const
Definition Song.h:451
QString m_sFilename
Definition Song.h:343
float getPlaybackTrackVolume() const
Definition Song.h:701
bool save(const QString &sFilename, bool bSilent=false)
Save a song to file.
Definition Song.cpp:600
bool isLoopEnabled() const
Definition Song.h:598
void setPatternList(PatternList *pList)
Definition Song.h:539
const QString & getLastLoadedDrumkitName() const
Definition Song.h:738
void setDrumkit(std::shared_ptr< Drumkit > pDrumkit, bool bConditional)
Definition Song.cpp:1252
ActionMode m_actionMode
Stores the type of interaction with the SongEditor.
Definition Song.h:404
PatternList * m_pPatternList
Sequence of pattern groups.
Definition Song.h:336
const QString & getName() const
Definition Song.h:494
std::map< float, int > m_latestRoundRobins
Definition Song.h:369
void setIsTimelineActivated(bool bIsTimelineActivated)
Definition Song.h:448
float m_fVolume
Metronome volume.
Definition Song.h:331
@ None
Used in case no song is set and both pattern and song editor are not ready to operate yet.
QString getLastLoadedDrumkitPath() const
Definition Song.cpp:1486
void setPlaybackTrackFilename(const QString sFilename)
Definition Song.h:686
void setMode(Mode mode)
Definition Song.h:652
bool writeTempPatternList(const QString &sFilename)
Definition Song.cpp:1107
QString m_sAuthor
volume of the song (0.0..1.0)
Definition Song.h:328
void setMetronomeVolume(float fVolume)
Definition Song.h:514
float getHumanizeVelocityValue() const
Definition Song.h:632
unsigned getResolution() const
Definition Song.h:474
ActionMode getActionMode() const
Definition Song.h:722
void readTempPatternList(const QString &sFilename)
Definition Song.cpp:1091
static std::shared_ptr< Song > load(const QString &sFilename, bool bSilent=false)
Load a song from file.
Definition Song.cpp:187
PlaybackTrack getPlaybackTrackState() const
Definition Song.h:710
void setIsPatternEditorLocked(bool bIsPatternEditorLocked)
Definition Song.h:454
bool hasMissingSamples() const
Song was incompletely loaded from file (missing samples)
Definition Song.cpp:1073
void setBpm(float fBpm)
Definition Song.cpp:132
void setResolution(unsigned resolution)
Definition Song.h:479
std::shared_ptr< std::vector< std::shared_ptr< DrumkitComponent > > > getComponents() const
Definition Song.h:657
long lengthInTicks() const
get the length of the song, in tick units
Definition Song.cpp:150
LoopMode m_loopMode
The three states of this enum is just a way to handle the playback within Hydrogen.
Definition Song.h:351
ActionMode
Defines the type of user interaction experienced in the SongEditor.
Definition Song.h:74
@ selectMode
Holding a pressed left mouse key will draw a rectangle to select a group of Notes.
@ drawMode
Holding a pressed left mouse key will draw/delete patterns in all grid cells encountered.
Mode getMode() const
Definition Song.h:647
@ Finishing
Transport is still in loop mode (frames and ticks larger than song size are allowed) but playback end...
float m_fBpm
Current speed in beats per minutes.
Definition Song.h:323
bool pasteInstrumentLineFromString(const QString &sSerialized, int nSelectedInstrument, std::list< Pattern * > &patterns)
Definition Song.cpp:1139
void setHumanizeTimeValue(float fValue)
Definition Song.h:627
void setLoopMode(LoopMode loopMode)
Definition Song.h:608
const QString & getFilename() const
Definition Song.h:588
PlaybackTrack
Determines the state of the Playback track with respect to audio processing.
Definition Song.h:115
@ Enabled
Valid file set and ready for playback.
@ Unavailable
No proper playback track file set yet.
@ Muted
Valid file set but the playback track is muted via the GUI.
bool isPatternActive(int nColumn, int nRow) const
Definition Song.cpp:166
std::shared_ptr< Timeline > getTimeline() const
Definition Song.h:457
std::shared_ptr< DrumkitComponent > getComponent(int nID) const
Definition Song.cpp:1026
float getBpm() const
Definition Song.h:484
void clearMissingSamples()
Definition Song.cpp:1084
void setVolume(float fVolume)
Definition Song.h:504
QString makeComponentNameUnique(const QString &sComponentName) const
Ensures sComponentName is not used by any other component loaded into the song yet.
Definition Song.cpp:1477
const QString & getAuthor() const
Definition Song.h:583
std::shared_ptr< InstrumentList > m_pInstrumentList
list of drumkit component
Definition Song.h:340
void writeTo(XMLNode *pNode, bool bSilent=false)
Definition Song.cpp:780
void writePatternGroupVectorTo(XMLNode *pNode, bool bSilent=false)
Definition Song.cpp:765
bool m_bIsModified
Definition Song.h:368
void removeInstrument(int nInstrumentNumber, bool bConditional)
Definition Song.cpp:1355
PatternMode getPatternMode() const
Definition Song.h:613
void setActionMode(const ActionMode actionMode)
Definition Song.cpp:146
float m_fPanLawKNorm
Definition Song.h:419
AutomationPath * m_pVelocityAutomationPath
license of the song
Definition Song.h:399
float getPanLawKNorm() const
Definition Song.h:734
void loadPatternGroupVectorFrom(XMLNode *pNode, bool bSilent=false)
Definition Song.cpp:696
QString m_sNotes
Pattern list.
Definition Song.h:334
float getHumanizeTimeValue() const
Definition Song.h:622
int findFreeComponentID(int nStartingID=0) const
Definition Song.cpp:1458
float getMetronomeVolume() const
Definition Song.h:509
void setFilename(const QString &sFilename)
Definition Song.h:593
License m_license
Definition Song.h:401
void setLastLoadedDrumkitPath(const QString &sPath)
Definition Song.h:746
void setSwingFactor(float fFactor)
Definition Song.cpp:1038
LoopMode getLoopMode() const
Definition Song.h:604
float m_fPlaybackTrackVolume
Volume of the playback track.
Definition Song.h:398
std::shared_ptr< std::vector< std::shared_ptr< DrumkitComponent > > > m_pComponents
Definition Song.h:342
void setPanLawType(int nPanLawType)
Definition Song.h:726
std::vector< PatternList * > * m_pPatternGroupSequence
Instrument list.
Definition Song.h:338
static std::shared_ptr< Song > getEmptySong()
Definition Song.cpp:953
void setLicense(const License &license)
Definition Song.h:568
void setNotes(const QString &sNotes)
Definition Song.h:558
void setLastLoadedDrumkitName(const QString &sName)
Definition Song.h:742
PatternMode m_patternMode
Definition Song.h:352
void setIsModified(bool bIsModified)
Definition Song.cpp:1049
float m_fSwingFactor
Definition Song.h:367
bool m_bIsMuted
Resolution of the song (number of ticks per quarter)
Definition Song.h:314
bool getPlaybackTrackEnabled() const
Definition Song.h:691
int getLatestRoundRobin(float fStartVelocity)
Definition Song.h:667
void setTimeline(std::shared_ptr< Timeline > pTimeline)
Definition Song.h:460
QString toQString(const QString &sPrefix="", bool bShort=true) const override
Formatted string version for debugging purposes.
Definition Song.cpp:1491
void setInstrumentList(std::shared_ptr< InstrumentList > pList)
Definition Song.h:529
bool m_bIsPatternEditorLocked
If set to true, the user won't be able to select a pattern via the SongEditor.
Definition Song.h:415
void setName(const QString &sName)
Definition Song.h:489
PatternMode
Determines how patterns will be added to AudioEngine::m_pPlayingPatterns if transport is in Song::Mod...
Definition Song.h:101
@ Stacked
An arbitrary number of pattern can be played.
@ Selected
Only one pattern - the one currently selected in the GUI - will be played back.
const License & getLicense() const
Definition Song.h:573
float m_fHumanizeVelocityValue
Factor to scale the random contribution when humanizing velocity between 0 and AudioEngine::fHumanize...
Definition Song.h:366
void setAuthor(const QString &sAuthor)
Definition Song.h:578
AutomationPath * getVelocityAutomationPath() const
Definition Song.h:662
float m_fHumanizeTimeValue
Factor to scale the random contribution when humanizing timing between 0 and AudioEngine::fHumanizeTi...
Definition Song.h:359
void setPlaybackTrackEnabled(const bool bEnabled)
Specifies whether a playback track should be used.
Definition Song.h:696
QString copyInstrumentLineToString(int selectedInstrument)
Definition Song.cpp:1118
QString m_sLastLoadedDrumkitName
Convenience variable holding the name of the drumkit last loaded.
Definition Song.h:441
void setLatestRoundRobin(float fStartVelocity, int nLatestRoundRobin)
Definition Song.h:676
Mode m_mode
Definition Song.h:370
unsigned m_resolution
Definition Song.h:316
bool getIsModified() const
Definition Song.h:519
float m_fMetronomeVolume
Definition Song.h:333
std::vector< std::shared_ptr< Note > > getAllNotes() const
Definition Song.cpp:1405
float getVolume() const
Definition Song.h:499
void writeVirtualPatternsTo(XMLNode *pNode, bool bSilent=false)
Definition Song.cpp:751
int getPanLawType() const
Definition Song.h:730
int findExistingComponent(const QString &sComponentName) const
Checks whether a component of name sComponentName exists in m_pComponents.
Definition Song.cpp:1449
static std::shared_ptr< Song > loadFrom(XMLNode *pNode, const QString &sFilename, bool bSilent=false)
Definition Song.cpp:229
QString m_sPlaybackTrackFilename
Name of the file to be loaded as playback track.
Definition Song.h:380
bool m_bPlaybackTrackEnabled
Whether the playback track should be used at all.
Definition Song.h:389
void setIsMuted(bool bIsMuted)
Definition Song.h:469
float getSwingFactor() const
Definition Song.h:642
void setHumanizeVelocityValue(float fValue)
Definition Song.h:637
void setPatternGroupVector(std::vector< PatternList * > *pGroupVect)
Sets the vector storing all Pattern present in the Song m_pPatternGroupSequence.
Definition Song.h:553
QString m_sLastLoadedDrumkitPath
Unique identifier of the drumkit last loaded.
Definition Song.h:438
const QString & getPlaybackTrackFilename() const
Definition Song.h:681
XMLNode is a subclass of QDomNode with read and write values methods.
Definition Xml.h:39