On Wednesday, July 19, 2017 17:25:50 Andreas Persson wrote:
> I fine tuned the sfz EG and modeled it after SFZ Player and Rapture
> 2010-01-30. So, that the attack is linear and the decay and release are
> exponential are deliberate (didn't even the original sfz spec say that
> it should be like that? I don't remember).

Most EG implementations use linear for rising stages (i.e. attack) and 
logarithmic curves for falling stages (i.e. decay, release). That has 
historical reasons, since the first EGs based on analogue circuits with their 
simple RC components behaved like that.

> For exponentials the
> interpretation of time values is hard as it depends on how close to the
> target level you count as finished, but I tried to make the calculation
> as close as possible to the SFZ Player/Rapture behavior.

Yes, that's in general the problem with logarithmic stages. To make this more 
clear: Since i.e. a logarithmic release stage will fall down towards zero with 
constantly reduced speed, it never reaches zero level. So which EG level do 
you then consider as end of the release stage? -12 dB? -24 dB? -120 dB? In the 
end we must pick one level to be the "end" level. And accordingly depending on 
which end level we pick, the duration is different to EG implementations of 
other players which have picked another EG level as "end" level.

Since sfz is highly configurable and extensible, maybe somebody already 
suggested an opcode for setting a specific "end" level.

CU
Christian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel

Reply via email to