ahh you must be a processing guy if your asking for a map function. that was my first question when i started using qc as well. its surprisingly simple. i got all kinds of cool math expression trick answers but psonice's answer resonated the most with me and that was to use interpolate. right click on the interpolation patch and set it to external time. then what ever you feed into the patch time input will get scaled to your start and end ranges.
i found i do this so much i made my own function that works a little better if you know the ranges your dealing with.
the only caveat here is that you need to know the original range your values are in to map them properly. if you don't really have any clue what your input ranges are then the stock interpolation patch would be a better fit.
ahh you must be a processing guy if your asking for a map function. that was my first question when i started using qc as well. its surprisingly simple. i got all kinds of cool math expression trick answers but psonice's answer resonated the most with me and that was to use interpolate. right click on the interpolation patch and set it to external time. then what ever you feed into the patch time input will get scaled to your start and end ranges.
i found i do this so much i made my own function that works a little better if you know the ranges your dealing with.
http://kineme.net/composition/dust/JavaScriptMapFunctionInterpolatableCu...
the only caveat here is that you need to know the original range your values are in to map them properly. if you don't really have any clue what your input ranges are then the stock interpolation patch would be a better fit.
Mathematical Expression patch will do that
e.g. a/.9 * 360
Or, you might want to consider Interpolation patch to, with external patch time.
Dust, your solutions works great.
you are rite I am cousin to processing I use arduinos. thanks
Harrisonpault your soluton also works great....
this solutions are great, now my next journey is how to smooth those values ( the smooth patch) works but makes everything go over values