From: mrk@gvgspd.GVG.TEK.COM (Michael R. Kesti)
Newsgroups: comp.music
Subject: Re: Technical Problem
Date: 1 Sep 92 00:29:35 GMT
Organization: Grass Valley Group, Grass Valley  CA

In article <1992Aug29.195928.20404@midway.uchicago.edu>
                                              lidz@midway.uchicago.edu writes:

>1.  Whenever I choose instrument 128, it says "Invalid number, choose an
>instrument between 0-127"

Ah, of all my pet peeves, and I have a bunch, this one peeves me the most.
But, don't assume that it is the manufactures and/or the MMA that get to
me, no, it's an education system that teaches us to count "1, 2, 3, 4, 5, 6,
7, 8, 9, 0" and then fails to teach the distinction between enumeration
and ordination.

MIDI messages are built up using STATUS and DATA bytes.  The status bytes
are command specifiers, and the data bytes are parameters to those commands.
To ease protocol parsing programs, the status bytes always have the most
significant bit set, while the data bytes have this bit cleared.  This means
that only seven bits are available to express numbers in data fields.  The
reason that we are permitted a maximum of 128 programs when dealing with
MIDI protocol program change commands is that 128 is the largest number that
can be expressed in seven bits.  What are the actual numbers?  Let's write
them out:

                BINARY     DECIMAL
               --------    -------
               00000000       0
               00000001       1
               00000010       2
               00000011       3
               00000100       4
                   .          .
                   .          .
                   .          .
               01111011      124
               01111100      125
               01111101      125
               01111110      126
               01111111      127

Note that the first number is 0, NOT 1!  Also note that the last number is
127, NOT 128!  But, because of their defective education, many people are
grossly uncomfortable with counting from zero, so some of the manufactures
choose to make life easier for these people, and adjust the numbers.  They
report 1 when the number was 0, 2 when it was 1, etc.  Other manufacturers,
however, see that this is needlessly complicated, and is, in fact, bug prone,
and chose to report 0 when the number is 0, 1 when it is 1, etc.

The result, predictably enough, is confusion on everyone's part.  Just
remember: When a piece of MIDI gear won't accept 128 as the largest number,
it will accept 0 as the smallest.  Either way, there are 128 states.

>2.  All my drum sets are an octave high.  C5 gets changed to C6.

I'm not sure what you mean by "C5 gets changed to C6."  I suspect that nothing
is getting changed and that you might mean "C5 leaving this device is is
responded to as a C6 by that device."  This is sometimes related to the
ordination versus enumeration problem, but is further complicated by the fact
that there is no strict standard concerning the numbering of octaves, and,
again, the manufacturers do the best they can, which is only to remain
consistant within thier product lines.  When sending my Roland D-10's drum
pattern data to an Alesis HR-16, for example, there's a two octave difference!
The Roland's B2 is the Alesis' B0.  Go figure.

-- 
============================================================================
Michael Kesti  Grass Valley Group, Inc. | "And like, one and one don't make
    mrk@gvgspd.GVG.TEK.COM              |  two, one and one make one."
    !tektronix!gvgpsa!gvgspd!mrk        |         - The Who, Bargain