Gen~ Envelope creation/usage

Hi there, newbie here to Gen~, Daisy, and Oopsy :slight_smile: I used to play with Max before and using buffers for envelope creation and usage, I’m hitting the wall now without being able to use buffers :smiley: I’m a bit lost on documentation, a simple test/learning that I would like to achieve would be a simple gen~ patch playing any sound and amplitude being modulated by a given envelope which is activated by some trigger, all inside gen~.

Again, sorry if it’s a super newbie question, but finding it hard for me to find some examples and documentation on this specifically, if anyone can point me to some good docs that would also be great.

Maybe it’s more of a Max Gen~ question than a Daisy one?

Just got my Daisy Patch for my Eurorack system, love the possibilites!
Thanks in advance!

You can use the [data] object in place of [buffer] for just about any task.
The only current way, in my understanding, to fill a [data] is by using the dev fork version to load a .wav file into it, as if for sample playback.
There are also zany calculations you can do with multiple [counter] objects to give you ADSR times which is a good deal more processor intensive but there’s plenty of cycles to handle it.
Switch to the dev branch and look at the sample playback example.
You could “easily” load a custom envelope into a [data] disguised as a wav and use [sample] to interpret position/value

1 Like

I do a lot of data initialization for fixed envelope shapes using a little codebox. E.g. if you have [data foo 1024] then in a codebox:

// makes sure this only happens when the patcher loads:
if (elapsed == 0) {
   // for each sample frame of the [data] object
   for (i=0; i<dim(foo); i+=1) {
     p = i/dim; // phase of envelope from 0 to 1
     // insert your envelope algorithm here
     // e.g. a half-sine:
     v = sin(pi * p);
     // write the value `v` into data `foo` at position `i` and channel `0`
     poke(foo, v, i, 0);

If you are worried about performance, bear in mind that this only runs when the patcher first loads, and will produce much smaller code than anything loading a WAV file. :slight_smile:


Max msp does a good job of hiding it’s examples for gen. Go to “help → examples → gen”

Usually help just has text manuals so for me it wasn’t the intuitive place to look. Theres a lot there/

Just FYI, .wav file loading is out of dev version. Its in normal now.


Also in Max you can search using Max’s “File Browser” window.

Yes there’s a lot of gen~ examples – I’ve been adding more and more every year :slight_smile:

1 Like

Hi, thanks for sharing! Indeed I’ve started following the examples, was not seeing it before :smiley: so thanks for that! And thanks for contributing with examples, appreciated!

This is great, thanks!

Maybe you have found it by now, but there is a user made package for gen~ called synthcore. By a guy called yofield. Or Ernest. Anyways he has lots of useful gen~ stuff. Like THE most useful gen~ stuff (outside of Graham’s work of course).

There’s some useful EQ stuff. And just search the max forum for synthcore. It’s amazing.

Unfortunately the yofield synth core project has been abandoned by Ernest and I can’t seem to find anywhere to download the packages
Seems he had a change of heart and reposted the project!
It’s all here!

Yeah he just came out with a new update. I’d like to think inspired partly by me lol. It was abandoned and I tracked down his linked in contact and sent him a message and paid him like $10 for the whole thing since it wasnt anywhere. He was prolly gonna do it anyways, but I wonder if that played a part in him getting interested in it again.

1 Like