|
127 question
|
View this Thread in Original format
| djsphere |
anyone knows why is 127 the max value in Reason? just a random value or there is an explication.
doesen't bother me at all i'm just courious. |
|
|
| BOOsTER |
midi has 128 values for each controller...well actually you won't see 128 as value because it's sorta like 127 + 0
the 0 is counted as value therefore making it 128 possible values...that's why 127 is max |
|
|
| djsphere |
| ah...didn't know that, thx :) |
|
|
| Christian Ö. |
| quote: | Originally posted by BOOsTER
midi has 128 values for each controller...well actually you won't see 128 as value because it's sorta like 127 + 0
the 0 is counted as value therefore making it 128 possible values...that's why 127 is max |
I knew that, but i wonder why it's 128 and not for example 100 which would be much more logical.
Is there any explanation? |
|
|
| MrJiveBoJingles |
2, 4, 8, 16, 32, 64, 128.
I would wager it has something to do with those values, which are commonly used in electronic stuff of all kinds, but I am not sure what. |
|
|
| Majutsu |
| that's always the max midi value for anything as said above 0-127 |
|
|
| Corteoz |
Reply to Christian Ö. and MrJiveBoJingles
What's 2^7? (Binary = 1111111)
It's 128.
That means that we have the 128 numerical values ranging from 0 to 127.
The reason they use these values is because they're easier to process in the programming.
It's quite simple. I've just started my education withing computer science, and this is one of the first things we learned. |
|
|
| djsphere |
| quote: | Originally posted by Corteoz
The reason they use these values is because they're easier to process in the programming.
|
And that my friends is the corect answer. |
|
|
| PutBoy |
It's the way binary code is coded.
a 7 bit-value's max is 127. Why 7 bits you wonder?
Might be different reasons, but most likely it's really 8 bits and the 8th bit is used as a so called 'flag' of some sort, perhaps telling the computer wheter the number is negative or positive. It might still be something else though.
8 bits = 1 byte, and that's the reason it's 8 bits of all numbers. And, I don't think it's 7 bits, a computer doesn't really process 7 bits. It only really processes 8 bits at a time, ie 1 byte. |
|
|
| Low Profile |
A regular Midi CC message is actually more than 8 bits, it carries 7 bits of information (0-127) as well as other information:
from Wikipedia:
Physically it consists of a one-way (simplex) digital current loop serial communications electrical connection signaling at 31,250 bits per second. One start bit (must be 0), eight data bits, no parity bit and one stop bit (must be 1) is used.
I'm guessing that for a simple control change at least 2 messages must be sent, one for the CC number, another with the value, and then perhaps a third message for the channel number??
Modern Computers (PC's and Macs) process in heaps of bytes, this is not universal for all digital electronics. For example, even though most vintage samplers used 8 bit, and later 16 bit samples, there were the occasional 12 bit samplers. :D |
|
|
| DJ Shibby |
This is half the amount of the maximum data capacity of a byte variable type of a programming language, one of the smallest types.
Nothing to do with 7s, only 8s.
Why 128 and not the actual size of the variable, which is 256?
Because you need to take into account the negatives and positives, -127 to +127, and there you have your 256 with some room left for "flags". |
|
|
|
|