Forums > Jitter

int to float how to do smooth interpolation ?

July 7, 2013 | 5:13 am

Hi everyone,

The problem.
I send midi from ableton Live into max and then to a I want to use the midi to transform the rotate xyz.
Soooo midi 0 – 127 (so it’s 128) to rotateX 0-360.

I tried expr $f1 /127. * 360.
but the numbers jump in a very visible way which makes the movement very choppy.

I tried line after the expr object with a smooth time of 100, but when I go from say rotate 0 to rotate 180, it spins way too fast.

I’ve gone through the forums the whole day but can’t find what must be a simple solution or is it ? ;-)

From what i gather its smooth interpolation, jus can’t nail it.
Any and all help appreciated !

July 7, 2013 | 8:05 am

sounds like you need in your life!

July 7, 2013 | 9:34 am

Hi Wetterburg,

I know the basics of anim drive , and I fed midi into it but it only has one speed setting for all midi coming in, so If i have a midi square or saw line which, so it could be the right thing to use but I’m not sure how. Ableton live is my sequencer which alters bpm with the midi clips adapting to the main bpm. Any clue how to sync anim drive to a Master bpm ?

July 7, 2013 | 9:36 am

Simply put if i have a midi ctrl data going from 0 to 127 in 4 seconds and staright after that 0 to 127 in 2 seconds just turns at the same speed

July 7, 2013 | 1:04 pm


(oh sorry, this thread just reminded me of one of the best projects ever: almost everyone feels some frustration at some point having to find the right interpolation, so satisfying to throw it out the window for a change :)

July 7, 2013 | 2:03 pm

From this:

I tried line after the expr object with a smooth time of 100, but when I go from say rotate 0 to rotate 180, it spins way too fast.

it seems like you’re trying to use interpolation to replace your messages; you’re sending the 0, then the 180, and it spins real quick, yeah?

Well, I think that typically the interpolation in line, line~, slide~, whatever, are used to smooth out the steps inbetween, rather than provide the whole line.

Try drawing your curve, the steppy one from earlier. Then feed that through a really fast line – you want that line object to simply draw the steps inbetween, not provide the whole ramp, if that makes sense?

Sorry, if I’m misreading you there – it’s sometimes difficult to see what people want to do from reading text online. is mega-awesome for things like this, though, you really should consider giving it an extra chance. The @speed argument is "units per second", so you can do some really simple math to figure out how fast it needs to be.

Another idea could be to switch to pitchbend messages for the finer stuff? Or map a live.dial to live instead – that way you can do higher resolution data, too, iirc, and send that as "anything but midi" across to max. We use 32-bit floats in my orchestra, it works really well over UDP.

July 7, 2013 | 2:05 pm

oh, to specify a bit: you can still send the raw, low-res midi in, and use that to control, it’ll do smoothing, if you need it to, and you can turn it off, in the case of "square wave" stuff. But perhaps start by eliminating midi values, since Live itself is plenty capable of doing much higher-res automation things.

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