Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ampeg curves #2

Open
paulfd opened this issue May 27, 2019 · 3 comments
Open

ampeg curves #2

paulfd opened this issue May 27, 2019 · 3 comments
Labels
enhancement New feature

Comments

@paulfd
Copy link
Contributor

paulfd commented May 27, 2019

Hi,

I assumed that the ampeg filters were linearly interpolating between linear gain (0 to 1) values but I started to question this, since my release felt much longer than Sforzando. Surely enough, it is not linear in the release nor the decay stage. Using:

<global> ampeg_attack=1 ampeg_release=1 ampeg_sustain=50 ampeg_decay=1 ampeg_hold=0.1
<region> key=c3 sample=*sine

and comparing the linear envelope (bottom) and the sforzando one (on top). I have a bug in the hold value clearly, so disregard it :)

Sforzando_envelopes

I feel it would be interesting to integrate in this repository. Do you have any idea what the curve is in this case?

@paulfd
Copy link
Contributor Author

paulfd commented May 28, 2019

After some more checks it matches "well enough" with a multiplicatively decreasing curve from 1.0 towards 0.0005 (which is around -33 dB). The step is x_{n+1} = (0.0005/num) * x_{n} where num is the number of samples of the ramp. The full formula for the curve would be x_{n+1} = (target/start/num) * x_{n}.

The decay is also multiplicative but the ramp does not seem to follow the same law with target = sustain, but rather something strange like x_{n+1} = (0.0005/(1-sustain)/num) *x_{n} where the actual envelope would be sustain + x_{n}.

I did not check if this matches well for different ramp length though, but I'll leave it at this for the time being. It sounds closer to my ears anyway :)

Concerning the website, maybe commenting that (at least for the amplitude) the attack curve is linear by default, and the decay and release curve are multiplicative seems interesting for both developers and sfz bank creators alike. What do you think?

@redtide redtide added the enhancement New feature label Dec 11, 2019
@JimmyCushnie
Copy link

Thank you very much for sharing your findings @paulfd , this is exactly what I was looking for.

@DSmolken
Copy link
Collaborator

Also finally got around to adding this to /opcodes/ampeg_attack, so we have this info captured for now. Will probably move it to a better page later, but for now at least it's somewhere.

redtide added a commit that referenced this issue Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature
Development

No branches or pull requests

4 participants