Binary... WTF does that have to do with MIDI?

  • Thread starter Thread starter bigwillz24
  • Start date Start date
MIDI communication is binary... 1's and 0's. All things digital are.
 
How correct you are but I'm looking to get a little more specific. Maybe I should ask this question.

If it is only 1's and 0's how do you end up with a velocity of 127?
 
Aw, man. I can only say that the binary representation expresses a control parameter to the device and the the 127 is the decimal expression of that action. After that, I'm telling stuff I vaguely remember. And not sure I still believe
 
bigwillz24 said:
If it is only 1's and 0's how do you end up with a velocity of 127?

because a certain sequence of a set number of 1's and 0's is translated to 127. there is a standard that lays out what the status and data bytes are

http://www.midiweb.com/info/library/midi-specification.shtml

and even better: http://www.pan.com/earlevel/MIDI/MIDI Overview.html

god, this brings back scarey memories. translating from decimal to binary to hex and back. :eek:

it's just like any computer command. how does typing on a keyboard translate to binary? how does binary translate to 3D graphics? the wonders of computers I guess
 
Thanks for the links... I'm asking this stuff because I'm having a little trouble in Midi class.
 
bigwillz24 said:
I'm having a little trouble in Midi class.
Have I given you my midi 101 links yet? If not, they're certainly worth reading. Here's part one and part two. They may be a little basic for you, but we can all use a refresher course now and then...
 
lbanks said:
Aw, man. I can only say that the binary representation expresses a control parameter to the device and the the 127 is the decimal expression of that action. After that, I'm telling stuff I vaguely remember. And not sure I still believe

Decimal is a numeric encoding of data that is base 10
Binary is a numeric encoding of data that is base 2
Octal is a numeric encoding of data that is base 8,
Hexadecimal is a numeric encoding oif data that is a base 16.

So, let's take a randome number, 21(10) (the 10 here would be subscript, which means base 10.

Decimal: 21
Binary: 10101
Octal: 25
Hexidecimal: 0015
 
Base 10 means that you have ten digits to represent numbers. 0-9, then you have to bump the next "place" with a 1 and start the place to the right over again at zero: 10, 11, 12, etc.

Base 2 means there are only two digits used. 0-1, then the same basic rules apply -- add another digit to the left and start the one to the right. So after 0 and 1, the next value is 10 (which is the same as decimal 2), then 11, then 100 (which is decimal 4), and so on.

Octal uses 0-7, and hex has sixteen digits -- the extra digits are realized by adopting the the first six letters of the alphabet... 0-9 and a-f. All the same rules apply...
 
0
1
00
01
10
11
000
001
010
011
110
111

so im supposed to be counting like this?

:confused:

0 = 8 bits

00 = 16 bits

I'm not comprehending this at all...
 
bigwillz24 said:
I'm not comprehending this at all...
Yep, that's how I felt 20 years ago. You don't have to understand to play, but I always felt I was missing out. :confused:

Damned lead paint!
 
fraserhutch said:
Decimal: 21
Binary: 10101
Octal: 25
Hexidecimal: 0015

Ok so 10 + 10 + 1 = 21 is basically what the binary is saying i think...

Let me se if i got it right....

Decimal: 16

10+01+01+01+01+01+01

Binary: 10010101010101

man for some reason after typing that I think I'm lost again.
 
let's try this again, my previous post didn't format the way i typed it...look at this pic
 

Attachments

  • untitled.webp
    untitled.webp
    15.4 KB · Views: 56
basically just remember the pattern 128, 64, 32, 16, 8, 4, 2, 1

if you are given a binary number that is NOT a multiple of 8, you have to add the 0s to it. like fraserhutch gave you 10101
well, add three more 0s to the front of it to get 00010101

now add the numbers uptop i gave you to their corresponding 1s.
128=0 so that's no number to add
64=0
32=0
16= 1 so put that number aside
8=0
4=1
2=0
1=1

now add all the numbers you got 1 for.....16+4+1=21
tada!!

does that help?
 
so 16 is

00010000

& 17 is

00010001

HOT DAMN THANK YOU SO MUCH!
 
16 = 00010000 binary = 0001 0000 = 10 hex

17 = 00010001 binary = 0001 0001 = 11 hex
 
bigwillz24 said:
16 = 00010000 binary = 0001 0000 = 10 hex

17 = 00010001 binary = 0001 0001 = 11 hex

yep...very nice.
:cool:

of course, a lot of people get rid of the extra zeros on the front of the binary numbers. but i think keeping it in groups of 8 helps with the math...not only because there are 8 bits in a byte, but also when converting to hex you got your groups of 4 layed out for you. but since you don't need the first three zeros in those numbers, you can drop them when you're done...but just don't forget that they're there if you need 'em!
 
Thereya go! Now you're getting it!

When you feel more comfortable, let me know, and I'll give you a little primer on doing the math. Once you spend a little time with it, everything becomes WAY clearer.
 
Back
Top