SNDC_SAMPLER

NAME
SYNOPSIS
PROCESSING

NAME

sampler - External sample buffer loader.

SYNOPSIS

Inputs:

file [STRING] [REQUIRED]: path to the external buffer file, the file must be a raw binary array of floats that can be readily mmap’d.

sampling [FLOAT] [OPTIONAL]: sampling rate of the output buffer, defaults to 44100.

format [STRING] [OPTIONAL]: buffer file format, ’binary’ or ’text’, default ’binary’.

Outputs:

out [BUFFER]: the loaded sample buffer.

PROCESSING

sampler will load a buffer of floats and output it in out.

The format can be specified like so:

text

a text file containing the float literals in decimal, one per line, as is output by the print module.

binary

a raw array of floats. For efficiency, this file will be memory-mapped. Note that endianess considerations are left to the user. In general, this format is not intended to be portable but rather generated on the same machine, either by sndc itself (piping the output of sndc to a file will produce a sample file that can be re-loaded with sampler ), or by external tools to convert other audio formats into one that sndc can deal with. sox is a very fitting tool for that task.