|
hydrogen 1.1.1
|
OSC Server implementation. More...
#include <OscServer.h>
Public Member Functions | |
| ~OscServer () | |
| Destructor freeing all addresses in m_pClientRegistry and setting __instance to nullptr. More... | |
| bool | init () |
| Registers all handler functions. More... | |
| bool | start () |
| Starts the OSC server and makes it available to handle commands. More... | |
| bool | stop () |
| Stops the OSC server and makes it unavailable. More... | |
| void | handleAction (Action *pAction) |
| Function called by H2Core::CoreActionController::initExternalControlInterfaces() to inform all clients about the current state of Hydrogen using OSC messages send by Hydrogen itself. 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 void | create_instance (H2Core::Preferences *pPreferences) |
| If __instance equals nullptr, a new OscServer singleton will be created by calling the OscServer() constructor and stored in __instance. More... | |
| static OscServer * | get_instance () |
| Returns a pointer to the current OscServer singleton stored in __instance. More... | |
| static QString | qPrettyPrint (lo_type type, void *data) |
| Converts a data data of type type into a printable QString. More... | |
| static void | PLAY_Handler (lo_arg **argv, int i) |
| Creates an Action of type PLAY and passes its references to MidiActionManager::handleAction(). More... | |
| static void | PLAY_STOP_TOGGLE_Handler (lo_arg **argv, int i) |
| Creates an Action of type PLAY/STOP_TOGGLE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | PLAY_PAUSE_TOGGLE_Handler (lo_arg **argv, int i) |
| Creates an Action of type PLAY/PAUSE_TOGGLE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | STOP_Handler (lo_arg **argv, int i) |
| Creates an Action of type STOP and passes its references to MidiActionManager::handleAction(). More... | |
| static void | PAUSE_Handler (lo_arg **argv, int i) |
| Creates an Action of type PAUSE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | RECORD_READY_Handler (lo_arg **argv, int i) |
| Creates an Action of type RECORD_READY and passes its references to MidiActionManager::handleAction(). More... | |
| static void | RECORD_STROBE_TOGGLE_Handler (lo_arg **argv, int i) |
| Creates an Action of type RECORD/STROBE_TOGGLE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | RECORD_STROBE_Handler (lo_arg **argv, int i) |
| Creates an Action of type RECORD_STROBE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | RECORD_EXIT_Handler (lo_arg **argv, int i) |
| Creates an Action of type EXIT and passes its references to MidiActionManager::handleAction(). More... | |
| static void | MUTE_Handler (lo_arg **argv, int i) |
| Creates an Action of type MUTE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | UNMUTE_Handler (lo_arg **argv, int i) |
| Creates an Action of type UNMUTE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | MUTE_TOGGLE_Handler (lo_arg **argv, int i) |
| Creates an Action of type MUTE_TOGGLE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | NEXT_BAR_Handler (lo_arg **argv, int i) |
| Creates an Action of type >>_NEXT_BAR and passes its references to MidiActionManager::handleAction(). More... | |
| static void | PREVIOUS_BAR_Handler (lo_arg **argv, int i) |
| Creates an Action of type <<_PREVIOUS_BAR and passes its references to MidiActionManager::handleAction(). More... | |
| static void | BPM_INCR_Handler (lo_arg **argv, int i) |
| Creates an Action of type BPM_INCR and passes its references to MidiActionManager::handleAction(). More... | |
| static void | BPM_DECR_Handler (lo_arg **argv, int i) |
| Creates an Action of type BPM_DECR and passes its references to MidiActionManager::handleAction(). More... | |
| static void | MASTER_VOLUME_RELATIVE_Handler (lo_arg **argv, int i) |
| Creates an Action of type MASTER_VOLUME_RELATIVE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | MASTER_VOLUME_ABSOLUTE_Handler (lo_arg **argv, int i) |
| Calls H2Core::CoreActionController::setMasterVolume() with the first argument in argv. More... | |
| static void | STRIP_VOLUME_RELATIVE_Handler (QString param1, QString param2) |
| Creates an Action of type STRIP_VOLUME_RELATIVE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | STRIP_VOLUME_ABSOLUTE_Handler (int param1, float param2) |
| Calls H2Core::CoreActionController::setStripVolume() with both param1 and param2. More... | |
| static void | SELECT_NEXT_PATTERN_Handler (lo_arg **argv, int i) |
| Creates an Action of type SELECT_NEXT_PATTERN and passes its references to MidiActionManager::handleAction(). More... | |
| static void | SELECT_AND_PLAY_PATTERN_Handler (lo_arg **argv, int i) |
| Creates an Action of type SELECT_AND_PLAY_PATTERN and passes its references to MidiActionManager::handleAction(). More... | |
| static void | PAN_RELATIVE_Handler (QString param1, QString param2) |
| Creates an Action of type PAN_RELATIVE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | PAN_ABSOLUTE_Handler (QString param1, QString param2) |
| Creates an Action of type PAN_ABSOLTUE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | FILTER_CUTOFF_LEVEL_ABSOLUTE_Handler (QString param1, QString param2) |
| Creates an Action of type FILTER_CUTOFF_LEVEL_ABSOLUTE and passes its references to MidiActionManager::handleAction(). More... | |
| static void | BEATCOUNTER_Handler (lo_arg **argv, int i) |
| Creates an Action of type BEATCOUNTER and passes its references to MidiActionManager::handleAction(). More... | |
| static void | TAP_TEMPO_Handler (lo_arg **argv, int i) |
| Creates an Action of type TAP_TEMPO and passes its references to MidiActionManager::handleAction(). More... | |
| static void | PLAYLIST_SONG_Handler (lo_arg **argv, int i) |
| Creates an Action of type PLAYLIST_SONG and passes its references to MidiActionManager::handleAction(). More... | |
| static void | PLAYLIST_NEXT_SONG_Handler (lo_arg **argv, int i) |
| Creates an Action of type PLAYLIST_NEXT_SONG and passes its references to MidiActionManager::handleAction(). More... | |
| static void | PLAYLIST_PREV_SONG_Handler (lo_arg **argv, int i) |
| Creates an Action of type PLAYLIST_PREV_SONG and passes its references to MidiActionManager::handleAction(). More... | |
| static void | TOGGLE_METRONOME_Handler (lo_arg **argv, int i) |
| Creates an Action of type TOGGLE_METRONOME and passes its references to MidiActionManager::handleAction(). More... | |
| static void | SELECT_INSTRUMENT_Handler (lo_arg **argv, int i) |
| Creates an Action of type SELECT_INSTRUMENT and passes its references to MidiActionManager::handleAction(). More... | |
| static void | UNDO_ACTION_Handler (lo_arg **argv, int i) |
| Creates an Action of type UNDO_ACTION and passes its references to MidiActionManager::handleAction(). More... | |
| static void | REDO_ACTION_Handler (lo_arg **argv, int argc) |
| Creates an Action of type REDO_ACTION and passes its references to MidiActionManager::handleAction(). More... | |
| static void | NEW_SONG_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::newSong(). More... | |
| static void | OPEN_SONG_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::openSong(). More... | |
| static void | SAVE_SONG_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::saveSong(). More... | |
| static void | SAVE_SONG_AS_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::saveSongAs(). More... | |
| static void | SAVE_PREFERENCES_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::savePreferences(). More... | |
| static void | QUIT_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::quit(). More... | |
| static void | TIMELINE_ACTIVATION_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::activateTimeline(). More... | |
| static void | TIMELINE_ADD_MARKER_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::addTempoMarker(). More... | |
| static void | TIMELINE_DELETE_MARKER_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::deleteTempoMarker(). More... | |
| static void | JACK_TRANSPORT_ACTIVATION_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::activatedJackTransport(). More... | |
| static void | JACK_TIMEBASE_MASTER_ACTIVATION_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::activateJackTimebaseMaster(). More... | |
| static void | SONG_MODE_ACTIVATION_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::activateSongMode(). More... | |
| static void | LOOP_MODE_ACTIVATION_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::activateLoopMode(). More... | |
| static void | RELOCATE_Handler (lo_arg **argv, int argc) |
| Triggers CoreActionController::relocateToPattern(). More... | |
| static int | generic_handler (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) |
| Catches any incoming messages and display them. 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... | |
Static Public Attributes | |
| static OscServer * | __instance = nullptr |
| Object holding the current OscServer singleton. More... | |
Static Public Attributes inherited from Object | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. More... | |
Private Member Functions | |
| OscServer (H2Core::Preferences *pPreferences) | |
| Private constructor creating a new OSC server thread using the port H2Core::Preferences::m_nOscServerPort and assigning the object to m_pServerThread. More... | |
| void | broadcastMessage (const char *msgText, lo_message message) |
| Helper function which sends a message with msgText to all connected clients. More... | |
Private Attributes | |
| H2Core::Preferences * | m_pPreferences |
| Pointer to the H2Core::Preferences singleton. More... | |
| bool | m_bInitialized |
| Used to determine whether the callback methods were already added to m_pServerThread. More... | |
| lo::ServerThread * | m_pServerThread |
| Object containing the actual thread with an OSC server running in. More... | |
| std::list< lo_address > | m_pClientRegistry |
| List of all OSC clients known to Hydrogen. More... | |
Additional Inherited Members | |
Static Protected Attributes inherited from Object | |
| static Logger * | __logger = nullptr |
| logger instance pointer More... | |
OSC Server implementation.
Open Sound Control (OSC) is a protocol for communication among programs, computers, and hardware, like synthesizers or multimedia devices, via networking protocols such as UDP or TCP. It can be thought of as a replacement for the MIDI protocol with rich benefits, like supporting symbolic and high-resolution numerical argument data, providing an URL-style naming scheme in combination with a pattern matching language, and allowing to bundle messages for a better handling of timing and simultaneous processing.
The OscServer class provides an implementation of an OSC server running in a separate thread and handling all incoming and outgoing OSC messages send to or from Hydrogen. Its naming scheme starts with the prefix /Hydrogen/ followed by the name of one of the handler functions implemented as members of this class without the _Handler() prefix. Sending an OSC message to the path /Hydrogen/PAUSE will thus trigger the PAUSE_Handler() to pause the playback. You can play with these features using the command line program oscsend on UNIX-based systems.
Internally, the OscServer is implemented as a singleton and will be created using create_instance() and queried using get_instance(). Using start() all handler functions will be registered to their corresponding paths and the OSC server thread will start to listen for incoming messages. But this will only happen if H2Core::Preferences::m_bOscServerEnabled is set to true. In addition, Hydrogen will send OSC messages about its current state to all clients each time its state changes if H2Core::Preferences::m_bOscFeedbackEnabled is set to true. H2Core::Preferences::m_nOscServerPort contains the port number the OSC server will be started at.
Please note that the way generic_handler() is implemented, the additional registration of commands without argument to require a float input, and the usage of float arguments instead of int are all because of the limitations of TouchOSC.
| ~OscServer | ( | ) |
Destructor freeing all addresses in m_pClientRegistry and setting __instance to nullptr.
|
private |
Private constructor creating a new OSC server thread using the port H2Core::Preferences::m_nOscServerPort and assigning the object to m_pServerThread.
| pPreferences | Pointer to the H2Core::Preferences singleton. Although it could be accessed internally using H2Core::Preferences::get_instance(), this is an appetizer for internal changes happening after the 1.0 release. |
|
static |
Creates an Action of type BEATCOUNTER and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type BPM_DECR and passes its references to MidiActionManager::handleAction().
The first argument in argv will be used to set Action::parameter1.
| argv | Pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type BPM_INCR and passes its references to MidiActionManager::handleAction().
The first argument in argv will be used to set Action::parameter1.
| argv | Pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
private |
Helper function which sends a message with msgText to all connected clients.
|
static |
If __instance equals nullptr, a new OscServer singleton will be created by calling the OscServer() constructor and stored in __instance.
It is called in H2Core::Hydrogen::create_instance().
| pPreferences | Pointer to the H2Core::Preferences singleton. Although it could be accessed internally using H2Core::Preferences::get_instance(), this is an appetizer for internal changes happening after the 1.0 release. |
|
static |
Creates an Action of type FILTER_CUTOFF_LEVEL_ABSOLUTE and passes its references to MidiActionManager::handleAction().
|
static |
Catches any incoming messages and display them.
It is also responsible for catching OSC messages at the following paths and invoking the corresponding functions (if only a single argument is present.)
[x] Digit specifying a particular instrument.
| path | The OSC path to register the method to. If NULL is passed the method will match all paths. |
| types | The typespec the method accepts. In Hydrogen handler functions are registered to listen for floats. |
| argv | Pointer to a vector of arguments passed by the OSC message. |
| argc | Number of arguments passed by the OSC message. |
| data | Unused. |
| user_data | Unused. |
|
inlinestatic |
Returns a pointer to the current OscServer singleton stored in __instance.
| void handleAction | ( | Action * | pAction | ) |
Function called by H2Core::CoreActionController::initExternalControlInterfaces() to inform all clients about the current state of Hydrogen using OSC messages send by Hydrogen itself.
The following feedback functions will be used to describe the aforementioned state:
[*] Function will be called for all Instruments in H2Core::Song::__instrument_list.
The constructed messages will contain the Action::parameter2 of pAction as float types (or Action::parameter1 for the actions TOGGLE_METRONOME and MUTE_TOGGLE) and will be associated with one of the following paths:
[x] The last part of the URI is determined by Action::parameter1 and specifies an individual strip.
Only called if H2Core::Preferences::m_bOscServerEnabled is true.
| pAction | Action to be sent to all registered clients. |
| bool init | ( | ) |
Registers all handler functions.
The path the handlers will be registered at always starts with /Hydrogen/ followed by the name of the handler function without the suffix _Handler. PLAY_Handler() will thus be registered to /Hydrogen/PLAY.
Most handler will be registered for both types "" and "f" (floats). But the following handlers will be registered for floats only:
In case of the session managing handlers the following ones only work with no argument present
The generic_handler() will be registered to match all paths and types.
In addition, a lambda function will be registered to match all types and paths too. If the client has not sent any message to Hydrogen yet, it will take care of its registration to m_pClientRegistry using the address of the received OSC message. More importantly, it also will call H2Core::CoreActionController::initExternalControlInterfaces(), which, apart from MIDI related stuff, use handleAction() to push the current state of Hydrogen to the registered OSC clients. This will happen each time the state of Hydrogen does change.
true on success.
|
static |
Triggers CoreActionController::activateJackTimebaseMaster().
| argv | The "i" field does contain the value supplied by the user. If it is 0, the Jack timebase master will be deactivated. Else, it will be activated instead. |
| argc | Unused number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::activatedJackTransport().
| argv | The "i" field does contain the value supplied by the user. If it is 0, the Jack transport will be deactivated. Else, it will be activated instead. |
| argc | Unused number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::activateLoopMode().
| argv | The "i" field does contain the value supplied by the user. If it is 0, loop mode will be deactivated. Else, it will be activated instead. |
| argc | Unused number of arguments passed by the OSC message. |
|
static |
Calls H2Core::CoreActionController::setMasterVolume() with the first argument in argv.
| argv | Pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type MASTER_VOLUME_RELATIVE and passes its references to MidiActionManager::handleAction().
The first argument in argv will be used to set Action::parameter2.
| argv | Pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type MUTE and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type MUTE_TOGGLE and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::newSong().
The handler expects the user to provide an absolute path to a .h2song file. If another file already exists with the same name, it will be overwritten.
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| argc | Number of arguments passed by the OSC message. |
|
static |
Creates an Action of type >>_NEXT_BAR and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::openSong().
The handler expects the user to provide an absolute path to a .h2song file.
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| argc | Number of arguments passed by the OSC message. |
|
static |
Creates an Action of type PAN_ABSOLTUE and passes its references to MidiActionManager::handleAction().
|
static |
Creates an Action of type PAN_RELATIVE and passes its references to MidiActionManager::handleAction().
|
static |
Creates an Action of type PAUSE and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type PLAY and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type PLAY/PAUSE_TOGGLE and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type PLAY/STOP_TOGGLE and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type PLAYLIST_NEXT_SONG and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type PLAYLIST_PREV_SONG and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type PLAYLIST_SONG and passes its references to MidiActionManager::handleAction().
The first argument in argv will be used to set Action::parameter1.
| argv | Pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type <<_PREVIOUS_BAR and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Converts a data data of type type into a printable QString.
Apart from the basic OSC types LO_INT32, LO_FLOAT, and LO_STRING the following extended OSC types are supported:
LO_BLOB and LO_MIDI are, however, NOT supported.
| type | Liblo class data will be cast to. |
| data | Data to be converted to string. |
|
static |
Triggers CoreActionController::quit().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| argc | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type EXIT and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type RECORD_READY and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type RECORD_STROBE and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type RECORD/STROBE_TOGGLE and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type REDO_ACTION and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| argc | Number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::relocateToPattern().
| argv | The "i" field does contain the desired position / number of the pattern group (starting with 0). |
| argc | Unused number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::savePreferences().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| argc | Unused number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::saveSongAs().
The handler expects the user to provide an absolute path to a .h2song file. If another file already exists with the same name, it will be overwritten.
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| argc | Number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::saveSong().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| argc | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type SELECT_AND_PLAY_PATTERN and passes its references to MidiActionManager::handleAction().
The first argument in argv will be used to set Action::parameter1.
| argv | Pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type SELECT_INSTRUMENT and passes its references to MidiActionManager::handleAction().
The first argument in argv will be used to set Action::parameter2.
| argv | Pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type SELECT_NEXT_PATTERN and passes its references to MidiActionManager::handleAction().
The first argument in argv will be used to set Action::parameter1.
| argv | Pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::activateSongMode().
| argv | The "i" field does contain the value supplied by the user. If it is 0, Pattern mode of the playback will be activated. Else, Song mode will be activated instead. |
| argc | Unused number of arguments passed by the OSC message. |
| bool start | ( | ) |
Starts the OSC server and makes it available to handle commands.
If the server was not properly initialized, this function will do so.
true on success | bool stop | ( | ) |
Stops the OSC server and makes it unavailable.
true on success
|
static |
Creates an Action of type STOP and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Calls H2Core::CoreActionController::setStripVolume() with both param1 and param2.
| param1 | Passed as first argument to H2Core::CoreActionController::setStripVolume(). |
| param2 | Passed as second argument to H2Core::CoreActionController::setStripVolume(). |
|
static |
Creates an Action of type STRIP_VOLUME_RELATIVE and passes its references to MidiActionManager::handleAction().
|
static |
Creates an Action of type TAP_TEMPO and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::activateTimeline().
| argv | The "i" field does contain the value supplied by the user. If it is 0, the Timeline will be deactivated. Else, it will be activated instead. |
| argc | Unused number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::addTempoMarker().
| argv | The first field "i" does contain the bar at which to place the new Timeline::TempoMarker while the second one "f" specifies its tempo in bpm. |
| argc | Unused number of arguments passed by the OSC message. |
|
static |
Triggers CoreActionController::deleteTempoMarker().
| argv | The first field "i" does contain the bar at which to delete a Timeline::TempoMarker. |
| argc | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type TOGGLE_METRONOME and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type UNDO_ACTION and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Creates an Action of type UNMUTE and passes its references to MidiActionManager::handleAction().
| argv | Unused pointer to a vector of arguments passed by the OSC message. |
| i | Unused number of arguments passed by the OSC message. |
|
static |
Object holding the current OscServer singleton.
It is initialized with nullptr, set with create_instance(), and accessed with get_instance().
|
private |
Used to determine whether the callback methods were already added to m_pServerThread.
|
private |
List of all OSC clients known to Hydrogen.
Whenever an OSC client sends a message to the started OSC server of Hydrogen, a lambda handler registered in start() will check whether the address of this client is already present in m_pClientRegistry. If this is not the case it will be added to it and the current state Hydrogen will be propagated to all registered clients.
|
private |
Pointer to the H2Core::Preferences singleton.
Although it could be accessed internally using H2Core::Preferences::get_instance(), this is an appetizer for internal changes happening after the 1.0 release.
|
private |
Object containing the actual thread with an OSC server running in.
It is created in OscServer() and both assigned handlers and started in start().