Forums > MaxMSP

How to lower controller data resolution?

Oct 05 2011 | 12:31 pm

I’m looking for a way lower the resolution of the output data of a midi controller that i’m sending out of Max(such as bendout).
I’ve been using the slide object to smooth the in/output of controllers but now i’m looking for a way do exactly the opposite, so that data will be output in jumps of 5,10 or as many values as i decide (and still keep the ranga of 0-127).


Oct 05 2011 | 12:45 pm

Have a play with multiplying, adding or dividing the data based on the input value before it’s sent out. Then use an operator such as [if] to stop data passing out if it exceeds 127. Be careful not to get float outputs otherwise MIDI won’t recognise them.

1st Creative Labs Support Team

Oct 05 2011 | 12:51 pm

A simple way would be to use two consecutive [scale] objects. In the attached example 14bit Pitchbens (0-16383) is being forced to a range of 0 -15 (16 steps) and then scaled to a range 0 -127. You’d obviously need to massage the settings to get what is right for your specific use(s)…

-- Pasted Max Patch, click to expand. --

Oct 05 2011 | 7:01 pm

thanx for the tips.
the patch is simple and yet very efficient.
the only thing i modified is the second scale object, instead i used a zmap so that data from my different controllers wont exceed 0-127.

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

Forums > MaxMSP