6.2.10. MIDI Tutorial #1 – MIDI Tremolo

../../../_images/midi1.png

Fig. 6.43 MIDI controlled tremolo effect

Many of the algorithms included with the H9000 offer some sort of MIDI functionality. VSIG offers algorithm developers the ability to include MIDI functionality in their custom algorithms, using “External” type modules. The above algorithm uses midinote, a module which converts incoming MIDI messages to control signals, to control the rate of a simple tremolo effect.

In order to follow along with this tutorial, it is highly recommended to be using an external MIDI controller so that the algorithm’s main functionality can be accessed. Using external MIDI devices with the H9000 is as simple as connecting your controller to one of the USB type A ports on the front panel, or to the DIN port on the back panel. You can also send Midi to the H9000 from your DAW via the USB type B connection.

Download the sigfile here: MIDI Tremolo.

6.2.10.1. MIDI Monitoring

Before diving deep into MIDI, it is often helpful to set up a “MIDI monitor” menu so that one may view all data associated with an incoming MIDI message in real time, either in Emote or on the H9000 front panel. The VSIG patching required to create a MIDI monitor is as follows:

../../../_images/midimonitor1.png

Fig. 6.44 VSIG module structure used to display MIDI data to users

This specific MIDI monitor is designed to display and MIDI number and frequency of an incoming MIDI note. Our midinote module outputs from its “pitch” control output, which outputs a pitch value in cents, to two different controlmath modules, both of which are then sent to monitor modules. The controlmath modules convert a pitch value in cents to both frequency and MIDI number:

  • Conversion from cents to frequency: VSIG makes this conversion quite simple with its c_ptof module, which converts from cents to frequency

  • Conversion from cents to MIDI number: a MIDI note’s MIDI number is simply its pitch, in cents, divided by 100 (Side note: MIDI pitch is measured with reference to C0=0 cents)

In Emote, the MIDI monitor looks like the following:

../../../_images/midimonitoremote.png

Fig. 6.45 MIDI monitor in Emote, displaying the frequency and MIDI number of an incoming MIDI note

Everytime a new MIDI message is received from an external MIDI device, the frequency and MIDI number update in real time. This is helpful when creating algorithms which utilize external MIDI control, providing developers with a real time view of incoming MIDI data.

6.2.10.2. Controlling Tremolo with MIDI

Now that the H9000 is receiving MIDI data that we can view in real time, it is time to start using MIDI to control other parameters within the patch. As previously mentioned, this patch is a MIDI controlled tremolo:

../../../_images/scalers.png

Fig. 6.46 Isolated section of the VSIG algorithm showing tremolo structure

The MIDI pitch output, converted to frequency, controls the rate of a lfo module. Subsequently, the lfo targets the mod inputs of two ampmod modules. In other words, the lfo modulates the amplitude level of an incoming signal, at a frequency defined by the incoming MIDI signal at a given time. Notice the c_divide module labeled “ratescale.” This module divides the MIDI frequency output by 100, to restrict the rate of modulation from creeping too high (MIDI #127 is equivalent to a frequency greater than 20kHz, an absurdly high rate for a typical tremolo effect).

The amount of modulation is controlled by a simple knob, labeled “depth.” In the next MIDI tutorial, we will explore how mod amount can also be controlled with MIDI.

Upon exporting to Emote, the following menus will be displayed:

../../../_images/emotemidi1.png

Fig. 6.47 MIDI monitor and tremolo control menus, displayed to the user in Emote

The “MIDI Monitor” menu displays data associated with incoming MIDI signals, while the “Tremolo” menu provides depth control and displays the tremolo rate. The rate of tremolo is controlled entirely via an external MIDI controller; the higher the note, the higher the rate. The following MIDI tutorial will upgrade the current MIDI tremolo by allowing depth to be controlled by key pressure.