sinusoids~ and multiple amplitude envelopes

Ben Carey's icon

Hi all,

I have come back to experimenting with additive synthesis after a while doing other things. I was wondering if I could have some advice about changing the amplitude envelopes of several oscillators at once using CNMAT sinusoids~. In the attached patch I am triggering an adjustable number of oscillators, whose frequency and amplitude are chosen from within a specified random range for each.

As the number of oscillators is adjustable, I would like to find some way of drawing two or more amplitude envelopes to control the amplitudes of multiple oscillators at once. For example, if the randomly chosen amplitude falls between 0 and 0.5 this then would trigger a line to ramp up these amplitudes to double their strength, and if it falls below 0.5 ramp down to half their strength etc. As I am grouping these values into lists to be laced together using zl, I was wondering if anyone had any suggestions on how to go about this? I have tried a number of ways but keep coming back to needing to use the pack object, which as my number of oscillators is variable, does not serve my purpose.

Any thoughts or suggestions are appreciated.

Ben

Ben Carey's icon

here is the patch

Ben

Max Patch
Copy patch and select New From Clipboard in Max.

Holland Hopson's icon

It seems like you want to have finer control over individual sinusoidal componenets, yes? Otherwise the solution you have seems to work: set frequency/amplitude pairs and then use an envelope to scale the overall levels. So for multiple envelopes you'd want to generate them in place of your random amplitude range, that is, before [zl lace]. You could create a few "target" amplitude lists and then scale/morph between them. Below is a handy abstraction for scaling lists. You can use a few of these in parallel and add the resulting lists together for a list morphing hack. I've also seen [pattr] used to morph lists.

Max Patch
Copy patch and select New From Clipboard in Max.