Convert blues scale

florian

2009-07-31 14:35:21

A user asks this:
Hello
is your Midi Translator capable to Translate betwen Music-Scales?
Midi-In = C-Blues Scale
Midi-Out = F-Blues Scale
it is possible to Progaramm it as VST-PlugIn?

florian

2009-07-31 14:46:35

Bome's Midi Translator does not ship with pre-defined scales per se, but it's easy to convert it yourself.

An incoming MIDI Note message will look like this (hexadecimal; notation):

90 pp qq

Where pp is a variable for the note number. This is just a number in semitones. E.g. 60 is middle C, 61 is C# (or Db), 62 is D, etc. 72 is the next octave's C. See also
http://www.harmony-central.com/MIDI/Doc/table2.html
qq is the velocity, i.e. how hard you hit the key. We generally pass through the velocity.

Now in Midi Translator Pro's rules, you can define rules to map pp to another note.

If you just want to scale all notes up by 5 semitones (from C to F), just add 5 to pp and output the new MIDI message. Here is the full translator:

Code: Select all

Incoming: MIDI 90 pp qq
Rules:
  pp=pp+5
Outgoing: MIDI 90 pp qq
If you want an arbitrary mapping, you can do that, too: for example, to map an incoming D to a D#, use such a rule:
if pp==62 then pp=63

You can add as many of such rules as you want.

Now a problem comes up when you want to map 62 to 63, and 63 to 65 (i.e. D# to F). if pp==63 then pp=65

Then the first "if" statement would map 62 to 63, and the second would map it immediately to 65.

Therefore it's a good idea to temporarily use a second variable, say rr, for the modified semitone. We initialize it with the incoming note:

Code: Select all

rr=pp
if pp==62 then rr=63
if pp==63 then rr=65
pp=rr
At last, we assign pp back with the possibly modified value of rr.

Now probably, your conversion is independent of the octave (i.e. all D's should be converted to D#, and all D#'s to F. For that, we split pp into the octave oo and pp becomes the note number from 0..11:

Code: Select all

oo=pp/12
oo=oo*12
pp=pp-oo
rr=pp
if pp==2 then rr=3
if pp==3 then rr=5
pp=oo+rr
As you can see, now the "if" statements only test for pp values in the 0..11 range. At last, pp is set to the octave plus the modified rr value.

Hope that makes sense!
Florian