Trying to build an per harmonic partial ADSR envelope...

I've been working on an additive synth for quite some time and one of the major hurdles is creating a per harmonic envelope generator.
How would you go about creatind a per harmonic envelope with up to 512 harmonic envelope layers where each harmonic fades in and out according to it's own adsr modulator?
Does anyone have any ideas about how to achieve this?
Thanks.
P.S.
There is an ADSR envelope in the partials framework, but it works in a way that is not compatible with my structure and it's formatting leaves me a bit confused as to how it's working so studying it hasn't been much help.
Comments
-
if you look at the most recent files i posted to this thread it is setup to have different decay times for different partials, think it wouldn't be too difficult to adapt for what you're describing here
0 -
I don't think that's going to work, I'm trying to create this end result.
I want to be able to create complex ADSR patterns in this sequencer style editor where the top is attack, the second down is decay, the third is sustain and the bottom is release.
I need a serialized ADSR envelope where it processes each harmonic individually according to it's own envelope time settings.
I've been experimenting with the partials framework ADSR module but it doesn't seem to process harmonics individually the way that it says it does.
0 -
i can not for the life of me fathom how that picture relates to values for partials over time lol
but separate envelopes per partial is totally possible
if you're doing it per partial, that may mean you need that many separate envelopes. that's a lot of dang envelopes. if that's what you're trying to do, maybe you could clock the envelopes at event rate to save on cycles?
0 -
If you're using a Sine Bank, and I wouldn't use anything else, they can be clocked at a maximum event rate of 1 kHz.
So, I'd do that, using an iterator, and have a core cell that contains a single ADSR envelope with 512-element arrays containing all the relevant values: the attack times, the decay times, the current values, etc.
I would store the envelope times/sustains in the Table Framework.
Every 1ms the iterator will send a Start event, 512 Index events, and an End event.
And the Sine Bank will smooth, using its internal ramp generators, the values from that 1 kHz sample rate to the audio sample rate.
The complicated part is the ADSR envelope itself. But I think it's quite possible.
It just occurred to me that I once built such a thing. Instead of ADSR envelopes it has up to 600 rate/value envelopes for the amplitude (and also pitch) of each harmonic. The envelope data comes from Fourier analysis of clarinets and is stored in Table Framework modules.
Are you interested? It works. It's not in the UL. Should I post it here?
-1 -
Yeah, let me see it, I already built something very similar for this synth, but I'd like to see how your's is different.
it's called the organicus engine, it scans through a sample and extracts harmonic amplitude data over time that can be used like a wavetable to modulate harmonic amplitudes to create organic fades and movements in synthetic sounds.
I just wanted to build a manual 512 index adsr so that you could create custom harmonic fading patterns for pads and soundscapes and such.
The thing that is leaving me scratching my head is that with an ADSR I need to have the envelope pick up where it left off from the previous iteration cycle.
I trigger a note and it starts the attack, we'll say 1 second on index 0.
It scans through the other 511 indexes starting the attack on all of them at different rates.
Now we cycle back to index 0 and it has to pick up where it left off and I'm not sure how to achieve that.
0 -
The picture is a graph/seq style editor where the first column down is A,D,S,R for partial 1, and the second is for partial 2 and so on.
0 -
ah ok, i think i can see it now
so what's the impediment to building it? seems pretty straightforward. you just need a whole boatload of envelopes, either unrolled monophonically or spread across a bunch of audio voices
edit: listen to chet not me he's totally got the right idea lol
0 -
Michael, the instrument was too large to attach here so I've messaged you a google drive link to it. Let me know if you have any problems downloading it.
Upon loading it you can play it using the mod wheel as an expression control. It contains Fourier specifications for four clarinets.
The table framework samples are not embedded. The Data subdirectory must be in the same location as the ensemble itself.
Find the sine bank synthesizer at Beauchamp Clarinets Ens > Beauchamp Clarinets > Beauchamp Engine > Sine Bank Synthesizer. Inside you'll find the iterator, the Sine Bank itself, and the "Sine Bank Driver" core cell, which is where your ADSR envelope would go.
The magic begins with the iterator, which generates the proper events, in sequence, for the driver to load the sine bank with values.
The driver is complex because it's stepping through tabular Fourier data for pitch, amplitude, and initial phase. Your 512-harmonic ADSR envelope should be simpler. You're only building one, really, indexed by the core cell's Har (Harmonic) input. You might need 512-element arrays for storing the attack times, decay times, sustain levels, release times, current values, and current states.
It's occurred to me that LazerBass is this same kind of synthesizer. It's a Sine Bank whose harmonic amplitudes are controlled by algorithms which simulate filters, among other things. It might be worth a look.
0 -
maThe ADSR modules are event driven but do use some cpu. However you can underclock them which basically slows down fast rise and fall times which aren't always necessary. It's possible your best bet is to share envelope generators with your harmonics. Envelope generators produce levels but those levels can also run thru a square root or other math formula that can effectively alter the envelope. So basically you can use a single ADSR module and run the output to many of your individual harmonics. So as an example you might use 16 ADSR modules and each one can control 32 partials. By using mathematics after the envelope generator you can effectively change each of the 512 partials. So instead of using 512 ADSR modules you only use 16 and each one is followed by a formula. You can end up with 512 math routines but if they don't use much cpu it might work out. I would suggest using a single ADSR followed by the squaring module and listen to what it does. After that try to use the exponent module that raises a ADSR value to something different than a squaring circuit. There's an equivalent core module too. The mathematics may make it easy to sound design your partials. I would also use a master to adjust each individual ADSR at one time. This way you can get the basic envelope established pretty easily. Each envelope generator can still be adjusted independently but the ADSR of each one will still move with with master. I did this in FM12 which is currently in the UL if you want to see how a master can affect all 6 envelope generators. The exponent or raise to the power module shown can work magic in controlling the harmonics or partials. Combined with 16 envelope generators you might have something there that is easy to program and makes musical sense. Most natural instruments can be easily synthesized with FM synthesis if you have enough operators and associated envelope generators. It's not nearly as complicated as pure additive synthesis because FM works much like natural instruments do. But additive synthesis is the cream of the crop if done properly. But that is your main problem right there. It takes a lot of resources to do real time and most use precompiled lookup tables that hold the envelopes of the partials. As a side note, some mathematic formulas are actually faster than lookup tables that hold data in main memory. So basically, you've gotten into something that might be a frustrating mess if not approached properly. Good luck with it!
0 -
This is "Per partial ADSR envelope Part 2"…
I took a break from this because it was getting too frustrating, but I decided to come back and give it another shot and I got it working properly (Almost!!!).
I've got the attack, decay, sustain and release stages responding properly to the grid/sequencer style adsr control panel and I'm getting really good results out of it.
The top graph controls attack times per partial, the second down is decay, the third is sustain, and the bottom is release.
The A, D, S, R knobs scale the ADSR graph times to be either greater or lesser that the graph itself.
The LFO knobs below them send the LFO to modulate that scaling knob.
The MP knob controls the maximum partials for testing purposes. (32-512)
The attack, decay, sustain, release buttons below the graph will randomize the associated graphs.
The 2 major issues I have left to resolve are that I can't quite find a way to add Attack to Decay looping, and the decay time values have a strange effect on modulating the sustain levels.
The internal structure is like this…
The attack, Decay and Release modules all have a "Write" control inside of them tha look like this…
The latched read & write "S" (Sustain) port is responsible for controlling which stage of the envelope is processing.
The attack processes when the sustain stage is written as a 2, the Decay when the sustain stage is written as a 1 and the release processes when the sustain is written as a 0.
The "Decay" module is responsible for both the decay and sustain stages.
If I modulate the sustain level while the decay time values are set at 0 it modulates the sustain levels without smoothing them out, if the decay times are above zero it smoothes out the sustain modulation in a way that makes the modulation almost useless.
I've tried just about everything that I can think of to correct this issue, but so far nothing has worked.
As far as creating an attack, decay, attack, decay looping mechanism, I've also tried everything that I could think of without finding a functional solution.
Ive attached the test ensemble for, well, testing if your curious to try and help.
Ideally I'd like to add a separate sustain stage that could be modulated without the decay time values affecting it, but everything that I have tried just hasn't worked so far.
If you play test snaps 4, 5 and 6 you will see the negative affect that the decay time has on the sustain level modulation.
Does anyone have any ideas about how to achieve this functionality?
As always, thanks to everyone in this forum.
Best regards, Michael
0 -
Older post re-opened and merged with the new one
0 -
Yeah, that would probably be best, just to keep it all in one thread, thanks.
0 -
There are other envelope generators to work with. I used one in FM12 and wished it would decay in the sustain area. Turns out there is a mode for the one I used that allows that. The problem is, I don't remember what it was or how I did it but there are two modes now. If I had to do it again I would have custom created my own envelope generators. I only picked one that had a graph but in the other mode the graph was no longer correct so I just used a scope to show the envelope in real time. I've never actually made a full blown envelope generator but it can't be that hard. I think the only hard part is shutting in down at the end of its cycle so it doesn't set there and loop, eating cpu.
0 -
It's in here somewhere.
0 -
I've tried modifying this one to work on an indexed per partial basis multiple times and It just hasn't worked at all, I'm trying it again as we speak.
The issue is that it indexes 6 points of data per envelope stage, now getting those 6 points to index according to 512 harmonics is proving to be a bit trickier than expected.
Making that envelope type loop and modulate is no problem, its getting it to index that's the issue.
0
Categories
- All Categories
- 18 Welcome
- 1.6K Hangout
- 66 NI News
- 857 Tech Talks
- 4.4K Native Access
- 17.5K Komplete
- 2.1K Komplete General
- 4.6K Komplete Kontrol
- 6.1K Kontakt
- 1.6K Reaktor
- 397 Battery 4
- 887 Guitar Rig & FX
- 450 Massive X & Synths
- 1.4K Other Software & Hardware
- 6.1K Maschine
- 7.8K Traktor
- 7.8K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators