Re: [PD] [pgmout] and [pgmin] values above 128 (127)?

2023-10-11 Thread Ingo
MIDI program changes have always 128 numbers. I.e. a 7-bit number.
However, there are two ways of counting them - either from 0 or from 1.

It's the same problem with MIDI channels.
They are usually counted from one but in the hex number (notes, CCs, etc.)
they are actually counted from zero.

MIDI program change 1 (or sometimes 0) on channel 1 is "C0  00" in hex.
(C = program change, 0 = MIDI channel / 00 = program number 1 (or 0))

MIDI program change 128 (or sometimes 127) on channel 16 is "CF  7F" in hex.


The MIDI channel counting becomes problematic when using modulo . . .
(You have to subtract 1 first then apply modulo and add 1 again.)

Counting always from 0 to 127 would make much more sense.

Ingo



-Ursprüngliche Nachricht-
Von: Pd-list  Im Auftrag von Lorenzo Sutton
Gesendet: Mittwoch, 11. Oktober 2023 17:12
An: pd-list@lists.iem.at
Betreff: [PD] [pgmout] and [pgmin] values above 128 (127)?

I noticed that both [pgmin] and [pgmout] (MIDI program change) are set to
allow maximum values of 128 (127 actual midi sent, counting from zero).

As there is software which is able to send and receive program changes
greater than 127 I'm wondering if this could be changed.

While MIDI (1.0) Program Change messages are notoriously bound to 7 bits, at
least in Linux it seems ALSA sequencer is happy to send/receive program
changes with a value greater than 127 so maybe this could be supported in Pd
(for Linux) as well?

Lorenzo




___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management ->
https://lists.puredata.info/listinfo/pd-list





___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] [pgmout] and [pgmin] values above 128 (127)?

2023-10-11 Thread Lorenzo Sutton
I noticed that both [pgmin] and [pgmout] (MIDI program change) are set 
to allow maximum values of 128 (127 actual midi sent, counting from zero).


As there is software which is able to send and receive program changes 
greater than 127 I'm wondering if this could be changed.


While MIDI (1.0) Program Change messages are notoriously bound to 7 
bits, at least in Linux it seems ALSA sequencer is happy to send/receive 
program changes with a value greater than 127 so maybe this could be 
supported in Pd (for Linux) as well?


Lorenzo




___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list