Kyma Forum
  Kyma Support
  Non-Hex MIDI Message Formatting

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Non-Hex MIDI Message Formatting
fader8
Member
posted 08 April 2010 08:52         Edit/Delete Message   Reply w/Quote
OK, I'm feeling a little brain-dead about this at the moment, but I'm confused about formatting the Bytes field in the MIDIOutputEventInBytes prototype.

The default example is "144 60 127" which results in a Channel 1 Note On C3 vel 127.

OK, the note number and velocity are apparent, but how the 2 nibbles of byte 1 are expressed, channel number and message type, is where I'm stuck. What would this message look like if it were, for example, channel 16 Note Off? Or a CC on channel 11?

IP: Logged

SSC
Administrator
posted 08 April 2010 23:02         Edit/Delete Message   Reply w/Quote
You can enter the values in hexadecimal if you prefer:

0xC0 0x3C 0x7F

IP: Logged

fader8
Member
posted 09 April 2010 10:36         Edit/Delete Message   Reply w/Quote
"0xC0 0x3C 0x7F"

Ah, that's interesting. I had been entering hex based on the recommendation in the Help. So, Note On - Ch 1 - C3 - vel=127, expressed as:

16r90 16r3C 16r7F

which is the same as:

0x90 0x3c 0x7f

which is the same as the decimal format:

144 60 127

So, my brainfart mistake was converting the hex for the channel and message type separately, which is silly and just results in 90 anyway.

Any reason the Help recommends the 16r prefix rather than 0x?

IP: Logged

SSC
Administrator
posted 09 April 2010 14:16         Edit/Delete Message   Reply w/Quote
quote:
Any reason the Help recommends the 16r prefix rather than 0x?

The 16r is standard Smalltalk. We added 0x for convenience later. Either one will work for expressing hex numbers.

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c