This forum is read-only. Please post new topics in our Q&A forum.

Problem inputting Numbers etc

General discussion about MIDI Translator

Moderators: florian, DvlsAdvct

Post Reply
Peter Nicholson 2
New User
Posts: 4
Joined: Mon Apr 02, 2007 8:35 pm

Problem inputting Numbers etc

Post by Peter Nicholson 2 » Thu Apr 05, 2007 8:51 pm

Hello Florian
I am currently trying to code a translator, in which I want to input a number from 0 to 999.
I can’t use numbers 1 to 0, or Num 1 to Num0, since they are being used already in the, eventual, same preset.
However, I have no ideas, at present, on how to go about this.
I eventually want to output this number as part of an outgoing key-press string.
Your help with this problem would be greatly appreciated.

Also, on 02/04/2007, I placed a posting on the Midi Translator forum. Although I viewed it on the forum the same evening, it has since disappeared!
Have I fallen foul of the forum rules somehow?

So glad I purchased MT Pro, great programme. :D

Also, I was looking through the forum for hints, tips and “clues”, and in particular, at your exchanges with Lowrenzo, which I found most useful. However, I didn’t understand your posting to Lowrenzo dated 11th January 2007, relating to midi volume Up/Down. The precise bit I didn’t understand was the variable gv in the Outgoing: Midi BO 07 gv, where gv appears to be Decimal and not Hex.
As a beginner with MTP, I thought that the midi message should be entirely Hex, but perhaps I have missed the point somewhere?
I would be grateful for your advice on this.

Regards

Peter

User avatar
florian
Bome Software: Founder
Posts: 2435
Joined: Thu Apr 28, 2005 10:09 pm
Location: Munich, Germany
Contact:

Post by florian » Fri Apr 06, 2007 9:34 am

Hi Peter,

as I've already written by personal email to you, I must have accidentally deleted your post among a larger number of SPAM posts (which is a constant problem on these forums). I'm very sorry for this, please post it again from your post's text that I've sent you.

Regarding your questions:

1) outputting numbers
there is not a convenient way, currently, to emulate typing an arbitrary number on the computer keyboard. The only way I see is quite clumsy: use rules to generate the single keystrokes, using the keys 0...9. So in order to generate a number 0<=number<=9, you need 10 translator entries. For the range 10..99 you need an additional set of 10 translator entries, with corresponding rules, too. And so on.

But before I write down an example, I want to first ask back what you mean with "I can’t use numbers 1 to 0, or Num 1 to Num0". I think I may have misunderstood something...

2) hex or decimal in Midi strings
Indeed, this can be confusing. Currently it is like this:
Only in MIDI messages, literal numbers are hexadecimal, without prefix "0x". Variables or other fields where you enter numbers, however, are multi-format, and only the number it represents counts, not which format was used to enter it. So gv can be hex or decimal, but it always represents the same value. Variables in MT are not literal placeholders, but value holders. You can see this effect by defining a rule
pp = 0x10
This rule will from then on be displayed as
pp = 16
which is 100% equivalent to the way you entered it.
Eventually, entering MIDI messages will allow different number formats, too.

Hope that clarifies!
Florian

Post Reply