|
hydrogen 1.1.1
|
#include <CoreActionController.h>
Public Member Functions | |
| CoreActionController () | |
| ~CoreActionController () | |
| void | setMasterVolume (float masterVolumeValue) |
| void | setStripVolume (int nStrip, float fVolumeValue, bool bSelectStrip) |
| void | setStripPan (int nStrip, float fPanValue, bool bSelectStrip) |
| void | setMetronomeIsActive (bool isActive) |
| void | setMasterIsMuted (bool isMuted) |
| void | setStripIsMuted (int nStrip, bool isMuted) |
| void | toggleStripIsMuted (int nStrip) |
| void | setStripIsSoloed (int nStrip, bool isSoloed) |
| void | toggleStripIsSoloed (int nStrip) |
| void | initExternalControlInterfaces () |
| void | handleOutgoingControlChange (int param, int value) |
| bool | newSong (const QString &songPath) |
| Create an empty #Song, which will be stored in songPath. More... | |
| bool | openSong (const QString &songPath) |
| Opens the #Song specified in songPath. More... | |
| bool | openSong (Song *pSong) |
| Opens the #Song specified in songPath. More... | |
| bool | saveSong () |
| Saves the current #Song. More... | |
| bool | saveSongAs (const QString &songPath) |
| Saves the current #Song to the path provided in songPath. More... | |
| bool | savePreferences () |
| Saves the current state of the #Preferences. More... | |
| bool | quit () |
| Triggers the shutdown of Hydrogen. More... | |
| bool | activateTimeline (bool bActivate) |
| (De)activates the usage of the Timeline. More... | |
| bool | addTempoMarker (int nPosition, float fBpm) |
| Adds a tempo marker to the Timeline. More... | |
| bool | deleteTempoMarker (int nPosition) |
| Delete a tempo marker from the Timeline. More... | |
| bool | activateJackTransport (bool bActivate) |
| (De)activates the usage of Jack transport. More... | |
| bool | activateJackTimebaseMaster (bool bActivate) |
| (De)activates the usage of Jack timebase master. More... | |
| bool | activateSongMode (bool bActivate, bool bTriggerEvent) |
| Switches between Song and Pattern mode of playback. More... | |
| bool | activateLoopMode (bool bActivate, bool bTriggerEvent) |
| Toggle loop mode of playback. More... | |
| bool | relocate (int nPatternGroup) |
| Relocates transport to the beginning of a particular Pattern. More... | |
| bool | isSongPathValid (const QString &songPath) |
| Checks the path of the .h2song provided via OSC. 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... | |
Private Member Functions | |
| bool | setSong (Song *pSong) |
| Sets a #Song to be used by Hydrogen. More... | |
Private Attributes | |
| const int | m_nDefaultMidiFeedbackChannel |
Additional Inherited Members | |
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... | |
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... | |
| ~CoreActionController | ( | ) |
| bool activateJackTimebaseMaster | ( | bool | bActivate | ) |
(De)activates the usage of Jack timebase master.
Note that this function will fail if Jack is not used as audio driver.
| bActivate | If true - activate or if false - deactivate. |
| bool activateJackTransport | ( | bool | bActivate | ) |
(De)activates the usage of Jack transport.
Note that this function will fail if Jack is not used as audio driver.
| bActivate | If true - activate or if false - deactivate. |
| bool activateLoopMode | ( | bool | bActivate, |
| bool | bTriggerEvent | ||
| ) |
Toggle loop mode of playback.
| bActivate | If true - activates loop mode. |
| bTriggerEvent | Setting this variable to true is intended for its use as a batch function from within Hydrogen's core, which will inform the GUI via an Event about the change of mode. When used from the GUI itself, this parameter has to be set to false. |
| bool activateSongMode | ( | bool | bActivate, |
| bool | bTriggerEvent | ||
| ) |
Switches between Song and Pattern mode of playback.
| bActivate | If true - activates Song mode or if false - activates Pattern mode. |
| bTriggerEvent | Setting this variable to true is intended for its use as a batch function from within Hydrogen's core, which will inform the GUI via an Event about the change of mode. When used from the GUI itself, this parameter has to be set to false. |
| bool activateTimeline | ( | bool | bActivate | ) |
(De)activates the usage of the Timeline.
Note that this function will fail in the presence of the Jack audio driver and an external timebase master (see Hydrogen::getJackTimebaseState()).
| bActivate | If true - activate or if false - deactivate. |
| bool addTempoMarker | ( | int | nPosition, |
| float | fBpm | ||
| ) |
Adds a tempo marker to the Timeline.
| nPosition | Location of the tempo marker in bars. |
| fBpm | Speed associated with the tempo marker. |
| bool deleteTempoMarker | ( | int | nPosition | ) |
Delete a tempo marker from the Timeline.
If no Tempo marker is present at nPosition, the function will return true as well.
| nPosition | Location of the tempo marker in bars. |
| void handleOutgoingControlChange | ( | int | param, |
| int | value | ||
| ) |
| void initExternalControlInterfaces | ( | ) |
| bool isSongPathValid | ( | const QString & | songPath | ) |
Checks the path of the .h2song provided via OSC.
It will be checked whether songPath
| songPath | Absolute path to an .h2song file. |
| bool newSong | ( | const QString & | songPath | ) |
Create an empty #Song, which will be stored in songPath.
This will be done immediately and without saving the current #Song. All unsaved changes will be lost! In addition, the new song won't be saved by this function. You can do so using saveSong().
The intended use of this function for session management. Therefore, the function will not store the provided songPath in Preferences::m_lastSongFilename and Hydrogen won't resume with the corresponding song on restarting.
| songPath | Absolute path to the .h2song file to be opened. |
| bool openSong | ( | const QString & | songPath | ) |
Opens the #Song specified in songPath.
This will be done immediately and without saving the current #Song. All unsaved changes will be lost!
The intended use of this function for session management. Therefore, the function will not store the provided songPath in Preferences::m_lastSongFilename and Hydrogen won't resume with the corresponding song on restarting.
| songPath | Absolute path to the .h2song file to be opened. |
| bool openSong | ( | Song * | pSong | ) |
Opens the #Song specified in songPath.
This will be done immediately and without saving the current #Song. All unsaved changes will be lost!
The intended use of this function for session management. Therefore, the function will not store the provided @pSong in Preferences::m_lastSongFilename and Hydrogen won't resume with the corresponding song on restarting.
| pSong | New Song. |
| bool quit | ( | ) |
Triggers the shutdown of Hydrogen.
This will be done immediately and without saving the current #Song. All unsaved changes will be lost!
The shutdown will be triggered in both the CLI and the GUI via the H2Core::EVENT_QUIT event.
| bool relocate | ( | int | nPatternGroup | ) |
| bool savePreferences | ( | ) |
Saves the current state of the #Preferences.
| bool saveSong | ( | ) |
Saves the current #Song.
| bool saveSongAs | ( | const QString & | songPath | ) |
Saves the current #Song to the path provided in songPath.
The intended use of this function for session management. Therefore, the function will not store the provided songPath in Preferences::m_lastSongFilename and Hydrogen won't resume with the corresponding song on restarting.
| songPath | Absolute path to the file to store the current #Song in. |
| void setMasterIsMuted | ( | bool | isMuted | ) |
| void setMasterVolume | ( | float | masterVolumeValue | ) |
| void setMetronomeIsActive | ( | bool | isActive | ) |
|
private |
Sets a #Song to be used by Hydrogen.
This will be done immediately and without saving the current #Song. All unsaved changes will be lost!
The intended use of this function for session management.
| pSong | Pointer to the #Song to set. |
| void setStripIsMuted | ( | int | nStrip, |
| bool | isMuted | ||
| ) |
| void setStripIsSoloed | ( | int | nStrip, |
| bool | isSoloed | ||
| ) |
| void setStripPan | ( | int | nStrip, |
| float | fPanValue, | ||
| bool | bSelectStrip | ||
| ) |
| nStrip | Instrument which to set the volume for. |
| fPanValue | New pan. |
| bSelectedStrip | Whether the corresponding instrument should be selected. |
| void setStripVolume | ( | int | nStrip, |
| float | fVolumeValue, | ||
| bool | bSelectStrip | ||
| ) |
| nStrip | Instrument which to set the volume for. |
| fVolumeValue | New volume. |
| bSelectedStrip | Whether the corresponding instrument should be selected. |
| void toggleStripIsMuted | ( | int | nStrip | ) |
| void toggleStripIsSoloed | ( | int | nStrip | ) |
|
private |