How to lower controller data resolution?

dude77's icon

Hey
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).

Thanx!
David

1st Creative Solutions's icon

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
support@1stcreativesolutions.co.uk

www.1stcreativesolutions.co.uk

spectro's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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)...

dude77's icon

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.