Skip to contents

Motivation

As a microtonal algorithmic composer, I would like to be able to specify the pitch of a note via MIDI note numbers with a fractional part. For example, I can specify middle C with MIDI note number 60, and middle C sharp with MIDI note number 61.

But suppose I want to compose in a quarter-tone scale - 24 notes to the octave. A convenient way to do this would be using MIDI note numbers with fractional parts.

(quarter_tone_scale <- seq(60, 72, by = 1/2))
#>  [1] 60.0 60.5 61.0 61.5 62.0 62.5 63.0 63.5 64.0 64.5 65.0 65.5 66.0 66.5 67.0
#> [16] 67.5 68.0 68.5 69.0 69.5 70.0 70.5 71.0 71.5 72.0

This is, of course, the easy part. But suppose I want to play the music on a synthesizer that accepts MIDI control messages. That’s the subject of the next section.

MIDI, pitch bend, channels, omni mode and MIDI Polyphonic Expression

Nearly all MIDI-controllable synthesizers will accept pitch bend messages. And nearly all of those will allow you to set the lower and upper limits of the pitch bend in semitones. This corresponds to the lower and upper limits of the pitch bend wheel.

When the wheel is in the middle, the pitch bend is zero semitones. When it’s at the top, it’s the upper limit and when it’s at the bottom, it’s the lower limit. For our purposes, we want the range between the lower and upper limits to be as small as possible as long as it’s at least one semitone. A range of -2 semitones to +2 semitones is usually available and may even be the default.