SNDC

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FORMAT
EXAMPLES
ENVIRONMENT
SEE ALSO

NAME

sndc − a minimal, modular node-based sound compiler

SYNOPSIS

sndc infile [outfile]
sndc -l
sndc -h
[module]

DESCRIPTION

sndc is a minimal, modular sound compiler. It reads SNDC files and output a raw stream of float32 in outfile if specified or stdout otherwise. See FORMAT for details on the output sample format.

It is a non realtime synthesizer and will always output the same result bit for bit regardless of the machine it’s run on (endianess may change).

SNDC files are written in a simple, JSON like language and describe an acyclic, directed graph of NODES.

NODES

are instances of MODULES. They have inputs and outputs. When a node is processed, it reads and checks the validity of its inputs, processes them and populates its outputs. The types of its inputs/outputs and the processing performed are defined by the module the node is an instance of. The collection of nodes in a file constitute the STACK.

MODULES

are either built-in or imported external SNDC files. They define the number and types of inputs and outputs, as well as the processing function.

STACK

is the collection of nodes in a SNDC file. It is an ordered collection with the order of nodes matching their order of appearance in the file. When the STACK is run, each node is processed sequentially in order.

OPTIONS

-l

lists all built-in modules.

-h [MODULE]

prints module specification if MODULE is specified, or general sndc help if left empty.

FORMAT

Input files

are written in the SNDC description language.

Output stream

is written in outfile if it is specified or stdout otherwise. sndc will select the output named out in the last node of the STACK. If no such node exists or if that output is not of type BUFFER, sndc will not output anything. The output stream is formed of raw float32 in the endianess of the host machine.

EXAMPLES

Playback output sound using aplay:

sndc example.sndc | aplay -c 1 -r 44100 -f float_le -t raw

Export raw output to more civilized file format:

sndc example.sndc | sox -c 1 -r 44100 -e FLOAT -b 32 -L -t raw - export.flac

ENVIRONMENT

SNDCPATH

List of primary directories where external SNDC modules are looked up.

SEE ALSO

aplay(1), sox(1)