[PD] xeq & bending

Michal Seta mis at creazone.com
Wed Oct 30 00:06:02 CET 2002

On Tue, 29 Oct 2002 18:04:46 +0100
Krzysztof Czaja <czaja at chopin.edu.pl> wrote:

> Czesc Michal,
> thanks for a bug report... actually, two bug reports -- one for
> xeq_parse, the other for the Pd's 'bendin'/'bendout' code!
> 1.
>  > When I print from the [xeq_parse]'s 6th outlet I get: 14401
>  > and I don't understand why...
> and rightly so, because I screwed things up.  It should have sent
> 8432.  Pitch bend data is little-endian (while midi files use
> big-endian numbers, and I guess I was then assuming everything was
> big-endian:)


> 2.
>  > bendin object lets me read a 14 bit(?) value for pitch bend (out the left outlet) and 
> channel (right outlet).
> yeah, it is in the range 0..16383.  But the range accepted by
> a 'bendout' object is -8192..8191.  So instead of
> [bendin]->[bendout] one has to put [bendin]->[- 8192]->[bendout].

I was gonna answer that 'hmm... however when I record a sequence and then play back I get the right behaviour' and noticed that when I convert [bendin] output to msb+lsb I got them swaped on the output.  So, feeding [xeq_parse] directly into [bendin] gives the right result now.  Thank god for mistakes.

However, I think only [bendout] is -8192..8192, no? [bendin] seems to be behaving correctly. 

> do you really mean maxlib -- I have thought 'midiparse' was
> available through the cyclone only.

Yeah, sorry.  midiparse from cyclone.

> 4. (lots of bugs here)
> I have all but started a 0.2 branch of xeq.

Well, for now I deal with what I have :)

Thanks for clarifications.


More information about the Pd-list mailing list