Wavetable Oscillator
  • Here's an attempt to create a wavetable oscillator, use the 'Wave' dial to sweep the table. The 'PM' dial adds phase modulation which is key tracked using the 'KT' button.

    I'll add more explanations later.

    Also included is a demo sequence driving this polyphonically using a bunch of library sequencing modules.

    Can coax a wide range of sounds out of this one :)

    image
    Screenshot 2016-04-03 02.02.16.png
    1350 x 560 - 192K
    afta8.WTOsc.audulus
    31K
    afta8.WTOsc SeqLoop.audulus
    446K
  • This thing sounds great! You aren't kidding about a ton of available sounds - really versatile sound. Thanks for sharing :)
  • How does this work exactly? I am guessing it is sort of downsampling two synced phasor sines and crossfading them to get a range of different shapes.. but its almost too few objects for me to wrap my head around.. I was expecting opening this up and you having a ton of manually made graphs with the spline hahah
  • @MacroMachines, this patch has been heavily optimised since the first prototype so probably easier to explain using an earlier iteration of the design (see attached).

    So the basic concept started from using mux8 nodes to make custom waveshapes, you can see this in the 'Custom Wavetable' Sub patch.. This has 8 wave steps which can be adjusted by the dials and you can see the wave shape in the meters. Each step can interpolate to the next step and this can be shaped using the spline node. The 'Sqr' fades in the non-interpolated waveform.

    So beyond that I started looking at how to set the wave steps programatically using 8 sine waves each out phase with each other. The 'Wave' dial sets how much each step is out of phase, if you adjust this you will see the meter nodes change to show the waveform. This is how you get the wavetable effect.

    Then I started modulating the frequency of the 8 sine waves, which can be adjusted using the 'PM' dial.

    This was then simplified into the design posted in the OP. The only difference is that I did away with the mux8 nodes as this restriction of 8 steps wasn't needed. In the final version the resolution can be set using the 'Wres' dial.

    Hope that helps explain it :)

    I think this design could be developed more by looking at other ways to set the wave shape programatically.. The only issue with the whole thing is antialiasing which is inherent in this design and beyond my understanding on how to fix it
    aftab.WTosc 1st prototype.audulus
    45K
  • @Afta8 what kinds of sounds can this generate? Can you upload a patch that has some examples of how to use it to produce what? I think sometimes we do too infrastructure but not much to showcase it (talking in general not to you). I don't know how/when to use a wavetable like the one you created. Thanks :-)
  • @fferreres, there is a demo patch in the first post which kinda shows it off. Other than that it works like a stock Osc node, plug it in tweak some dials ;)
  • image
    I've been working on a ton of little waveshaper nodes using expressions, im going to submit them, should be coming in the next release update
    image.png
    2732 x 2048 - 666K
  • @MacroMachine, these add a lot of new possibilities for generating new tones, timbres, new sounds :-) lots of creative possibilities. How do you come up with so many ideas so rapidly?

    You've definitely been having lots of fun. Thanks for (later) including these in the next update
  • It's growingimage
    image.png
    2732 x 2048 - 1M
  • Now I am really curious how these sound :-) Hope to run these through an FFT node if we ever get one too to see what these translate to! The waves look pretty artistic too.
  • @MacroMachines can u post a downloadable file for the last patch u have with all the waveforms, i so i can study dem n learn to make my own?
  • @btayloragent these will be coming in the library update very soon. They are mainly expressions I experimented a bunch to come up with, not the best learning resource as I am having a hard time making notes for some of them that will explain what they do. Mostly I recommend playing with running a ramp from 0-1 (phasor / (2*pi)) into an expression and play with different equations.
  • @macromachines, great stuff looking forward to all the new things :)

    On a sort of related note, I came across this recently: https://en.wikipedia.org/wiki/Superformula

    It could make for an interesting oscillator if adapted to Audulus, sadly I don't have time to figure it out right now (need to convert polar formula to rectangular I think).. any Math heads fancy taking this on?
  • http://www.procato.com/superformula/?q[shape]=0

    There is a jitter implimentation in maxmsp gen~ Which I am checking out right now. I think I also have a shader version of it somewhere in vertex displacement glsl.

  • Here is the code from the max msp gen~ code box for the visual 3d shape generator version:

    // 2D superformula, phi in range [0, 1]
    superformula(phi, a, n) {
    C = pow(abs(1/a.x * cos(a.z*phi*pi*0.5)), n.y);
    S = pow(abs(1/a.y * sin(a.z*phi*pi*0.5)), n.z);
    return pow(C+S, -1/n.x);
    }

    superformula3D(coord, a1, n1, a2, n2) {
    // polar coordinates
    r1 = superformula(coord.x, a1, n1);
    theta = coord.x;

    r2 = superformula(coord.y, a2, n2);
    phi = coord.y;

    r1r2 = r1*r2;
    // cartesian coordinates
    return vec(r1r2, r1r2, r2)*sphere(vec(theta, phi));
    }

    pos = superformula3D(in1, in2, in3, in4, in5);
    color = abs(pos);

    out1 = pos;
    out2 = color;
  • Here is a good video that talks about cartesian to polar coordinates and how to use the super formula for visual elements in processing:
  • did the forum always post embedded youtube videos like that???
  • Ok made polar to Cartesian converters, and about to make the super shape
  • @macromachines - yes, you might have to get rid of the httpS in an address, but yeah.
  • @macromachines - thats awesome, thanks it really helps.. also love how graphics processing techniques can be used in audio.. Processing looks pretty cool too!

    Anyway I had a stab at it following the video and made this, not sure if I got it right but it sounds cool!
    SuperFormula Osc demo.audulus
    59K
  • These look great. @MacroMachines, is that set of wavefolders released yet? Would really love to check those out.