gibber-cc / gibberish

Fast, JavaScript DSP library that creates JIT optimized audio callbacks using code generation techniques
387 stars 35 forks source link

Cyclic graphs #18

Closed abramhindle closed 7 years ago

abramhindle commented 7 years ago

I don't think gibberish handles cyclic graphs. I tried to take the outputs of a delay and have that feed into the delay. But an infinite loop was hit as the ugen isn't marked or memoized. Even then if you fix that you will quickly find that the code generated doesn't make sense in terms of order of evaluation.

Sent from my Google Nexus 5X using FastHub

charlieroberts commented 7 years ago

You have to manually add a single sample delay (using the SSD ugen). But I appear to have broken that ugen, so I'll leave this open while I fix it. For a complete "fix" I think it needs:

  1. To work :)
  2. To be in the docs (I missed this one)
  3. An example in the playground making use of it

It would be nice if Gibberish automatically detected loops and inserted SSDs. I don't think it would necessarily be that hard to implement, but I haven't looked into it yet and didn't have detection in the prior version of Gibberish either...

charlieroberts commented 7 years ago

OK, all fixed, documented, and demoed in the Gibberish playground, as part of commit 8f6b3f8.

FYI I haven't pushed the changes to charlie-roberts.com yet.

Thanks for filing this! I had no idea I had both broken the SSD and also forgotten to document it.... documentation is found under "Miscellaneous".