Min/max gain semantics.

Phobius

16-07-2009 01:19:46

I want to change the way that the minimum and maximum gain is treated. Currently, it is only used for fades, which means that even though you set max gain at 0.8 (for example) and then set gain at 1.0, you'll *get* gain at 1.0. The function descriptions state that the min and max gain is the smallest and largest allowed gain for the source, respectively. Therefore I would like it change the semantics such that if:

MinGain == 0.2
MaxGain == 0.8
Gain == 0.6
-----
Actual Gain == 0.56 (min+(max-min)*gain)

Therefore the gain value would act as a scalar between the min and max where a gain of 0.0 == minimum gain and a gain of 1.0 == maximum gain. Does anyone have any issues with this? I'll let it sizzle for about two weeks and then i'll put it in if no one objects.

Vectrex

16-07-2009 17:26:09

I think that sounds sensible. 'Gain' should be a consistant scalar as lots of different sounds might be artist edited and need different settings. Shouldn't change the fact the 1 should mean maximum.