33#define MAX_EVENTS 1024
#define MAX_EVENTS
Maximum number of events to be stored in the H2Core::EventQueue::__events_buffer.
volatile unsigned int __write_index
Continuously growing number indexing the event, which has been written to the EventQueue most recentl...
static EventQueue * get_instance()
Returns a pointer to the current EventQueue singleton stored in __instance.
EventQueue()
Constructor of the EventQueue class.
void push_event(const EventType type, const int nValue)
Queues the next event into the EventQueue.
void setSilent(bool bSilent)
std::mutex m_mutex
Mutex to lock access to queue.
static void create_instance()
If __instance equals 0, a new EventQueue singleton will be created and stored in it.
static EventQueue * __instance
Object holding the current EventQueue singleton.
Event __events_buffer[MAX_EVENTS]
Array of all events contained in the EventQueue.
std::vector< AddMidiNoteVector > m_addMidiNoteVector
bool m_bSilent
Whether or not to push log messages.
Event pop_event()
Reads out the next event of the EventQueue.
volatile unsigned int __read_index
Continuously growing number indexing the event, which has been read from the EventQueue most recently...
Basic building block for the communication between the core of Hydrogen and its GUI.
EventType type
Specifies the context the event is create in and which function should be triggered to handle it.
int value
Additional information to describe the actual context of the engine.
EventType
Basic types of communication between the core part of Hydrogen and its GUI.
@ EVENT_COLUMN_CHANGED
Triggered when transport is moved into a different column (either during playback or when relocated b...
@ EVENT_RELOCATION
Triggered in case there is a relocation of the transport position while trasnsport is not rolling.
@ EVENT_PLAYBACK_TRACK_CHANGED
@ EVENT_INSTRUMENT_PARAMETERS_CHANGED
Some parameters of an instrument have been changed.
@ EVENT_METRONOME
Triggered when a metronome note is passed to the H2Core::Sampler.
@ EVENT_PLAYLIST_LOADSONG
@ EVENT_DRUMKIT_LOADED
A the current drumkit was replaced by a new one.
@ EVENT_JACK_TRANSPORT_ACTIVATION
Toggles the button indicating the usage JACK transport.
@ EVENT_PLAYING_PATTERNS_CHANGED
The list of currently played patterns (AudioEngine::getPlayingPatterns()) did change.
@ EVENT_ACTION_MODE_CHANGE
Switches between select mode (0) and draw mode (1) in the *SongEditor.
@ EVENT_SELECTED_INSTRUMENT_CHANGED
@ EVENT_PATTERN_MODIFIED
A pattern was added, deleted, or modified.
@ EVENT_TIMELINE_ACTIVATION
Enables/disables the usage of the Timeline.
@ EVENT_SOUND_LIBRARY_CHANGED
@ EVENT_TIMELINE_UPDATE
Tells the GUI some parts of the Timeline (tempo markers or tags) were modified.
@ EVENT_SONG_SIZE_CHANGED
@ EVENT_UPDATE_SONG
Event triggering HydrogenApp::updateSongEvent() whenever the Song was changed outside of the GUI,...
@ EVENT_BBT_CHANGED
The coarse grained transport position in beats and bars did change.
@ EVENT_LOOP_MODE_ACTIVATION
Toggles the button indicating the usage loop mode.
@ EVENT_GRID_CELL_TOGGLED
@ EVENT_NONE
Fallback event.
@ EVENT_NEXT_PATTERNS_CHANGED
Used in Song::PatternMode::Stacked to indicate that a either AudioEngine::getNextPatterns() did chang...
@ EVENT_QUIT
Triggering HydrogenApp::quitEvent() and enables a shutdown of the entire application via the command ...
@ EVENT_UPDATE_PREFERENCES
Event triggering the loading or saving of the H2Core::Preferences whenever they were changed outside ...
@ EVENT_JACK_TIMEBASE_STATE_CHANGED
Toggles the button indicating the usage JACK Timebase control and informs the GUI about a state chang...
@ EVENT_PATTERN_EDITOR_LOCKED
Locks the PatternEditor on the pattern currently played back.
@ EVENT_SONG_MODE_ACTIVATION
@ EVENT_SELECTED_PATTERN_CHANGED
Another pattern was selected via MIDI or the GUI without affecting the audio transport.
@ EVENT_STACKED_MODE_ACTIVATION
Song::PatternMode::Stacked (0) or Song::PatternMode::Selected (1) was activated.
Note::Octave no_octaveKeyVal