Thursday, October 10, 2024

Sine Curves

Today, another two small fixes to Prometheus. The batch converter used to lock-out if an empty folder was selected, this was a silly bug I should have noticed. Second, a smaller fix to the auto-increment of an instrument ending in a number.

Then work on translating a linear ramp, 0 to 1, to various curves. There aren't standard names for these curve types, but they are common. All segments of sine waves. I've named them:

Sinoid:

curve=sin(x*PI+ONEANDAHALFPI)/2+0.5f;

Oversine:

curve=sin(x*HALFPI);

Undersine:

curve=sin(x*HALFPI+ONEANDAHALFPI)+1;

Unsine:

if (x<0.5f)
curve=sin(x*PI)/2;
else
curve=sin((x-0.5f)*PI+ONEANDAHALFPI)/2+1;

Firegate uses Sinoid. The old Watergate used something like Oversine for attack and Undersine for release; good choices for audio, but they were not sines per-se, but similar shapes made by exponential multiplication.