Codebox efficiency / for loop and if

    Jul 18 2015 | 3:07 am
    I'm new to gen and not a very good programmer, so was wondering if anyone would look at my patch and see if anything could be done about the efficiency of [gen~] in this patch.
    The patch is an attempt to imitate stochastic synthesis, and uses [codebox] to write sample values in a triangular shape to a Data object. My guess is I'm missing something with regards to for() loops and if(), but it could be something else.
    Average audio CPU usage shows 8.81% with gen taking 90.5% of that.
    Any help appreciated. Thanks.

    • Jul 18 2015 | 10:11 am
      Thanks, Raja. Super helpful, I was wondering about how often the for loop is running. You're right about changing every phase of the wave too, otherwise it leads to distorted effects which seems to be the kind of sound-world covered by this release:
      btw, to get audio going you need to start the Clock, move some params around and choose a fundamental... maybe. I've change the way the patch works and UI elements have been moving around, so might not be clear how to get sound on first use!
      Anyway, thanks again, much appreciated!
    • Jul 18 2015 | 10:21 am
      Average 3.36% CPU. Booyah. Raja, you legend.
    • Jan 30 2016 | 3:04 am
      i really find this patch interesting. quick question, what is preventing me from seeing all the objects and connections. it seems like a phantom patch! would like to dissect it and learn more.
    • Jan 30 2016 | 9:55 am
      It's in Presentation Mode, which hides the connections. Control + alt + E on PC to switch to edit mode. Command + alt + E on Mac (from memory).
    • Jan 30 2016 | 10:01 am
      Attached the latest version. Has some improvements.
    • Jan 30 2016 | 12:53 pm
      Really impressive patch, great job.
    • Jan 31 2016 | 5:42 am
      I did an update. You can draw the oscillator shape in the function (though still restricted to triangle type waves). And the controls are simpler. Thanks for the kind words.
    • Feb 03 2016 | 3:37 am
      really quite great sounding
    • Feb 04 2016 | 8:15 am
      Cheers. I am quite happy with it. I recommend opening 3 or 4 instances, you can get quite a thick sound. I'll probably make a [poly~] version at some point.