lalo ·
hi guys! is there a way to 'smooth' a float/integer signal with a lpf? as i tried..seems that poly input in lpf does'nt accept float/integer streams... or am i wrong? thanx lalo
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
lalo ·
hi guys! is there a way to 'smooth' a float/integer signal with a lpf? as i tried..seems that poly input in lpf does'nt accept float/integer streams... or am i wrong? thanx lalo
malc ·
Hi lalo,
You should be able to use the filter in the way you describe. It's not the most efficient way of smoothing the float change but if you're not too bothered about performance then it should work.
There are other ways to do this but ideally we should have a component that does the smoothing using floats as this would be the most efficient.
I hope this helps. let me know if you still have trouble with the LPF.
lalo ·
thanx malc! 😉
but when i insert my lpf the sound stops...
we'll see 🙂 thanx lalo
malc ·
I put a very basic example here
If you turn the knob when playing a note you should get the desired effect. Let me know if this does what you want.
stefan ·
quite easy to implement a simple first order lowpass in the code module as well. pseudocode:
PolyIn in; PolyOut out; float lastOut = 0.0; float cutoff = 0.01; out = in * cutoff + lastOut * (1.0 - cutoff); lastOut = out;
Should be doable for monophonic signals as well ofcourse. You could ofcourse make the cutoff an input as well. Tweak the cutoff value to suite your needs. (between 0.0 and 1.0)
lalo ·
thanx guys! i'm not a math-smart guy at all 🙂 ..but is it possible to try interpolation algorithms with the code component?.. i mean polynomial, spline etc...
thanx lalo
stefan ·
lalo wrote: thanx guys! i'm not a math-smart guy at all 🙂 ..but is it possible to try interpolation algorithms with the code component?.. i mean polynomial, spline etc...
thanx lalo
yes 🙂 lowpassing can be seen as an interpolation algorithm as well.
lalo ·
sure 🙂
the only thing is....how can i understand in an easy way those math interpolation methodes having studied to much Plato and Aristoteles and not enough algebra/calculus when i was young and dummy (now i am old and dummy) at gymnasium? 😀 can anyone do an 'math interpolation for dummies' tutorial ? 😉 lalo
jorge ·
we have been trying stefan's filter and it seems to work well for smoothing the float values. Cutoff at 0.01 seems to be a good choice, although for analysis purpose here is a schematic that lets you look at the response of the filter for a variable cutoff:
[old link]
lalo ·
WE??? 🙂 🙂 🙂
jorgemalc the ultimate sci-fi monsterrrrrr 😀
lalo
stefan ·
Hold on. Did I write in correct syntax? I did not even try to! I said pseudocode ffs! 🙂
malc ·
And damn good pseudocode it was stefan - it certainly did the trick 🙂
Thanks.
Wrote something here? To have a post removed or your name hidden, write to [email protected].