Usage of the saugns program

Usage examples for the saugns program, and some further notes. (For the script language syntax, see the syntax page, or the doc/README.SAU file (GitHub view).)

Running the program with no arguments, or with -h, prints a concise list of arguments and invocation types supported. The same information, and a bit more, is provided with the accompanying saugns(1) man page.

Note that this page is updated along with work proceeding on the git master branch (what you get with a `git clone`).

Playing scripts or strings

To simply play a script with the default sample rate:

saugns script

(Several filenames can be listed, or a * glob pattern used, to play several files one after the other.)

To play a one-liner (in this example, sweeping through the human hearing range in 10 seconds):

saugns -e "Osin f20 f{v20000 cexp} t10 a0.25"

(Several string arguments can be listed when -e is used, each of which plays as a separate script.)

Sample rate in Hz can be changed using the -r option:

saugns -r 48000 script(s)

Checking scripts

To simply check if scripts parse cleanly (no errors or warnings), use the -c option:

saugns -c examples/*.sau examples/*/*.sau

To print info for scripts based on a parse (duration, number of voices, and a partial debug info listing of what the script does):

saugns -cp script(s)

(The -c can be left out to also play.)

Rendering audio files

To render a 16-bit PCM WAV file with a chosen sample rate (without audible output, unless -a is also added):

saugns -r 44100 -o a.wav script(s)

(If several scripts are listed, the output from all of them will be added to the WAV file, in order.)

If you need further format conversion or editing of WAV files, other tools will be needed. For example, SoX and Ecasound are capable command-line tools (unrelated to this project).