Know Your Nodes pt 5 & 5.5 - Splines & Streamlining a Large Patch

spline
wavetable

#21

Nice! How did you end up installing sox? I need to update my instructions, and while I have my preferred way, I want to make it as friendly as I can.


#22

There is a website called Mac AppStore.org where you can use Homebrew to install them. Here it is for sox. You only have to install Homebrew once and after that it’s easy peasy. I installed fftw3 the same way too.


#23

How long should your wav files be as my test file was way too long (solid green line rather than dots)?


#24

Like it filled up the whole spline node? I would have liked to see that.

edit: try 600 samples, that’s the adventure kid library’s resolution.


#25

They’re serious about just a single cycle. The more complicated your wave, the more points in your spline.


#26

Even at 600 samples or 17 ms at 44.1 sample rate, there are way too many points on the spline.
image


#27

Yeah, I don’t do a ton to prevent craziness… the software was built around the Adventure Kid’s stuff, which is pretty much invariant. Probably if you get over 1000 or so, the software should ask if you’re sure, or just not do it. It just gets too big.

In theory I could have it downsample, since that’s a reasonably straightforward operation.


#28

For another data point, the WaveEdit software appears to spit out 256 samples, which is probably more than enough.


#29

Down sampling is the way to go as even at an 8k sample rate that’s a lot of points.


#30

That looks about right, actually. Alternatively, you can place a spline over your wavetable and trace it.

May-15-2018%2016-40-28


#31

I used samples from it and there were still too many for me. I think the easiest solution is to get a very noisy sample and grab a very small portion and then down sample that if needed.


#32

Do any of you have a sense for how many samples make a good wavetable? Balancing performance with quality, it likely depends on your hardware, but there’s no sense in having an oscillator be so demanding.


#33

Seems like around 600 is pretty common, but I think we can get away with less on Audulus, the linear interpolation mitigates stair-stepping at low frequencies.


#34

I’ll see if I can add some code to optionally downsample. sox will do it for me, so I can probably just lean on that.

In theory I could try to detect if a WAV file is more than one cycle. It would be easier on the user… just record a clip from your synth or whatever and throw the software at it, but there could be dragons down that road.


#35

I’ve been having fun with the tracing method, and then playing with the phasor shape.


#36

Here I just grabbed a few seconds of a very noisy 44.1k sampled audio wave with lots of noise. It worked great. On iOS, I used the TwistedWave app to grab the sample. This work flow works great for me and the resulting splines have a good balance between detail and being easy on CPU.


#37

Awesome! You should consider making a screen capture tutorial! Also, I love twisted wave, so simple yet so powerful.


#38

I’m not as industrious as you so tracing seems way too analog and labor intensive. I encourage you to try the few millisecond noisy sample approach.


#39

I’ll follow your lead and do a video, it’s been a very educational process for me and fairly easy to do now that it’s setup.


#40

So it looks like you two are just using the spline node? I could easily make a version of this that skips the anti-aliasing and management cruft and just spits out a spline node. Would that be useful?