If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Specific envelope needed!
27 posts
• Page 2 of 3 • 1, 2, 3
Re: Specific envelope needed!
I modded an envelope by Martin.
This is just to see if it's basically what you want. If you want exponential decay or more, that will have to be down to Martin I'm afraid.
So it's just a proof of concept really. But if it does what you want at least you can make progress with your project until something better comes along.
Cheers
Spogg
This is just to see if it's basically what you want. If you want exponential decay or more, that will have to be down to Martin I'm afraid.
So it's just a proof of concept really. But if it does what you want at least you can make progress with your project until something better comes along.
Cheers
Spogg
- Attachments
-
- env for Tom dev 1.fsm
- 3.06
- (125.72 KiB) Downloaded 1256 times
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Specific envelope needed!
Spogg wrote:I’m becoming progressively more intrigued by the application you have in mind!
Just to repeat back… You stab a note on-off fast. The envelope sets off on its journey, going up one side, pausing for a breather, and then going back down the hill. But, like Sisyphus, if you stab the note again you immediately restart at the bottom again.
If that’s the case there could be a very sudden change of level from max to minimum level. Would that be acceptable or could it cause nasty clicks?
Cheers
Spogg
Yes, the change is of concern, but I wouldn't know how to change just without giving up monophony per osc group to keep it in blue (and I really want that)? Tips more than welcome.
And thank you for your mod, I will test it!
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Specific envelope needed!
For Tom with added exponential.....
Later then, BobF.....
- BobF
- Posts: 598
- Joined: Mon Apr 20, 2015 9:54 pm
Re: Specific envelope needed!
Yes this is pretty close to what Tom asked for. The only optimization I would do is to replace the divisions with reciprocals instead, they use much less cpu:
Its not hard to make this into poly, I have attached a schematic to show it, but unfortunately I only have the FS alpha here so you have to open it to see and do it like that in older versions. To make the envelope exponential you can just multiply the output signal by itself with a single multiplication (insert a multiplication and connect the envelope output to both multiplication input).
- Code: Select all
streamin env; streamboolout done;
streamin a; streamout out;
streamin h;
streamin d;
float cnt=0;
float ahd=0;
float F0=0;
float F1=1;
float inva=0;
float invd=0;
mov eax,ecx; and eax,15; cmp eax,0; jnz hop;
movaps xmm1,a; rcpps xmm1,xmm1; movaps inva,xmm1;
movaps xmm1,d; rcpps xmm1,xmm1; movaps invd,xmm1;
movaps xmm0,a; addps xmm0,h; addps xmm0,d;
movaps ahd,xmm0;
cmpps xmm0,cnt,1; movaps done,xmm0;
hop:
movaps xmm1,F1;
movaps xmm0,env; cmpps xmm0,xmm1,4; andps xmm0,cnt;
movaps xmm2,inva; mulps xmm2,xmm0;
movaps xmm3,ahd; subps xmm3,xmm0; mulps xmm3,invd;
minps xmm2,xmm3; minps xmm2,xmm1; maxps xmm2,F0;
movaps out,xmm2;
addps xmm0,xmm1; movaps cnt,xmm0;
Its not hard to make this into poly, I have attached a schematic to show it, but unfortunately I only have the FS alpha here so you have to open it to see and do it like that in older versions. To make the envelope exponential you can just multiply the output signal by itself with a single multiplication (insert a multiplication and connect the envelope output to both multiplication input).
- Attachments
-
- AHD envelope.fsm
- (48.35 KiB) Downloaded 1252 times
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
Re: Specific envelope needed!
Squaring or cubing the output of a linear envelope generator will give a desirable decay at the end.
But there could be an issue for the attack, because the rate of change at the very start will be slow, and then speed up as the attack phase progresses, and this gives the impression of added latency. For very fast attacks it may not be a problem but for slightly lower speeds (like for strings maybe) it simply doesn’t sound quite right and feels too laggy. You can see this behaviour in Bob’s example.
That why Martin’s exponential envelopes (which I use all the time) have a linear attack and exponential decay and release stages.
The very best type of attack curve is logarithmic or inverted exponential (not sure of the correct term here). It was lucky that analogue synths used the charging of a capacitor for the attack and release stages. For the attack stage it starts off fast and the rate of increase slows down as it approaches the sustain or hold level. Usually the attack “aiming” voltage is higher than the sustain voltage, so on a scope you would only see about 60% of the curve before it held at the sustain level. But you would see the whole exponential curve shape on the release decay.
But first we need for tulamide to confirm exactly what he would like…
Cheers
Spogg
But there could be an issue for the attack, because the rate of change at the very start will be slow, and then speed up as the attack phase progresses, and this gives the impression of added latency. For very fast attacks it may not be a problem but for slightly lower speeds (like for strings maybe) it simply doesn’t sound quite right and feels too laggy. You can see this behaviour in Bob’s example.
That why Martin’s exponential envelopes (which I use all the time) have a linear attack and exponential decay and release stages.
The very best type of attack curve is logarithmic or inverted exponential (not sure of the correct term here). It was lucky that analogue synths used the charging of a capacitor for the attack and release stages. For the attack stage it starts off fast and the rate of increase slows down as it approaches the sustain or hold level. Usually the attack “aiming” voltage is higher than the sustain voltage, so on a scope you would only see about 60% of the curve before it held at the sustain level. But you would see the whole exponential curve shape on the release decay.
But first we need for tulamide to confirm exactly what he would like…
Cheers
Spogg
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Specific envelope needed!
Here is a version with linear attack and exponential release (but an ASM version for the whole thing would be better).
And tulamide's lovely new Slow scope.
Cheers
Spogg
And tulamide's lovely new Slow scope.
Cheers
Spogg
- Attachments
-
- env for Tom dev 2 exp release .fsm
- 3.06
- (117.14 KiB) Downloaded 1265 times
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Specific envelope needed!
I will test the envelope generators now, and will report back, but I'm pretty sure, what Adam provided as ASM code plus a possible switch that allows for Spogg's idea of logarithmic attack + exponential decay (hold is just a straight line, graphically spoken, so linear the only thing that makes sense, I would think?) would be the optimum.
This is, beacuse the envelope would be used for two different applications of data modulation.
Thank you very much for the help so far, and I hope we can get to a final version! Just give me a day for my tests!
This is, beacuse the envelope would be used for two different applications of data modulation.
Thank you very much for the help so far, and I hope we can get to a final version! Just give me a day for my tests!
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Specific envelope needed!
tulamide wrote:(hold is just a straight line, graphically spoken, so linear the only thing that makes sense, I would think?).
Yes, correct. The hold value is exactly 1.0 for the envelopes I shared. ADSRs have a steady "hold" value depending on the Sustain level setting and the length of time is dependent on the time the note is held down, but not so on the AHR envelopes.
Also I should add (and you probably realised already) that you could select between squared and cubed for the exponential decay, to choose a curve shape most suitable for what you need. For a volume contour they sound quite different.
Have fun!
Spogg
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Specific envelope needed!
I've done the tests!
Here's what my dream envelope generator module would be like:
- The attack phase switchable between linear and logarithmic (I want to offer the user the possibility to switch)
- The decay phase switchable between linear and exponential (again, offer it to the user)
- Makes use of Adam's optimizations regarding divisions (currently I have to copy and paste his code with every new version)
The reason I'm asking for these changes to be made, instead of doing it by myself is simple. I'm literally navigating blindly, when it comes to ASM (or DSP), which makes errors propable, if not a sure thing. But I really need this to be a hassle-free, stable, reliable and fast implementation.
The contour of the exponential decay is good as it is now.
The contour of the logarithmic attack should come close to this:
Here's what my dream envelope generator module would be like:
- The attack phase switchable between linear and logarithmic (I want to offer the user the possibility to switch)
- The decay phase switchable between linear and exponential (again, offer it to the user)
- Makes use of Adam's optimizations regarding divisions (currently I have to copy and paste his code with every new version)
The reason I'm asking for these changes to be made, instead of doing it by myself is simple. I'm literally navigating blindly, when it comes to ASM (or DSP), which makes errors propable, if not a sure thing. But I really need this to be a hassle-free, stable, reliable and fast implementation.
The contour of the exponential decay is good as it is now.
The contour of the logarithmic attack should come close to this:
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Specific envelope needed!
Phew that took a while, but I made a version for you where you can change the attack and decay curves however you want, you can drag the curve graphics (taken from Trogs Tools, thanks Trog!). They can go positive or negative. Unfortunately I have only been using the FS Alpha versions for years now so you have to open it with the alpha. All the code is in assembler, optimized to max, enjoy!
- Attachments
-
- env for Tom curve adamszabo (Alpha 2643).fsm
- (47.78 KiB) Downloaded 1251 times
-
- env_curve.png (15.52 KiB) Viewed 20627 times
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
27 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 70 guests