Joel K. Pettersson
Language changes: * Rename '.w' sub-subparameters to '.r'. * Add support for modulator lists directly under 'a', 'f' and 'r', in addition to those under a '.r' subname. The newer ones, directly under a main parameter name, are handled more like the 'p' modulators in that the modulator output is simply summed for use with the parameter value -- instead of, as with '.r', multiplied up and then mapped, to a range defined by two values. If both the additive main modulators and the '.r' modulators are used at the same time for the same parameter, then the '.r' result is applied first, the main modulator outputs then added afterwards. Add example scripts 'halfrect_ringmod.sau', 'sounds/through-zero-guitar.sau'. Change log: - 2022-09-22: Rename '.w' to '.r'. Add additive AM & FM. - 2022-09-23: Rename '.r' to '.m'. - 2022-09-26: Rename '.m' to '.r'. Adjust 'S a' for main 'a'.
|3 weeks ago|
|devtests||3 weeks ago|
|doc||3 weeks ago|
|examples||3 weeks ago|
|man||3 weeks ago|
|notes||3 weeks ago|
|player||3 weeks ago|
|reader||3 weeks ago|
|renderer||3 weeks ago|
|.gitignore||3 weeks ago|
|COPYING||5 months ago|
|Makefile||3 weeks ago|
|README.md||3 weeks ago|
|arrtype.c||3 weeks ago|
|arrtype.h||3 weeks ago|
|common.c||3 weeks ago|
|common.h||3 weeks ago|
|help.c||3 weeks ago|
|help.h||3 weeks ago|
|math.c||3 weeks ago|
|math.h||3 weeks ago|
|mempool.c||3 weeks ago|
|mempool.h||3 weeks ago|
|program.h||3 weeks ago|
|ptrarr.c||3 weeks ago|
|ptrarr.h||3 weeks ago|
|ramp.c||3 weeks ago|
|ramp.h||3 weeks ago|
|saugns.c||3 weeks ago|
|saugns.h||3 weeks ago|
|test-scan.c||3 weeks ago|
|wave.c||3 weeks ago|
|wave.h||3 weeks ago|
saugns is the Scriptable AUdio GeNeration System, the implementation of the SAU (Scriptable AUdio) language. The project website has more on them.
SAU is a simple language for mathematical audio synthesis,
without support for using pre-recorded samples.
See doc/README.SAU for the details in the present version,
or a more how-to web page covering
the main features. Example scripts under
examples/ also use most features.
While the language is still primitive relative to the goal (a useful language for writing electronic music), it makes it simple to experiment with sounds. A collection of basic wave types are supported, as well as AM/RM, FM, and PM (the "FM" of most commercial synthesizers). An arbitrary number of oscillators can be used.
The program reads SAU (Scriptable AUdio) files or strings,
and can output to system audio, a 16-bit PCM WAV file,
and/or stdout (raw or AU, for interfacing with other programs).
Basic usage information is provided with the
-h option. More
can be found in the man page and on the
usage web page.
Tested mainly on x86 and x86-64. Comes with support for running on DragonFly, FreeBSD, Linux, NetBSD, and OpenBSD. The following audio systems are expected:
Building and installing
Building requires a C99 compiler toolchain, running
and having some GNU or BSD tools. There is no "configure" step.
On Linux distributions, the ALSA library (libasound2) or a '-dev' package or similar for it may possibly need to be installed for building to work. In the cases of the 4 major BSDs, the base systems have it all.
A simple test after building is the following, which should
play a sine wave at 440 Hz for 1 second:
./saugns -e "Osin".
make install will by default copy
and the contents of
|Files under share/||Description|
|doc/saugns/README.SAU||SAU language reference.|
make uninstall removes the added saugns binary and share/ subdirectories.
It's recommended before installing a new version, for a consistent file set.
man saugns should give basic usage information and
point to the share/ files. Without installing, try
Tweaking the build
As of v0.3.9, an anti-aliasing oscillator with 6dB aliasing reduction per octave is used. v0.3.10b fixed the problem of it audibly producing jagged (somewhat bitcrush-looking) waveforms when higher PM amplitudes are used. But there could be other reasons to use a simpler alternative.
USE_PILUT option in
renderer/osc.h defaults to
1 (on) but can be
0 before (re-)running
make to switch to using the pre-v0.3.9 naive
oscillator instead. While the naive oscillator is bad for square and sawtooth
waves especially, it's fine for use with sine wave-based PM.
This may all be replaced in later versions.
saugns is Copyright (c) 2011-2014, 2017-2022 Joel K. Pettersson. As a whole it is distributed under the terms of the GNU Lesser General Public License (LGPL), version 3 or later. See the file COPYING for details, or https://www.gnu.org/licenses/lgpl-3.0.en.html.
Some files are licensed under more permissive terms, such as the ISC license (2-clause-BSD-equivalent), or the 0BSD license (public-domain-equivalent shorter version); see the heading comment text of source files.
The example and test scripts included as input for the program are (unlike other potential works) meant for study and copying from. Feel free to copy from them for your own scripts without any attribution or licensing text. If that's not enough in the future, WTFPL and/or a Creative Commons license could be used.
Included documentation files (man page, this and others placed under
are written by Joel K. Pettersson and licensed under Creative Commons
These files are maintained and provided in parallel
with the website.
Bug reports are very welcome, with or without fixes. Many bugs could have been fixed much sooner if only they had been found earlier.
General feedback, ideas, and proposed changes are also welcome. I'm open to extending and reworking the SAU language, though features will always be limited. Most valuable are those things that may provide the most with the least. I'm looking to increase flexibility and elegance, with a smaller number of added things.