|
hydrogen 1.1.1
|
#include <Song.h>
Public Types | |
| enum | SongMode { PATTERN_MODE , SONG_MODE } |
| enum class | ActionMode { selectMode = 0 , drawMode = 1 } |
| Defines the type of user interaction experienced in the SongEditor. More... | |
Public Member Functions | |
| Song (const QString &sName, const QString &sAuthor, float fBpm, float fVolume) | |
| ~Song () | |
| bool | getIsMuted () const |
| void | setIsMuted (bool bIsMuted) |
| unsigned | getResolution () const |
| void | setResolution (unsigned resolution) |
| float | getBpm () const |
| void | setBpm (float fBpm) |
| const QString & | getName () const |
| void | setName (const QString &sName) |
| void | setVolume (float fVolume) |
| float | getVolume () const |
| void | setMetronomeVolume (float fVolume) |
| float | getMetronomeVolume () const |
| PatternList * | getPatternList () const |
| void | setPatternList (PatternList *pList) |
| std::vector< PatternList * > * | getPatternGroupVector () |
| Return a pointer to a vector storing all Pattern present in the Song. More... | |
| const std::vector< PatternList * > * | getPatternGroupVector () const |
| Return a pointer to a vector storing all Pattern present in the Song. More... | |
| void | setPatternGroupVector (std::vector< PatternList * > *pGroupVect) |
| Sets the vector storing all Pattern present in the Song m_pPatternGroupSequence. More... | |
| int | lengthInTicks () const |
| get the length of the song, in tick units More... | |
| bool | save (const QString &sFilename) |
| Save a song to file. More... | |
| void | purgeInstrument (Instrument *pInstr) |
| Remove all the notes in the song that play on instrument I. More... | |
| InstrumentList * | getInstrumentList () const |
| void | setInstrumentList (InstrumentList *pList) |
| void | setNotes (const QString &sNotes) |
| const QString & | getNotes () const |
| void | setLicense (const QString &sLicense) |
| const QString & | getLicense () const |
| void | setAuthor (const QString &sAuthor) |
| const QString & | getAuthor () const |
| const QString & | getFilename () const |
| void | setFilename (const QString &sFilename) |
| bool | getIsLoopEnabled () const |
| void | setIsLoopEnabled (bool bEnabled) |
| float | getHumanizeTimeValue () const |
| void | setHumanizeTimeValue (float fValue) |
| float | getHumanizeVelocityValue () const |
| void | setHumanizeVelocityValue (float fValue) |
| float | getSwingFactor () const |
| void | setSwingFactor (float fFactor) |
| SongMode | getMode () const |
| void | setMode (SongMode mode) |
| void | setIsModified (bool bIsModified) |
| bool | getIsModified () const |
| std::vector< DrumkitComponent * > * | getComponents () const |
| AutomationPath * | getVelocityAutomationPath () const |
| DrumkitComponent * | getComponent (int nID) const |
| void | readTempPatternList (const QString &sFilename) |
| bool | writeTempPatternList (const QString &sFilename) |
| QString | copyInstrumentLineToString (int nSelectedPattern, int selectedInstrument) |
| bool | pasteInstrumentLineFromString (const QString &sSerialized, int nSelectedPattern, int nSelectedInstrument, std::list< Pattern * > &pPatterns) |
| int | getLatestRoundRobin (float fStartVelocity) |
| void | setLatestRoundRobin (float fStartVelocity, int nLatestRoundRobin) |
| const QString & | getPlaybackTrackFilename () const |
| void | setPlaybackTrackFilename (const QString sFilename) |
| bool | getPlaybackTrackEnabled () const |
| bool | setPlaybackTrackEnabled (const bool bEnabled) |
| Specifies whether a playback track should be used. More... | |
| float | getPlaybackTrackVolume () const |
| void | setPlaybackTrackVolume (const float fVolume) |
| ActionMode | getActionMode () const |
| void | setActionMode (const ActionMode actionMode) |
| bool | hasMissingSamples () const |
| Song was incompletely loaded from file (missing samples) More... | |
| void | clearMissingSamples () |
| void | setPanLawType (int nPanLawType) |
| int | getPanLawType () const |
| void | setPanLawKNorm (float fKNorm) |
| float | getPanLawKNorm () const |
| QString | toQString (const QString &sPrefix, bool bShort=true) const override |
| Formatted string version for debugging purposes. More... | |
Public Member Functions inherited from Object | |
| ~Object () | |
| destructor More... | |
| Object (const Object &obj) | |
| copy constructor More... | |
| Object (const char *class_name) | |
| constructor More... | |
| const char * | class_name () const |
| return the class name More... | |
| virtual QString | toQString (const QString &sPrefix, bool bShort=true) const |
| Formatted string version for debugging purposes. More... | |
| void | Print (bool bShort=true) const |
| Prints content of toQString() via DEBUGLOG. More... | |
Static Public Member Functions | |
| static Song * | getEmptySong () |
| Return an empty song. More... | |
| static Song * | getDefaultSong () |
| Create default song. More... | |
| static Song * | load (const QString &sFilename) |
| Load a song from file. More... | |
Static Public Member Functions inherited from Object | |
| static void | set_count (bool flag) |
| enable/disable class instances counting More... | |
| static bool | count_active () |
| return true if class instances counting is enabled More... | |
| static unsigned | objects_count () |
| return the number of objects More... | |
| static void | write_objects_map_to (std::ostream &out) |
| output the full objects map to a given ostream More... | |
| static void | write_objects_map_to_cerr () |
| output objects map to stderr More... | |
| static int | bootstrap (Logger *logger, bool count=false) |
| must be called before any Object instantiation ! More... | |
| static Logger * | logger () |
| return the logger instance More... | |
Private Attributes | |
| bool | m_bIsMuted |
| Resolution of the song (number of ticks per quarter) More... | |
| unsigned | m_resolution |
| float | m_fBpm |
| Current speed in beats per minutes. More... | |
| QString | m_sName |
| author of the song More... | |
| QString | m_sAuthor |
| volume of the song (0.0..1.0) More... | |
| float | m_fVolume |
| Metronome volume. More... | |
| float | m_fMetronomeVolume |
| QString | m_sNotes |
| Pattern list. More... | |
| PatternList * | m_pPatternList |
| Sequence of pattern groups. More... | |
| std::vector< PatternList * > * | m_pPatternGroupSequence |
| Instrument list. More... | |
| InstrumentList * | m_pInstrumentList |
| list of drumkit component More... | |
| std::vector< DrumkitComponent * > * | m_pComponents |
| QString | m_sFilename |
| bool | m_bIsLoopEnabled |
| float | m_fHumanizeTimeValue |
| float | m_fHumanizeVelocityValue |
| float | m_fSwingFactor |
| bool | m_bIsModified |
| std::map< float, int > | m_latestRoundRobins |
| SongMode | m_songMode |
| QString | m_sPlaybackTrackFilename |
| Name of the file to be loaded as playback track. More... | |
| bool | m_bPlaybackTrackEnabled |
| Whether the playback track should be used at all. More... | |
| float | m_fPlaybackTrackVolume |
| Volume of the playback track. More... | |
| AutomationPath * | m_pVelocityAutomationPath |
| license of the song More... | |
| QString | m_sLicense |
| ActionMode | m_actionMode |
| Stores the type of interaction with the SongEditor. More... | |
| int | m_nPanLawType |
| float | m_fPanLawKNorm |
Additional Inherited Members | |
Static Public Attributes inherited from Object | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. More... | |
Static Protected Attributes inherited from Object | |
| static Logger * | __logger = nullptr |
| logger instance pointer More... | |
Song class.
|
strong |
Defines the type of user interaction experienced in the SongEditor.
| enum SongMode |
| Song | ( | const QString & | sName, |
| const QString & | sAuthor, | ||
| float | fBpm, | ||
| float | fVolume | ||
| ) |
| ~Song | ( | ) |
| void clearMissingSamples | ( | ) |
| QString copyInstrumentLineToString | ( | int | nSelectedPattern, |
| int | selectedInstrument | ||
| ) |
|
inline |
|
inline |
|
inline |
| DrumkitComponent * getComponent | ( | int | nID | ) | const |
|
inline |
|
static |
Create default song.
|
static |
Return an empty song.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return a pointer to a vector storing all Pattern present in the Song.
|
inline |
Return a pointer to a vector storing all Pattern present in the Song.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool hasMissingSamples | ( | ) | const |
Song was incompletely loaded from file (missing samples)
| int lengthInTicks | ( | ) | const |
get the length of the song, in tick units
|
static |
Load a song from file.
| bool pasteInstrumentLineFromString | ( | const QString & | sSerialized, |
| int | nSelectedPattern, | ||
| int | nSelectedInstrument, | ||
| std::list< Pattern * > & | pPatterns | ||
| ) |
| void purgeInstrument | ( | Instrument * | pInstr | ) |
Remove all the notes in the song that play on instrument I.
The function is real-time safe (it locks the audio data while deleting notes)
| void readTempPatternList | ( | const QString & | sFilename | ) |
| bool save | ( | const QString & | sFilename | ) |
Save a song to file.
| void setActionMode | ( | const ActionMode | actionMode | ) |
|
inline |
| void setBpm | ( | float | fBpm | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void setIsModified | ( | bool | bIsModified | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void setPanLawKNorm | ( | float | fKNorm | ) |
|
inline |
|
inline |
Sets the vector storing all Pattern present in the Song m_pPatternGroupSequence.
|
inline |
|
inline |
Specifies whether a playback track should be used.
If m_sPlaybackTrackFilename is set to nullptr, m_bPlaybackTrackEnabled will be set to false regardless of the choice in enabled.
| enabled | Sets m_bPlaybackTrackEnabled. |
|
inline |
| filename | Sets m_sPlaybackTrackFilename. |
|
inline |
| volume | Sets m_fPlaybackTrackVolume. |
|
inline |
| void setSwingFactor | ( | float | fFactor | ) |
|
inline |
|
overridevirtual |
Formatted string version for debugging purposes.
| sPrefix | String prefix which will be added in front of every new line |
| bShort | Instead of the whole content of all classes stored as members just a single unique identifier will be displayed without line breaks. |
Reimplemented from Object.
| bool writeTempPatternList | ( | const QString & | sFilename | ) |
|
private |
Stores the type of interaction with the SongEditor.
|
private |
|
private |
|
private |
Resolution of the song (number of ticks per quarter)
|
private |
Whether the playback track should be used at all.
It is set by setPlaybackTrackEnabled() and queried by getPlaybackTrackEnabled().
The playback track itself is loaded in Sampler::reinitialize_playback_track().
|
private |
Current speed in beats per minutes.
One of its purposes is an intermediate storage of the tempo at the current transport position in Hydrogen::setTimelineBpm() in order to detect local changes in speed (set by the user). Bounded by [MIN_BPM,MAX_BPM]. song name
|
private |
|
private |
|
private |
|
private |
|
private |
Volume of the playback track.
It is set by setPlaybackTrackVolume() and queried by getPlaybackTrackVolume().
The playback track itself is loaded in Sampler::reinitialize_playback_track().
|
private |
|
private |
Metronome volume.
|
private |
|
private |
|
private |
|
private |
list of drumkit component
|
private |
Instrument list.
|
private |
Sequence of pattern groups.
|
private |
license of the song
|
private |
|
private |
volume of the song (0.0..1.0)
|
private |
|
private |
|
private |
author of the song
|
private |
Pattern list.
|
private |
|
private |
Name of the file to be loaded as playback track.
It is set by setPlaybackTrackFilename() and queried by getPlaybackTrackFilename().
The playback track itself is loaded in Sampler::reinitialize_playback_track().