saugns is a versatile audio generation program that interprets the SAU (Scriptable AUdio) language. An audio scripting a.k.a. music programming language, text in SAU is treated as audio files. Terse in use, SAU can be used both musically and for simpler scripting purposes. For command-line use, but not for live coding.
Both the software and web resources are free/libre.
More on command-line usage here.
saugns is the command-line parser and player for SAU files and text strings that accompanies the development of the SAU language. saugns can be used as a terse and flexible command-line synthesizer. ("saugns" is short for Scriptable AUdio GeNeration System.) It can also write rendered audio to WAV files, Au streams, and raw data to stdout. The program works on Linux and the four major BSDs (FreeBSD, OpenBSD, NetBSD, DragonFly BSD).
The project, which contains the implementation of the SAU language, is written in C without dependencies beyond the standard C library plus system audio support on the given platform. (Only systematically tested on x86/x86-64 architectures, because that's what I have and use.) Small and fast, the program can also be used on old and underpowered laptops. The README file describes how to build and install it.
After building the program, a 1-second 440 Hz test tone can be produced by simply running:
./saugns -e W
Or, for a 30-second example of how saugns makes it easy to produce weird noises (gurgly and synthetic, using PM and FM with both periodic and randomized oscillators):
./saugns -e "R f5 t30 p[W r10 a4 p[W r1.r4[Rlin f1]]]"
Example script files come with the program, along with a concise SAU language reference, as described in the README file. There's also the web section which has examples with rendered audio that overlap with the bundled example scripts.
saugns is distributed under the terms of the GNU Lesser General Public License (LGPL), version 3 or later. Some smaller parts are however more permissively licensed, and each such file notes which license (e.g. the ISC license) it is provided under.
This website is available under the Creative Commons Attribution-ShareAlike 4.0 License – except for CC0 public domain example scripts and rendered audio.
See the main broad language overview; for some specific uses, there's also more how-to examples. A more detail-focused language reference is in the README.SAU file.
SAU is a simple language for mathematical audio synthesis, deliberately without support for the use of pre-recorded samples; scripts can usually be thought of as audio files in a terse text format. The language mainly describes objects that produce signal streams, and their connections through hierarchical arrangement, as well as time placement of changes.
A longer-term aim is to give it greater expressiveness for use in writing electronic music. It is straightforward to use for sounds and soundscapes, with small scripts able to produce complex sounds. The language intentionally has a restricted form, and is not Turing complete, each script having a duration which can be calculated without truly running it.
Audio generation can use the following types of audio generators and ways of configuring them:
A – Amplitude generator, produces amplitude offsets i.e. DC offsetsN – Noise generator, various noise colors and distributions (no pitch control)R – Rumble a.k.a. random line segments oscillator, various modes and line types (for pitched, smooth noise, and modulation both of and by noisy signals)W – Wave oscillator, various wave typesThe language is a work in progress. The overall approach rejects adding many simpler and less flexible generators or object types, preferring to elaborate a few powerful and general building blocks instead. These are to be usable with minimal script text in many ways.
Presently, the main lack in the language features is that reusing sequences of parameter changes requires a lot of copying of script text. But if such tedium is tolerated, it is fully possible to write longer music. Some key features in popular music-making software, such as processing to add echo and reverb, is however missing, which limits the resulting sound.
The SAU language sometimes changes between versions of the saugns program. Changes are listed both in the version tags and in a shorter language change log.
The history is briefly described here.
Some ideas for future development are mentioned on the project wiki and issues on Codeberg. Among them, a shorter list includes:
Any of the sites which the project is on can be used (the main ones being Codeberg and Framagit). Feedback is welcome, and you can also reach me by email (I'm "joelkp" at tuta.io, and "joelkpettersson" at Gmail.com).
I also have a personal website where I touch on related and other things.