Playing with wavetables
  • I'm playing with an idea but am running into limitations in my ability.

    Since I've been able to generate Audulus patches with code, I figured I would wire up some mux nodes and phase through them very fast to make a wavetable of sorts. I've attached a first pass that I generated from a wave file (AdventureKid's single cycle waveforms):

    However, it's aliasing a bunch. There are a number of places where I could be going wrong:
    - not understanding how to filter the signal coming off a wave table like this
    - not actually parsing the wave file correctly
    - not implementing my mux64 nodes correctly

    Anyway, I'm going to keep tinkering with it.
  • I've thought about this too. The aliasing is probably due to the bajillion switches and how Audulus doesn't always scan inputs at audio rates. That said, the patch sounds good and I'm really curious how you are able to generate audulus patches code. Did you backwards engineer the code or something?
  • RobertSyrett I've been building up some code here:

    The key pieces for the wavetable part are audulus.rb and build_wave_table_node.rb (both written in Ruby).

    I did reverse engineer the Audulus patch format, which as of Audulus 3 is straightforward and pretty easy to work with.
  • This is massively insane and I'm soooo glad you wrote code to write it for you lol I thought at first you did each one of these samples by hand!

    I told Taylor about this hopefully he'll check it out tomorrow - would love to see what he thinks of the git stuff you linked to - a little beyond me, but it might spark some ideas for him! :)
  • And yeah it's aliasing like a mofo but it also sounds awesome.
  • This looks promising:

    Specifically: Gibbs Phenomenon

    There’s one last thing. When generating signals with fast transitions, we have to apply a little bit of filtering during the construction of the wavetable. The Gibbs Phenomenon is caused by the sharp cutoff at the Nyquist Rate of the summation of the partial factors, the individual frequency components, of the wavetable we are building. The fact that we stop abruptly at the Nyquist Rate causes ripples in the pass band. This is noticeable when you build a wavetable that you’ll see ripples in the wavetable near sharp transitions. It is very audible in the signal. So, each sample must be multiplied by a factor to low-pass filter the array, reducing the amplitude of the higher partials as the summation approaches the Nyquist Rate. Each sample should be multiplied by:

    m = cos^2((current_partial)-1)*(pi/(2*total_number_of_partials)