Gen~(-erating) externals for Pd (gen_ext)

I’m not sure how much interest there will be in this, but I wanted to share in case it is useful. I’ve had an intention for a while to learn more about dsp coding, and it looks like the gen~ object in Max 8 is a useful tool for rapid experimentation.

But I would love to be able to run the code I can generate with gen~ on my Organelle M. I think a similar thing is possible with the OWL hardware thing, although I have never used one.

So I’ve written a simple template / wrapper system to wrap gen~ dsp code so that it can run in a Pd patch on the Organelle. I’ve only done some basic experimentation so far but it seems to work ok with some example patches from Max, like the gigaverb and squinewave samples.

If you want to play with it, I’ve shared the code and some basic instructions in this repository:

(Note this does not wrap or adapt full Max patches, just the dsp code that you can export from gen~.)

Let me know if you can get it to work :slight_smile:

3 Likes

Thanks a lot for sharing your work, this is huge!

Can’t wait to experiment with it…

Please feel free to share any experimentation you do with it, I’m super intrigued to hear it and see it in action. :slightly_smiling_face:

Thank you!
I’ve ben having fun with it this weekend, trying out different example gen~ patches from the Max help menu. (Oscillators like squinewave, vosim and pulsar, gigaverb, a basic flanger, and the slicer & chopper examples).
Note that gen~ patches that access buffer objects won’t work yet, since I haven’t figured out how to integrate that into Pd.
(A couple patches here and there needed some quick hand-coding to fix incompatibilities with build environments.)

I’ll package something as a usable “patch” and post it here, for others to try.

@Audivit I’ve created a synth patch based on the squinewave and basicflanger examples from gen~ . You can find it here:

It’s an 8-voice polyphonic pad sound.
It’s nothing groundbreaking, but it shows how all these components can be put together.

1 Like

I’ve posted an update to gen_ext so that it can support buffers referenced by gen~ code. They are connected to PureData arrays (with the same name). Cheers.

2 Likes

This is really awesome! I’ve been away from the Organelle and Pure Data for a bit as I’ve been trying to learn and grow my Max skills but got sucked into Gen~ for a while. It’s finally come full circle with this as I was able to use this wrapper to integrate a Dattorro style reverb into an Orac patch and am quite happy with the sound and CPU efficiency this provided! I will be sure to try and implement more gen~ dsp code as patches and now with the support of buffers, it will open up a world of possibilities! If you want to check out my module, you can find it here:

2 Likes

@T8R Great work! I love the cover art for your patch :slight_smile: I’ll check it out this weekend.

For anyone who wants to dive further into gen~ (or just low-level DSP in general) I highly recommend the book Generating Sound and Organizing Time by Graham Wakefield & Gregory Taylor . The ideas presented in that book can be easily translated into Pd externals by way of gen_ext.

2 Likes

That’s what got me into it! Great read!

1 Like

Let me know if there was anything you found in my documentation or the workflow for gen_ext that was confusing or frustrating - I would be happy to look into updating it.

It was honestly pretty seamless. I haven’t tried a patch with buffers yet but when I get there, I will let you know