## MIDI Pitchbend Range

Dec 5, 2006 at 9:10am

# MIDI Pitchbend Range

I am new to Max/MSP and I am having some problems getting it to do what I want.

I would like the pitchbend wheel to send a range of data from -2 to 2. So if the pitchbend wheel is stationary (64) it would send a value of 0. If it were completly to the left (0) it would send a value of -2 and completly to the right (127) send a value of 2.

So far I could only figure out how to send a range of zero or greater (0-1) but nothing negative. I know this is more of a math question but I just can’t seem to wrap my brain around how to approach this.

Any help would be greatly appreciated. Thanks!

#29048
Dec 5, 2006 at 9:33am

#89863
Dec 5, 2006 at 9:42am

#89864
Dec 5, 2006 at 9:50am

This is exactally what I needed!

xbendin also gives me a much greater range of control.

Thanks much!

#89865
Dec 5, 2006 at 10:25am

#89866
Dec 5, 2006 at 3:57pm

On Dec 5, 2006, at 3:25 AM, Peter Castine wrote:

>>
>> [scale 0 127 -2. 2.]
>> or
>> [zmap 0 127 -2. 2.]
>
> Note that for both of these, MIDI 64 is mapped not to 0.0 but to
> 0.015748.
>
> The MIDI value range 0-127 is asymmetrical, and forgetting that is
> something you do at your own peril.
>

It’s symmetrical, just not symmetrical around an integer axis.
Anything can be split in half – whether the mid-point is where you
want it is another story. ;)

—-
Steven M. Miller

Associate Professor of Contemporary Music
College of Santa Fe
Contemporary Music Program
1600 St. Michaels Drive
Santa Fe NM 87505
http://pubweb.csf.edu/~smill
(505) 473-6197

SFIFEM
Atrium Sound Space
OVOS

#89867
Dec 5, 2006 at 8:54pm

On 5-Dec-2006, at 16:57, Steven Miller wrote:

> It’s symmetrical, just not symmetrical around an integer axis.
> Anything can be split in half – whether the mid-point is where you
> want it is another story. ;)

Except that your mid-point is not an element of the set of MIDI
values. What bit pattern represents 63.5 in MIDI?

And the problem is that the MIDI spec declares 64 as the mid-point
for pitch bend, leaving 64 distinct ‘flat’ values but only 63 ‘sharp’
values.

Yeah, I saw the smiley.

BTW, you might want to take a look at coll.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de

#89868
Dec 5, 2006 at 9:59pm

On Dec 5, 2006, at 1:54 PM, Peter Castine wrote:

> On 5-Dec-2006, at 16:57, Steven Miller wrote:
>
>> It’s symmetrical, just not symmetrical around an integer axis.
>> Anything can be split in half – whether the mid-point is where you
>> want it is another story. ;)
>
> Except that your mid-point is not an element of the set of MIDI
> values. What bit pattern represents 63.5 in MIDI?

Exactly…we are in agreement!

>
> And the problem is that the MIDI spec declares 64 as the mid-point
> for pitch bend, leaving 64 distinct ‘flat’ values but only 63
> ‘sharp’ values.

Very true, the MIDI spec is asymmetrical with regards to pitchbend;
the range 0-127 isn’t (necessarily).

> BTW, you might want to take a look at coll.
Thanks, I know of coll. My understanding is coll uses ints as
indices. I can’t use, for example, the words ‘cat’ ‘dog’ and ‘monkey’
as indices, can I? Or am I missing something in the reference pages?

Thanks!

—-
Steven M. Miller

Associate Professor of Contemporary Music
College of Santa Fe
Contemporary Music Program
1600 St. Michaels Drive
Santa Fe NM 87505
http://pubweb.csf.edu/~smill
(505) 473-6197

SFIFEM
Atrium Sound Space
OVOS

#89869
Dec 9, 2006 at 11:05pm

Steven Miller wrote:
> It’s symmetrical, just not symmetrical around an integer axis. Anything
> can be split in half – whether the mid-point is where you want it is
> another story. ;)

In most centered midi controls like pan you want it exact in the middle
and you need one midi value (integer) to place it there.

Another approach is this:

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 133 133 28 196617 t -2.;
#P flonum 40 159 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 40 91 35 9 0 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 40 133 91 196617 scale 1 127 -2. 2.;
#P newex 40 111 103 196617 split 1 127;
#P fasten 4 0 3 0 138 154 45 154;
#P connect 0 1 4 0;
#P connect 1 0 3 0;
#P connect 2 0 0 0;
#P connect 0 0 1 0;
#P window clipboard copycount 5;

Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#89870

You must be logged in to reply to this topic.