Forums > MaxMSP

Why pgmin and midiin differs when receiving midi?

October 25, 2007 | 11:00 pm

Hi all,

Does somebody can explain me why when I send a midi program change with number 1 on channel 1 from a midi-footboard I get a message with PC=1 from pgmin and a message with PC=0 from midiin? This is kind of weird, and it’s the same for all other value : midiin give a value minus one than pgmin…. !??


October 25, 2007 | 11:20 pm

0 is the first value of 0-127 (a total of 128 values represented –
the range of a 7-bit controller in MIDI). There was never any real
standardization, as far as I could tell, as to whether a given synth
manufacturer started their program numbering with 0 or 1. Humans
think in terms of 1-128, computers ‘think’ in terms of 0-127.

I’g guess that [pgmin] was made to be more ‘human friendly’ and so
starts its count at 1 because that’s the way humans typically think,
vs. [midiin] starting at 0 because that’s actually the first value in
the range and closer to the way the computer represents it. [pgmin]
adjusts to you, [midiin] does not. Note that, in reality, when you
receive 0 from [pgmin] it has actually received a hex value of 00
from the MIDI stream, and when you send 1 via [pgmout] it actually
sends a hex value of 00.

Just an idea…

On Oct 25, 2007, at 5:00 PM, Bruno wrote:

>
> Hi all,
>
> Does somebody can explain me why when I send a midi program change
> with number 1 on channel 1 from a midi-footboard I get a message
> with PC=1 from pgmin and a message with PC=0 from midiin? This is
> kind of weird, and it’s the same for all other value : midiin give
> a value minus one than pgmin…. !??

—-
Steven M. Miller
Professor, Contemporary Music Program
College of Santa Fe

Home < http://pubweb.csf.edu/~smill>
SFIFEM <
http://sfifem.csf.edu>
Atrium Sound Space <
http://atrium.csf.edu>
OVOS <
http://pubweb.csf.edu/~smill/ovos.html>
CMP <
http://www.csf.edu/csf/academics/cmp/index.html>


October 26, 2007 | 1:08 am

On Oct 25, 2007, at 5:20 PM, Steven Miller wrote:

> 0 is the first value of 0-127 (a total of 128 values represented –
> the range of a 7-bit controller in MIDI). There was never any real
> standardization, as far as I could tell, as to whether a given
> synth manufacturer started their program numbering with 0 or 1.
> Humans think in terms of 1-128, computers ‘think’ in terms of 0-127.
>
> I’g guess that [pgmin] was made to be more ‘human friendly’ and so
> starts its count at 1 because that’s the way humans typically
> think, vs. [midiin] starting at 0 because that’s actually

By the way: I meant to write below: "when you receive 1 from [pgmin]
it has actually received a hex value of 00…" – sorry for the
possible confusion.

> the first value in the range and closer to the way the computer
> represents it. [pgmin] adjusts to you, [midiin] does not. Note
> that, in reality, when you receive 0 from [pgmin] it has actually
> received a hex value of 00 from the MIDI stream, and when you send
> 1 via [pgmout] it actually sends a hex value of 00.
>
> Just an idea…
>

—-
Steven M. Miller
Professor, Contemporary Music Program
College of Santa Fe

Home < http://pubweb.csf.edu/~smill>
SFIFEM <
http://sfifem.csf.edu>
Atrium Sound Space <
http://atrium.csf.edu>
OVOS <
http://pubweb.csf.edu/~smill/ovos.html>
CMP <
http://www.csf.edu/csf/academics/cmp/index.html>


October 26, 2007 | 8:48 am

Thank you very much Professor Miller.

Indeed, it is my footboard which is ‘user friendly’, as possible values are [1-128] instead of [0-127]. So when I send a 1 from it, it send a hexa value of 00. I didn’t notice this before as I reprogrammed the footboard so it never send a value of 0. That’s why I was very surprised to get a 0 in Max.


Viewing 4 posts - 1 through 4 (of 4 total)