Skip to content
saugns v0.3.12. Fixes. New SAU features. Split lib.

On 32-bit x86 systems, fix PM bug: use llrintf() on
phase values meant to wrap around, not lrintf(), to
make large phase values work properly. This audible
2018 bug embarrassingly goes back to saugns v0.3.0.
Didn't affect any 64-bit platform with 64-bit long.

Also fix possible crashes for some odd sample rates
in some cases. and small divergences in the output.
Was due to an unrelated error in time/buffer logic,
which however appeared with the same v0.3.0 change.

Add cli -v verbose option (renaming version to -V).

This change splits out a static library under sau/.

AM/RM and FM.
 * Support lists directly under "a", "f", and "r",
   as in "a[]" (AM/RM) and "f[]", "r[]" (FM).
   Modulators in such lists have the output added
   directly to the parameter value. Can be used
   together with the older value range feature,
   and the effect is then added on top of that.

Script options.
 * Make the "S" options lexically scoped,
   restoring the older values from outside
   a "[]" list when the list is exited.
 * Apply the "S a" amplitude multiplier set
   inside a "[]" list to any modulators which
   follow at the same list level. Previously
   it was only applied to top-level carriers.
   Separate this particular setting at each list
   level, making the multipliers independent,
   except apply it to sublists of the new "a[]"
   variety.
 * Rename "S" option "n" to "f,n".

Ramp syntax.
 * Rename ramp "hold" to "sah" (sample and hold).
 * Rename ramp "sin" back to "cos".

Variable syntax.
 * Add "'name=..." variation of the syntax for
   variable assignment, for assigning a number.
   Variables are now dynamically typed. (The old
   and other value type is reference to object.)
 * Add "$name" expression, for using a variable
   in a numerical expression.

Numerical expressions.
 * In numbers, if a decimal '.' is used, require
   digit(s) after. A trailing 0 can no longer be
   skipped but a leading 0 can still be skipped.
   (E.g. 0, 0.0, and .0 are all fine, 0. isn't.)

Subnames.
 * Modulation with value range now uses e.g.
   "a.r", "f.r", rather than "a,w", "f,w".
 * Frequency-amplified PM uses "p.f", was "p,f".