[PD] bendin-bendout under Linux

Ingo ingo at miamiwave.com
Tue Oct 4 06:21:56 CEST 2011



> -----Ursprüngliche Nachricht-----
> Von: pd-list-bounces at iem.at [mailto:pd-list-bounces at iem.at] Im Auftrag von
> Lorenzo Sutton
> Gesendet: Montag, 3. Oktober 2011 22:25
> An: pd-list at iem.at
> Betreff: Re: [PD] bendin-bendout under Linux
> 
> On 03/10/2011 20:13, Nicola Pandini wrote:
> > Il 03/10/2011 19:33, Mathieu Bouchard ha scritto:
> >> Le 2011-10-03 à 19:29:00, Nicola Pandini a écrit :
> >>
> >>> Hi, I'm trying to build a patch that routes notes, CCs and pitch bend
> >>> from a keyboard to different synths.
> >>> Everything is ok for notes and CCs, but I have a problem with the
> >>> pitch bend.
> >>> It seems that [bendout] can outputs only a range between 0 and 16384,
> >>> while the correct range should be -8192 +8192.
> >>> I tried to force negative values but it seems that bendout can't go
> >>> below 0.
> >>
> >> use [- 8192]
> >>
> >> because 0-8192 = -8192
> >> and because 16383-8192 = 8191
> >>
> >> that is, in unsigned values, 8192 is the middle of the range.
> >>
> >
> > You right, but I already tried this:
> >
> > #N canvas 93 232 450 300 10;
> > #X obj 82 77 bendin;
> > #X obj 82 102 - 8192;
> > #X obj 82 130 bendout 1;
> > #X connect 0 0 1 0;
> > #X connect 1 0 2 0;
> >
> > And bendout had only a range from 0 to 8192, it didn't go below 0.
> >
> 
> Strange I tested (with rosegarden and gmidimonitor) on 0.43 and it
> worked outputting the whole range -8191 to 8192.
> Lorenzo


This depends on how the software is "displaying" pitchbend. Pd always uses 0
- 16383. MIDI does always transmit 7-bit values from 0 - 127 (except for
SysEx). This is a 14-bit message cascaded by two 7-bit messages - each going
from 0 - 127.

Generally the msb is being used and the lsb is left at 0 (maybe it's the
other way around). This means the center value of Pitchbend is 64 0.
You can eliminate the second byte by dividing by 128.

For displaying the value is offset by 8192 by certain softwares to show
negative values. Some people might think it looks more understandable to
have the same range going negative or positive for bend down / bend up. But
the numbers still go from 0 - 16383. Center is 8192 or 64 0.

Ingo




More information about the Pd-list mailing list