Support

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

Plucked or exponential decay

For general discussion related FlowStone

Plucked or exponential decay

Postby jacob » Fri Jul 12, 2013 11:21 pm

I would like to create a volume decay (envelope) like a plucked string has.

Like this one (hand drawn):

s97sg7f39hc87g9sdf52.jpg
s97sg7f39hc87g9sdf52.jpg (8.59 KiB) Viewed 9942 times

I would like to be able to control with knobs the decay time (duration (0-20 seconds) from volume 1 to 0) and the amount of the exponential effect.

I could not find the way to do it. Does anyone have any idea how this can be done?
User avatar
jacob
 
Posts: 9
Joined: Thu May 31, 2012 9:14 am
Location: Germany

Re: Plucked or exponential decay

Postby MyCo » Sat Jul 13, 2013 12:15 am

Have a look at this:
http://synthmaker.co.uk/forum/viewtopic ... =30#p61053

When curve turned to the right, the envelope gets the shape you want. For plucked string, you have to turn Sustain & Release down to zero, and only use the decay.
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: Plucked or exponential decay

Postby jacob » Sat Jul 13, 2013 12:36 pm

Great, that is exactly what I need. Also the Attack, Sustain and Release could be useful actually.

I guess I have to trim this down, understand it and create my own code to use.
User avatar
jacob
 
Posts: 9
Joined: Thu May 31, 2012 9:14 am
Location: Germany

Re: Plucked or exponential decay

Postby jacob » Sat Jul 13, 2013 2:09 pm

Maybe you could help me with this :)

What does the first part do?

8a97fuiz2i2.PNG
8a97fuiz2i2.PNG (17.28 KiB) Viewed 9923 times


I see a knob value with 0-1 comes trough. But what is sharpness and scale for?

The result of the "exp" box is bewteen 0-10 - the scale float multiplied the 0-1 result up to 0-10.

Actually I can simply delete the "exp" box and it still works. Is that exp-box only for making the knob exponential in it's behavior - like becoming more sensible in higher or lower knob ranges?

And the hop-box does what? Making it hop some samples to not be calculated?

The main variables needed before the code comes are: decaySamplesHoped, decayStepSize and curve( 1 to -1 )?

But I guess the code which calculates the decay is the most important. But it is written with the assembler - I don't understand that :)

Is the assembler more efficient in cpu usage than the code or why do you use it? If yes, how much :)

I need the most important part: the decay calculation. If on every sample the volume becomes calculated through a code block, I need a simple calculation which uses the current time already passed (which gets updated on every cycle within the variable currentSample). And there would be two other knobs to control the curve in it's shape/exponantial and tell the code how long the decay should last.

Let's say I have these current values:
currentSample = 200
decayTime = 44100 samples (would be one second)
curve = not sure what is needed here (maybe the exponent)
maxVolume would be 1 I guess

Can I calculate the currentVolume with only these values on every cycle?
User avatar
jacob
 
Posts: 9
Joined: Thu May 31, 2012 9:14 am
Location: Germany


Return to General

Who is online

Users browsing this forum: Google [Bot] and 89 guests