SNDC_LAYOUT

NAME
SYNOPSIS
FILE FORMAT
EXAMPLE

NAME

layout - A generic layout helper to mix layers together.

SYNOPSIS

Inputs:

bpm [FLOAT] [REQUIRED]: tempo in beats per minute.

bpb [FLOAT] [OPTIONAL]: number of beats per bar, def 4.

divs [FLOAT] [OPTIONAL]: number of subdivision per beat, def 4.

file [STRING] [REQUIRED]: sequence layout file.

sample0 [BUFFER] [REQUIRED]: sample #0.

sample1 [BUFFER] [OPTIONAL]: sample #1.

sample2 [BUFFER] [OPTIONAL]: sample #2.

sample3 [BUFFER] [OPTIONAL]: sample #3.

sample4 [BUFFER] [OPTIONAL]: sample #4.

sample5 [BUFFER] [OPTIONAL]: sample #5.

sample6 [BUFFER] [OPTIONAL]: sample #6.

sample7 [BUFFER] [OPTIONAL]: sample #7.

sample8 [BUFFER] [OPTIONAL]: sample #8.

sample9 [BUFFER] [OPTIONAL]: sample #9.

sample10 [BUFFER] [OPTIONAL]: sample #10.

sample11 [BUFFER] [OPTIONAL]: sample #11.

Outputs:

out [BUFFER]: output, full sequence.

FILE FORMAT

The layout module uses an external .sndl file to represent how various samples are laid out together. Being music-oriented, the layout module is beat and division centric, there are no timecodes. Instead, for each sample, a sequence of characters determines wether the sample is active at a given beat.

Each line should begin with the sample ID followed by a colon like so: s<n>:

Then, for each beat, the following characters can be used:

-

a silent beat.

[

start of the sample.

=

continuation of a started sample.

The = symbol can only come after the [ symbol or another = symbol.

All other characters including whitespaces are ignored and can be used to indent/visually structure the file.

EXAMPLE

A .sndc file importing three external samples and laying them out according to a corresponding .sndl file:

bass_sample: sampler { file: "bass_sample"; sampling: 44100; }
drum_sample: sampler { file: "drum_sample"; sampling: 44100; }
synth_sample: sampler { file: "synth_sample"; sampling: 44100; }

track: layout {
bpm: 120;
file: "layout.sndl";
sample0: bass_sample.out;
sample1: drum_sample.out;
sample2: synth_sample.out;
}

The corresponding layout.sndl file:

s0: [=== ==== [=== ==== [=== ==== [=== ====
s1: ---- ---- ---- ---- [=== ==== [=== ====
s2: ---- ---- ---- ---- ---- ---- ---- ----

s0: [=== ==== [=== ==== [=== ==== [=== ====
s1: ---- ---- ---- ---- [=== ==== [=== ====
s2: [=== ==== ==== ==== [=== ==== ==== ====