Dear ChucKists.<br><br>I was running out of fingers and buttons on my joypad... who-ever decided the thumbs should share both the analogue sticks and the buttons on the top? Anyway, I picked up a tilt-sensing joypad. Sadly proper tilt sensors are relatively expensive and games devices typically get made as cheaply as possible (grumble).<br>
<br>To cut a long story short; it sends a fury of values that are somewhere around the value that it needs to be. Result; the poll-rate gets to be a kind of noisy harmonic. So; this leads to the question of how to interpolate this mess without making complex function calls at this high poll-rate and cook the poor CPU before we get any sound made at all.<br>
<br>Solution; as soon as I get the value the axis moved to I write that to a Step Ugen&#39;s &quot;.next()&quot;. Then;<br><br>Step my_axis =&gt; LPF my_interpolation =&gt; blackhole;<br><br>//set to taste, it&#39;s latency v.s. noise<br>
//maybe a rate that&#39;s relatively prime to the poll-rate would be best?<br>5 =&gt; my_interpolation.freq;<br><br><br>then my_interpolation.last() can be polled at whatever rate makes sense. It can also be chucked directly to Ugens like oscillators set to act as a FM synth (use the filter&#39;s gain to scale) or to Gain&#39;s set to multiply.<br>
<br>Very cheap and so far quite pleasant to work with, I thought I&#39;d share.<br><br>Yours,<br>Kas.<br>