Chapter 16. MIDI API

Table of Contents

16.1. MIDI Actions
16.1.1. Events
16.1.2. Actions
16.2. MIDI-learnable Widgets

In this section you can find more info about how to make Hydrogen respond to MIDI messages. This is either done using the available MIDI Actions or using the MIDI-learnable Widgets, like knobs or faders, both triggered using MIDI Events.

[Note]Note

Before you can work with MIDI actions you should have your MIDI devices, drivers, and connections configured correctly in the MIDI System tab of the Preferences.

Please note that this chapter will only cover the table linking external MIDI Events to Hydrogen's MIDI Actions. For all other parameters of the MIDI API please see the MIDI System tab of the Preferences.

16.1. MIDI Actions

Figure 16.1. MIDI Actions are set in MIDI System tab of the Preferences Dialog

MIDI Actions are set in MIDI System tab of the Preferences Dialog

An MIDI Event is an incoming MIDI message, originating from e.g. a MIDI controller or an external sequencer. A MIDI Action is a function built into Hydrogen that can be used to react to a specific MIDI Event. Binding an Event to an Action can be done using the MIDI System tab of the Preferences.

You can also define MIDI bindings by simply pressing the Red circle. button left of the Event-Action binding line. A popup will inform you that Hydrogen is waiting for your input. Press/hit/turn the key/pad/knob on your MIDI keyboard (or controller) that you want to link to this action. The popup will close and the Event Param. value will now show the MIDI note value of the key you pressed. Once this is done you can select an Action from the action drop-down list.

[Tip]Tip

You can also define a binding without the Red circle. button by setting the Event Param. manually to the desired MIDI note.

The Action Param. column to the right of the table specifies the input parameter to the Action (see the corresponding Actions reference for details).

16.1.1. Events

Three types of MIDI Events are available (as described in the MIDI standard):

  • NOTE: an input coming from a regular black/white key of a keyboard or a drumpad.

  • CC: controller commands coming from faders or rotary controllers.

  • MMC_x: machine control events coming from buttons, like 'play' or 'stop', on a controller.

16.1.2. Actions

[Note]Note

Some of the MIDI Actions require that the Action Param. is configured. This parameter usually references a specific channel, instrument, FXsend... Keep in mind that its value is zero-based. So, if you want to reference channel 1 you have to enter 0 in the Action Param. field (1 for channel 2, 2 for channel 3, and so on).

  • <<_PREVIOUS_BAR: moves the playhead to the previous pattern/bar.

  • >>_NEXT_BAR: moves the playhead to the next pattern/bar.

  • BEATCOUNTER: calculates the average time passing between successive encounters of this commands and uses it to set the current tempo using the Beat Counter.

  • BPM_CC_RELATIVE: changes the tempo relative to the current tempo, using a controller. Using the Action Param you can specify by how much the current tempo will change. If the incoming Event is -1 (negative), the tempo will be increased and if it's 1 (positive), it will be increased.

    [Note]Note

    This Action will have no effect if Hydrogen is both in Song mode and the Timeline is activated.

  • BPM_DECR: decreases the current tempo by the supplied value.

    [Note]Note

    This Action will have no effect if Hydrogen is in Song mode or Timeline is activated.

  • BPM_FINE_CC_RELATIVE: as BPM_CC_RELATIVE but with changes 100 times smaller than the value specified in Action Param.

    [Note]Note

    This Action will have no effect if Hydrogen is in Song mode or Timeline is activated.

  • BPM_INCR: increases the current tempo by the supplied value.

    [Note]Note

    This Action will have no effect if Hydrogen is in Song mode or Timeline is activated.

  • EFFECTx_LEVEL_ABSOLUTE: changes the volume level of an FX x provided as an integer between 0 and 127. The value you enter in the Action Param determines the Instrument Channel Strip the Action will be applied to.

  • EFFECTx_LEVEL_RELATIVE:

    [Warning]Warning

    Not implemented yet.

  • FILTER_CUTOFF_LEVEL_ABSOLUTE: for a value of 0 it sets the Filter Cutoff of the instrument strip specified using the Action Param to 0. For all other values it sets the cutoff to the provided number divided by 127.0.

  • MASTER_VOLUME_ABSOLUTE: sets the Master output volume to the value provided by the MIDI event times 1.5 and divided by 127.

  • MASTER_VOLUME_RELATIVE: changes the Master output volume, relative to its current setting. For a value of 0 it sets the volume of the master fader to 0. For a value of 1 it increases its volume by 0.05 and for all other values it decreases it by 0.05. (-1: -0.05 , 0: 0 ,1: +0.05)

  • MUTE: mutes the Master output (sequencer keeps running).

  • MUTE_TOGGLE: toggles the muting of the Master output (sequencer keeps running).

  • PAN_ABSOLUTE: changes the pan of an instrument determined by the Action Param to the absolute value - from 0 to 127 - that the linked controller sends to Hydrogen.

  • PAN_RELATIVE: changes the pan of an instrument determined by the Action Param relative to the current value. For a value of 1 it increase the pan by 0.05. For all other values it decreases it by 0.05. (-1: -0.05 , 1: +0.05).

  • PAUSE: pauses playback.

  • PLAY: starts playback.

  • PLAY/PAUSE_TOGGLE: works the same as PLAY if the playback has not started yet and same as. PAUSE otherwise. (The playhead will not return to the start of the song, but will stay at its current position).

  • PLAY/STOP_TOGGLE: works the same as PLAY if the playback has not started yet and same as. STOP otherwise.

  • PLAYLIST_NEXT_SONG: opens the song in the current playlist corresponding to the song number specified in Action Param.

  • PLAYLIST_PREV_SONG: opens the previous song in the current playlist.

  • PLAYLIST_SONG: opens the next song in the current playlist.

  • RECORD/STROBE_TOGGLE: toggles recording (same as pressing the record button in the main toolbar).

  • RECORD_EXIT: deactivates recording.

  • RECORD_READY: toggles recording (same as pressing the record button in the main toolbar) if the playback has not started yet.

  • RECORD_STROBE: activates recording.

  • REDO_ACTION: redoes the previous undone action.

  • SELECT_AND_PLAY_PATTERN: works as SELECT_NEXT_PATTERN combined with PLAY.

  • SELECT_INSTRUMENT: selects the instrument in the drumkit corresponding to the number supplied in the incoming MIDI Event.

  • SELECT_NEXT_PATTERN: switches to the pattern specified in Action Param.

    [Note]Note

    If Hydrogen is in Song mode, the command will have no effect.

  • SELECT_NEXT_PATTERN_CC_ABSOLUTE: like SELECT_NEXT_PATTERN but only take effect in Stacked mode.

  • SELECT_NEXT_PATTERN_RELATIVE: switches Action Param patterns forward.

    [Note]Note

    This Action does only increment the pattern number and will only take effect if Hydrogen is in Stacked mode.

  • SELECT_ONLY_NEXT_PATTERN: clears the list of patterns scheduled to be played next and adds the one specified in Action Param.

    [Note]Note

    If either Song mode or Stacked mode is activated, this action will have no effect.

  • STOP: stops playback and moves the playhead to the beginning of the song.

  • STRIP_MUTE_TOGGLE: mutes the instrument specified in Action Param.

  • STRIP_SOLO_TOGGLE: mutes the instrument specified in Action Param.

  • STRIP_VOLUME_ABSOLUTE: see MASTER_VOLUME_ABSOLUTE, but applies to the Instrument Channel Strip specified in Action Param.

  • STRIP_VOLUME_RELATIVE: see MASTER_VOLUME_RELATIVE, but applies to the Instrument Channel Strip specified in Action Param.

  • TAP_TEMPO: another command calculating the average time passing between successive encounters of this commands and uses it to set the current tempo using Tap Tempo.

  • TOGGLE_METRONOME: toggles the metronome.

  • UNDO_ACTION: undoes the previous action.

  • UNMUTE: unmutes the Master output (sequencer keeps running).