Skip to content

Midi control

Short introduction to the Midi protocol

Musical Instrument Digital Interface, or simply "MIDI", is a set of hardware requirements and a protocol that electronic devices use to communicate and store data (i.e., it is a language, file format, and hardware specifications), specifically designed for storing and transferring digital representations of music (as can be read in the introduction to MIDI). A midi message contains three numbers (see midi message explanation):

  1. status

    See status explanation for all details. The most useful status messages are the following:

    • 9x (in hexadecimal), where x is some value (between 0 and F) usually refers to the fact that a key was pressed on channel x. The velocity defines the strength of pressing the key. If the velocity is 0, then it refers to the fact that the key was released on channel x.

    • 8x (in hexadecimal), where x is some value usually refers to the fact that a key was released on channel x.

    • Bx (in hexadecimal), where x is some value usually refers to the fact that a controller (knob, slider, etc.) was used on channel x.

  2. note

    Refers to the key pressed or the controller (knob, slider, etc.) used. See note explanation for which value refers to which key.

  3. velocity

    Usually defines the strength of pressing the key or the value a controller (knob, slider, etc.) is set to.

Midi rules explained

Fragmenter can receive MIDI messages from other connected machines. In Fragmenter the user can define midi control rules that define what should happen when a midi message is received. Such a midi control rule has three parts. These define when, where and what should happen:

  • sign= status + note

    These are hexadecimal values between x00 and xFF (0 and 255 in decimal).

  • target layer

    The action is assigned to the target layer(s).

  • action

    The action assigned to the target layer(s), which can have a parameter called value, and may further depend on the velocity of the midi message (useful, e.g., when the message comes from a knob or slider of a midi device).

The action of a rule will be triggered whenever a midi message is received which is matching (that is, both status and note) the midi sign of this rule.

Tick rules explained

A tick rule is similar to a midi rule, but instead of a given midi sign, it uses a metronome to repeatedly trigger the given action on the given layers. This is useful to create automations following some rhythm that give the illusion that the animation responds to the music even though there is no direct connection through midi. It has the following parts:

  • delay

    The delay between two triggers, in milliseconds.

  • target layer

    The action is assigned to the target layer(s).

  • action

    The action assigned to the target layer(s), which can have a parameter called value, and may further depend on the velocity of the midi message (useful, e.g., when the message comes from a knob or slider of a midi device).

Midi GUI

  • INIT/NEXT

    Click on INIT to initialize a midi device, click on NEXT to receive messages from the next available midi device (Fragmenter listens to a single device).

  • name of MIDI device

    Click on it to choose another device

  • last message

    Shows last received message in the following format: status, note, velocity, where the first two are in hexadecimal format while the velocity is in decimal format (between 0 and 127).

Next there is the list of midi rules defined by the user. Initially this list is blank. Press the img button to add a new rule. Note that you cannot add another rule until this is completely defined. Right-click on a rule to delete it.

Each midi rule has the following parts:

  • enable/disable midi rule

    When the rule is set to enabled then it triggers the assigned action on the assigned layer(s). When it is set to disabled then it does nothing.

  • status

    Click on it to set the status of the rule to a specific value. A star in the value means that all status values are assigned to the rule which we can get by replacing the start with some hexadecimal character. Last received status is yellow in the list to make it easier to find. At the top there are some default values made more visible. * learn will set the status and note(!) from the midi message that will come first after pressing this button. * any (all values from 00 to FF) is sent by midi devices when anything happens with a key/controller. * on (all values from 90 to 9F) is sent by midi devices usually when a key is pressed on any channel. * off (all values from 80 to 8F) is sent by midi devices usually when a key is released on any channel. * controller (all values from B0 to BF) is sent by midi devices usually when a controller (knob, slider, etc.) is set to some value on any channel. * last refers to the last received midi message. When this is chosen, then automatically the note of the rule is also set to the note of the last received midi message.

  • note

    Click on it to set the note of the rule to a specific value. Every key has a different value and every controller has a different value. Drag and hold to set the note of a rule to a range of notes. In this case every note in the range triggers the selected action.

    • learn will set the note from the midi message that will come first after pressing this button.

    • learn end will set the note range end from the midi message that will come first after pressing this button.

    • reverse range will reverse the current note range (first note will become last and vice versa).

    • any means that every note value is assigned to the rule.

    • close will close the note window.

  • target layer

    Click to set on which layers is the action triggered by a message if it fits the status and note of the rule.

  • action

    Click to choose the action triggered by the rule. First set of actions affect some properties of the target layer (tail length, current frame, etc.). Second set of actions affect properties of tools (pen color, etc.), for these it actually does not matter what is the target layer of the rule.

  • value

    For some actions value is an additional parameter which defines what exactly the action does. For example for the show action there are several possible values:

    • toggle toggles visibility of the assigned layer(s) whenever the rule is triggered.
    • on shows the assigned layer(s) whenever the rule is triggered.
    • off hides the assigned layer(s) whenever the rule is triggered.
    • on/off shows the assigned layer(s) when the key corresponding to the rule is pressed and hides the layer(s) when it is released.
    • solo shows the assigned layer(s) and hides all others.

    For actions that set some value (tail length, goto, pen hue, etc.) you have two options:

    • random

    • midi velocity sets the respective value to the velocity value received from the midi device. This is useful when the rule is assigned to listen to some knob/slider of the midi device.

    • range position sets the respective value to the position of the note in the note range defined. That is, the first note sets the value to the smallest possible value and so on, the last note sets the value to the largest possible value.

Below the MIDI rules there is the list of TICK rules. Initially this list is blank. Press the img button to add a new rule. Note that you cannot add another rule until this is completely defined. Right-click on a rule to delete it.

Each tick rule has the following parts (the parts that are the same as in a midi rule are not explained again):

  • enable/disable tick rule

    When the rule is set to enabled then it immediately triggers the assigned action on the assigned layer(s) and then triggers repeatedly at intervals defined by the delay. When it is set to disabled then it does nothing.

  • delay

    Click on it to set the delay between two triggers. You can either set an exact value or click on START and then on END to define the interval time directly. If the rule is enabled then the first trigger happens right when pressing END. This is useful when trying to synchronize with real-life music just by hearing the rhythm.

  • target layer

  • action

  • value

    There is no midi velocity option for tick rules, as it makes no sense.

Setting up a connection with a physical MIDI device

Setting up midi sent to fragmenter is in principle the same as setting up midi to be sent to any other application. If you connect a real midi device to your pc then it should work immediately. If you get the message 'Device not supported' then there is a workaround which should still work:

  1. first install a virtual midi driver, so that one app can send midi message to another, e.g. on windows Loopbe1: download link, on mac PKMidiCron
  2. then install an app that can reroute the signal from your physical device to the virtual device, on mac you might have to open the MIDI settings and set the IAC driver online, on windows you can use Midi-ox, after running it, rerouting can be done as follows:
    • in Midi-ox, open up Options->MIDI Devices...
    • Select your MIDI Input
    • Select your MIDI Output (LoopBe Internal Midi)

Setting up a connection with a virtual MIDI device

If you do not have a physical midi device at all, you can still do a lot of things:

  1. first install a virtual midi device, so that one app can send midi message to another, e.g. on windows Loopbe1: download link, on mac PKMidiCron
  2. then you also need something to generate the midi sign, a few options that work well:

    • vmpk, a free virtual midi keyboard:

    • to get the pitch from a live audio (through microphone) you can use the barebones puredata patch included in the "beat-to-midi pd patch" folder in the main Fragmenter folder

    • there are also commercial apps to detect pitch and other features of live audio and generate midi signs from them, e.g. MIDI Merlin 2 and MIDI GUITAR 2
    • to get the pitch from offline audio source, MIXXX is a free dj app that can send midi sign at every beat etc of a song, and works well with fragmenter; to set it up, see the "Prepare and configure Mixxx" part of this doc: Mixxx docs and when it says to select 'Midi Through', instead select 'LoopBe Internal MIDI' (or the virtual midi driver you have installed in step 1, if you installed something else).