tim-janik / anklang

MIDI and Audio Synthesizer and Composer
https://anklang.testbit.eu/
Mozilla Public License 2.0
52 stars 3 forks source link

DEVICES: blepsynth/blepsynth.cc: introduce flexible ADSR model #6

Closed swesterfeld closed 7 months ago

swesterfeld commented 1 year ago

From the commit message:

To be honest, the difference between analog and flexible envelope is not that big in practice. I could add a digital ADSR, but I guess since analog vs. flexible is not too different, it is probably not that important, flexible should cover configurable slope cases quite well.

Comments:

I've put the tools here: https://space.twc.de/~stefan/download/nadsr/ - if you want to I can clean these up a bit.

swesterfeld commented 1 year ago

As discussed previously, to support this:

AS DS RS params should be inactive if model is analog

commit 9b0dd6a now calls a set_parameter_used function to enable/disable the AS DS RS parameters; this should be implemented in the base class and propagate the used flag to the gui.

tim-janik commented 1 year ago
* volume envelope can now be analog (exponential) or flexible
* flexible envelope has adjustable attack/decay/release slope
* support changing volume/filter envelope params while note is playing

Thank you, that sounds very interesting.

* speaking of cpu power, how can we test device cpu usage? new envelope could be somewhat more expensive since it does block processing? could also be cheaper? no idea?

Ok, I'm working on finishing up a branch that supports headless and possibly offline rendering. Maybe we should finish that first, so we can make performance assessments...

* do you want tools used to design polynomials in repo?
* do you want tools used to test envelope in repo?

As previously discussed, it would probably make sense to clean such design scripts up and put them into a dedicated "research" repo.

tim-janik commented 1 year ago

Please update/rebase the patch.

swesterfeld commented 1 year ago

Please update/rebase the patch.

I've rebased the patch.

swesterfeld commented 1 year ago
  • new envelope could be somewhat more expensive since it does block processing? could also be cheaper? no idea?

Btw, I did some performance tests in SpectMorph and in the dsp-research repo. I also found a few opportunities to optimize the code. The result is that I wouldn't worry about the FlexADSR cpu usage at all, it is a lot cheaper than the other parts of the bleposc (namely the filters and the osc code).

tim-janik commented 8 months ago

Please rebase

swesterfeld commented 8 months ago

Please rebase

Done. Great to see that you found some time to merge the other BlepSynth PR.