Hi,
I would like to know if there is already a way to generate quadratically interpolated noise similar to SC LFNoise2(http://doc.sccode.org/Classes/LFNoise2.html)
Thank you.
Yiannis
LFNoise2: Quadratically Interpolated Noise
Hi,
I would like to know if there is already a way to generate quadratically interpolated noise similar to SC LFNoise2(http://doc.sccode.org/Classes/LFNoise2.html)
Thank you.
Yiannis
After searching further about the LFNoise2 ugen I found sc4pd: SuperCollider for PureData, a port of some SuperCollider UGens to PD objects (https://github.com/pd-l2ork/pd/tree/master/externals/tb/sc4pd).
I tried to compile for windows (I managed to compile flext that was required) but I had no luck.
I wonder if anyone know if the compiled binaries of sc4pd are available for download or if anyone could have better luck on compile sc4pd.
the only native pd objects that do 4 point interpolation are tabosc4~ and tabread4~ (and maybe vd~??)
but there will be several ways to do what you want using pd objects.
here's a quick patch i made using a prewritten table of a few seconds length, and then reading it using tabread4~ driven by a phasor~. The speed of the phasor~ is like the 'freq' input of the SC UGen.
Not sure how close this comes to the sound of the original, do you want to have a listen and see?
Also, I could probably use a much smaller table to store the initial noise signal. Too small though, and it gets noticeably cyclic at high frequencies.
Thanks! Actually it sounds very close to the SC's LFNoise2.
I will try to create a patch without the prewritten table and I will post it here for comments.
good luck!
as the only native pd objects doing cubic interpolation are table reading ones, if you want to use them without a prewritten table, then you need to find a way to constantly rewrite to a smaller table.
The problem i found with that method, is that there's no way to sync the table write speed to the table reading speed. This results in clicks everytime the read and write positions overlap, when you get 4 completely new values for your cubic interpolation.
Perhaps the best way to write a patch without a prewritten table would be to put a proper cubic interpolation system into a patch either as basic arithmetic [*~ ], [+~ ] etc, or in [expr~] objects.
but the maths behind that give me a bit of a headache:
That's exactly what I am trying to do. To write a patch that will do the interpolation without the tabread4~
I'll let you know if I succeed!
Awesome! If you get stuck, just post your patch as an attachment here, and hopefully we can help you out with some ideas.
a native pd way to do 4-point would be awesome.
The problem I have is that I need to make the calculations and play the audio data in the sample rate of the pd but this can not be done using [metro]. As I read in a previous post [metro] minimum interval is 1 millisecond.
Is there an alternative way to achieve a fastest metro (at 1/44.1)?
You really should do everything as signal objects, if possible.
Using control objects for generating audio gives all sorts of trouble with timing and whatnot.
have you got the equations for the interpolation figured out? if so, i'll help you put them into signal objects.
i just had a mess around with some stuff, and came to the realization that 4 point interpolated noise is probably going to end up sounding quite similar to noise that is fed through a lowpass filter.
But plain white noise through lop~ won't give the sound you want, because it doesn't have that shaped stepping colour like the supercollider ugen would give.
So, what i did was first cut the noise source into steps, using a phasor to trigger samphold~ steps. Then lowpass the results of that to round the edges off.
The result is a patch which i think has all the character you'd hope for, and sounds at least as good, if not better than the table driven one i posted before.
i made a couple of little enhancements too, by adding a second offset samphold~ and a tanh~ saturator to give a bit more body to the sound.
it's not the 4-point algorithm you were originally looking for, but if sound is the main issue, then i think this is probably quite good.
Thanks, this is very close to the sound of the real interpolated noise.
In the meantime I manage to create a patch that generates Cosine Interpolated Noise (because the calculations are simpler and the results quite similar).
I have attached the patch for reviewing.
A last question is how can I get the the noise data in numbers and not in signal. I tried to use unpack instead of unpack~ but it didn't worked.
it's 4 am on a thursday night here, so i cant offer too much, but as you can see, there is a serious issue with dragging the pitch in that patch - lots of clicks.
it does sound different and much more edgy that the one i posted though. a glitch-free version would be super cool
Oops! Looks like something went wrong!