-
Notifications
You must be signed in to change notification settings - Fork 2
OMG Notes and MIDI Notes
This page explains how OMG notes work, and how that enables chord progressions and portability across the Open Music Gallery.
The melody to "Mary Had A Little Lamb" starts out E, D, C, D, E, E, E
.
Most music software stores these notes as MIDI notes, in which case the melody would be 64,62,60,62,64,64,64
.
OMG stores notes differently. The OMG version of this melody is 2,1,0,1,2,2,2
. To play this melody, the OMG notes are translated to MIDI notes based on some parameters:
- rootnote
- scale
- octave
If the key of our song is C Major and middle C is note 60, here's the parameters we need:
- rootnote = 0
- scale = 0,2,4,5,7,9,11
- octave = 5
The rootnote can be 0
to 11
, where C = 0, C# = 1, D = 2
up to B = 11
, just like the MIDI notes.
The scale is a list of MIDI notes in the scale. Here the scale is 0, 2, 4, 5, 7, 9, 11
, which is C, D, E, F, G, A, and B.
And the octave puts the melody in the middle of the instrument.
Here's a basic formula to calculate the MIDI note from the OMG note;
midinote = scale[omgnote] + rootnote + octave * 12
Here is the melody in OMG notes again: 2,1,0,1,2,2,2
. The first omgnote
is 2
. Plug that and the other parameters in:
midinote = scale[2] + 0 + 5 * 12
You might think that scale[2]
means its the second note in the scale
, but computers start counting at 0
, so 2
is the third note in the scale
. Eh. You get used to it. So if:
scale = [0,2,4,5,7,9,11]
scale[0] = 0
scale[1] = 2
scale[2] = 4
scale[3] = 5
etc.
then scale[2]
is 4
.
midinote = 4 + 0 + 5 * 12
midinote = 64
When omgnote = 2
, then midinote = 64
. The second omgnote
in the melody is 1
, so:
midinote = scale[1] + 0 + 5 * 12
midinote = 2 + 0 + 5 * 12
midinote = 62
And the third note in the melody is omgnote = 0
.
midinote = scale[0] + 0 + 5 * 12
midinote = 0 + 0 + 5 * 12
midinote = 60
So we've converted 2,1,0
in OMG notes to 64,62,60
in MIDI notes.
To turn a Major scale into a Minor scale, you lower the 3rd, 6th, and 7th notes of the scale. Here's Major and Minor compared:
major = [0,2,4,5,7,9,11]
minor = [0,2,3,5,7,8,10]
The first note in the melody is 2, so using the minor scale:
midinote = scale[2] + 0 + 5 * 12
midinote = 3 + 0 + 5 * 12
midinote = 63
Now the melody begins with 63
, which is an Eb, instead of 64
which is an E like it was in C Major.
Let's change the parameters so the melody is more in the range of a bass guitar, and change the key to F Minor:
- rootnote = 5
- scale = 0,2,3,5,7,8,10
- octave = 3
Just like the last example, we'll be using the Minor scale. This time we're changing the rootnote
to 5
(MIDI note for F) and octave
to 3
, the middle of bass instrument.
midinote = scale[omgnote] + rootnote + octave * 12
midinote = scale[2] + 5 + 3 * 12
midinote = 3 + 5 + 36
midinote = 44
And if you do all the notes, you get melody of MIDI notes that is 44,43,41,43,44,44,44
, which is Mary Had A Little Lamb in F Minor on the bass.
In all these examples, the melody in OMG notes is 2,1,0,1,2,2,2
, even though in each example the MIDI notes played are different.
The formula to calculate the MIDI note from an OMG note can also make chord progressions.
Let's play Mary Had A Little Lamb over a I, IV, V progression, aka 1,4,5. Remember that computers start counting at zero, so instead of 1,4,5 our chord progression parameter is 0,3,4
:
- chords = [0,3,4]
- rootnote = 0
- scale = [0,2,4,5,7,9,11]
- octave = 5
And we change the formula to simply add the chord
to the omgnote
, and find the right note in the scale
:
midinote = scale[omgnote + chord] + rootnote + octave * 12
Because there are three chords in the chord progression (0,3,4), the melody will be translated from OMG notes to MIDI notes three times. The first time will be chord 0
(the I) and so it will be the exact same: 64,62,60,62,64,64,64
.
Next comes the same melody moved to the next chord in the progression, which is 3
. The first note of the melody is 2
, so omgnote = 2
like usual, but we add 3
for the chord:
midinote = scale[omgnote + chord] + rootnote + octave * 12
midinote = scale[2 + 3] + 0 + 5 * 12
midinote = 9 + 0 + 60
midinote = 69
The original melody of OMG notes (2,1,0,1,2,2,2
) after apply all three chords is:
64,62,60,62,64,64,64, 69,67,65,67,69,69,69, 71,69,67,69,71,71,71
Or:
E D C D E E E A G F G A A A B A G A B B B
Change the chords, and key, and scales, and the octaves all you'd like, but you're never actually changing the OMG melody. It has been 2,1,0,1,2,2,2
since the beginning. Having this motif around makes it easy to compose, and easy to mix into other works.
A person listening to something on OMG may say "I really like that bassline", and "I really like that hook in this other song". With OMG, the parts can be combined without modifying the OMG notes at all.
That's because the rootnote
and the scale
and the chord
are applied at run-time to the underlying omgnote
that is stored. The OMG data defines the general idea of the melody, and the song's parameters give it the actual notes.
In Open Music Gallery, being able to mix and match different parts of songs is important, and using OMG notes instead of MIDI notes simplifies that.