Translating Note On to Letters A-G

ian

2007-01-19 08:41:58

Hello,
I have a sight reading game called jayde musica which does not support midi inputs. When you see a note on a staff, you press the corresponding letter.

I've created a translator for each midi note on a standard staff to convert the midi input to the letter. Unfortunately, i had to use rules for every single note.

Is there a way to use a variable within a translator rule so that instead of having to have separate rules, the correct letter can be send no matter what midi note comes in ?

i.e.

MIDI 90 3C xx = C
MIDI 90 30 xx = C
MIDI 90 3E xx = D
MIDI 90 32 xx = D

florian

2007-01-20 04:57:11

Hi Ian,

would you mind posting your .bmtp file (or a significant portion of it) so that we can check it out?

Thanks,
Florian

elfchief

2009-04-24 03:20:17

Ok, so I know this is replying to a reeeeeally old posting, but I looked through everything newer and haven't seen anything else asking a similar type of question, so here I am, bringing up the past. ;)

Did we ever find a way to do what the original poster was requesting? I'm wanting to do something similar ("translate every A to A#" for example) and don't see a way to do that short of hardcoding a rule for every separate A on the keyboard (and every other key I want to do the same thing with), which just seems silly and impractical.

It'd be easy to do with a modulus function, but we don't seem to have that, so *is* there a way to do this?

Thanks!

-j

ruediger

2009-05-07 14:41:50

Hi,

sorry. At the moment you have to hardcode this.

Cheers,
RĂ¼di

florian

2009-05-11 23:51:21

you can always simulate the modulus function, it is the remainder of a division:

Code: Select all

Translator 1: Setup note in variable ga
INCOMING: MIDI IN: 90 pp qq
 - uncheck "Stop processing" flag
Rules:
 ga = -1
 if qq = 0 then exit rules, skip outgoing action
 tt = pp / 12
 tt = tt * 12
 ga = pp - tt
OUTGOING: (none)

Translator 2: send letter C
INCOMING: MIDI IN: 90 pp qq
 - uncheck "Stop processing" flag
Rules:
 if ga != 0 then exit rules, skip outgoing action
OUTGOING: KEY C

Translator 3: send letter D
INCOMING: MIDI IN: 90 pp qq
 - uncheck "Stop processing" flag
Rules:
 if ga != 1 then exit rules, skip outgoing action
OUTGOING: KEY D

...and so on...

Translator 13: send letter H
INCOMING: MIDI IN: 90 pp qq
 - uncheck "Stop processing" flag
Rules:
 if ga != 11 then exit rules, skip outgoing action
OUTGOING: KEY H
Hope that helps!
Florian