# Gen~(-erating) externals for Pd (gen\_ext)

**URL:** <https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851>\
**Category:** Hacking\
**Created:** [October 21, 2022, 3:21pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851 "2022-10-21T15:21:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![samesimilar](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@samesimilar](https://forum.critterandguitari.com/u/samesimilar)\
**Post date:** [October 21, 2022, 3:21pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/1 "2022-10-21T15:21:43Z")

</div>

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:

> **[GitHub - samesimilar/gen\_ext: gen\_ext is a wrapper that lets you compile code...](https://github.com/samesimilar/gen_ext)**
>
> gen\_ext is a wrapper that lets you compile code exported from a Max gen~ object into an "external" object that can be loaded into a PureData patch. - GitHub - samesimilar/gen\_ext: gen\_ext...

(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 🙂

---

<div class="post-metadata">

**Author:** ![Audivit](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/audivit/32/5139_2.png) [@Audivit](https://forum.critterandguitari.com/u/Audivit)\
**Post date:** [October 22, 2022, 7:02pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/2 "2022-10-22T19:02:06Z")

</div>

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. 🙂

---

<div class="post-metadata">

**Author:** ![samesimilar](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@samesimilar](https://forum.critterandguitari.com/u/samesimilar)\
**Post date:** [October 24, 2022, 3:01am UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/3 "2022-10-24T03:01:11Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![samesimilar](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@samesimilar](https://forum.critterandguitari.com/u/samesimilar)\
**Post date:** [October 24, 2022, 3:05am UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/4 "2022-10-24T03:05:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![samesimilar](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@samesimilar](https://forum.critterandguitari.com/u/samesimilar)\
**Post date:** [October 30, 2022, 6:15pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/5 "2022-10-30T18:15:02Z")

</div>

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

> **[squinewave-8 | Patchstorage](https://patchstorage.com/squinewave-8/)**
>
> squinewave-8 is a simple 8-voice polyphonic pad sound based on the squinewave~ external. squinewave~ is...

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

---

<div class="post-metadata">

**Author:** ![samesimilar](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@samesimilar](https://forum.critterandguitari.com/u/samesimilar)\
**Post date:** [November 18, 2022, 5:43pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/6 "2022-11-18T17:43:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![T8R](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/t8r/32/5164_2.png) [@T8R](https://forum.critterandguitari.com/u/T8R)\
**Post date:** [May 19, 2023, 5:56pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/7 "2023-05-19T17:56:54Z")

</div>

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:

> **[Datverb | Patchstorage](https://patchstorage.com/datverb/)**
>
> Datverb is a CPU efficient plate style reverb based on the work of Jon Dattorro...

---

<div class="post-metadata">

**Author:** ![samesimilar](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@samesimilar](https://forum.critterandguitari.com/u/samesimilar)\
**Post date:** [May 19, 2023, 7:18pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/8 "2023-05-19T19:18:26Z")

</div>

@T8R Great work! I love the cover art for your patch 🙂 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_](https://cycling74.com/books/go) by Graham Wakefield & Gregory Taylor . The ideas presented in that book can be easily translated into Pd externals by way of gen\_ext.

---

<div class="post-metadata">

**Author:** ![T8R](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/t8r/32/5164_2.png) [@T8R](https://forum.critterandguitari.com/u/T8R)\
**Post date:** [May 19, 2023, 7:36pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/9 "2023-05-19T19:36:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![samesimilar](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@samesimilar](https://forum.critterandguitari.com/u/samesimilar)\
**Post date:** [May 19, 2023, 8:30pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/10 "2023-05-19T20:30:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![T8R](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/t8r/32/5164_2.png) [@T8R](https://forum.critterandguitari.com/u/T8R)\
**Post date:** [May 19, 2023, 9:12pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/11 "2023-05-19T21:12:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![eno\_morricone](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.critterandguitari.com/eno_morricone/32/4499_2.png) [@eno\_morricone](https://forum.critterandguitari.com/u/eno_morricone)\
**Post date:** [July 22, 2024, 12:04pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/12 "2024-07-22T12:04:45Z")

</div>

Apologies for reviving this a year later, but just wanted to thank @samesimilar (and @T8R) for the above work. I was really enjoying working through the Generating Sound and Organizing Time book, being able to integrate ideas from there seamlessly onto my Organelle has been great. Just posted this on patchstorage, made with gen~ externals (including T8R’s plate verb). Cheers!

> **[Ramodulator | Patchstorage](https://patchstorage.com/ramodulator/)**
>
> An additive synthesizer allowing for the exploration of the continuum between amplitude and ring modulation....

---

<div class="post-metadata">

**Author:** ![samesimilar](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@samesimilar](https://forum.critterandguitari.com/u/samesimilar)\
**Post date:** [July 23, 2024, 1:33pm UTC](https://forum.critterandguitari.com/t/gen-erating-externals-for-pd-gen-ext/8851/13 "2024-07-23T13:33:29Z")

</div>

@eno_morricone Your patch looks really cool! Thanks for taking the time to post here. I’m excited to take a look/listen.
