SNDC_MONOSEQ

NAME
SYNOPSIS
PROCESSING
EXAMPLE

NAME

monoseq - Takes a simple single-voice pattern and generates corresponding buffers of frequency and amplitude to feed into a mono synthesizer.

SYNOPSIS

monoseq takes in a list of notes and their associated time keys, and generate several control signals (very much analogous to voltage controls in an analogue synth). Those control signals can then be fed to oscillators and filters to emulate a proper synthesizer.
Inputs:

pitch [STRING] [REQUIRED]: notes’ pitches, e.g A2, Gb3, F#5, ordered by time of emission, use ’->’ for slide, e.g A2->A3 to produce a slide from A2 to A3.

time [STRING] [REQUIRED]: notes’ times, use ’x’ to emit next note, ’X’ for an accentuated note, ’-’ for a silent div.

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

divs [FLOAT] [OPTIONAL]: number of subdivisions in a beat, default 4.

attack [BUFFER|FLOAT] [OPTIONAL]: envelop attack time, default 0s.

sustain [BUFFER|FLOAT] [OPTIONAL]: note sustain time, default 0.0625s.

decay [BUFFER|FLOAT] [OPTIONAL]: envelop decay time, default 0.02s.

sampling [FLOAT] [OPTIONAL]: sampling rate of control signals, default 2048.

Outputs:

frequency [BUFFER]: frequency control signal. amplitude [BUFFER]: amplitude control signal. duration [FLOAT]: duration of the pattern. gate [BUFFER]: 1 when note active, 0 otherwise. accent [BUFFER]: accent signal, 1. on accent, 0 otherwise, smoothed.

PROCESSING

The programming is somewhat inspired from the TB303. The list of notes and their times are specified separately. The pitch input string is a list of notes in classic string representation, e.g A3, Bb4 and so on. An arrow ’->’ between two notes will create a glissendo effect between those notes. A glissendo will generate a continuous sound, the second note will have no "attack", regardless of the amount of time between the two notes.

The time input also takes a string, which is similarly formatted to the drumbox module, i.e a sequence of ’x’ and ’-’ to indicate respectively an active note and a silence for a tempo division, the number of divisions in a beat being given by the divs input. Additionally, a ’X’ can be used to create a note with accent.

Accents are generated in a separate buffer. The accent signal goes from 0 (no accent) to 1 when a note is accentuated, back to 0, in a smooth, filtered way. The accent signal can then be fed to a filter resonance, waveform parameter, added to the amplitude signal, etc.

The gate output buffer is set to 1 when a note is active or between two notes in a glissendo, and 0 otherwise.

EXAMPLE

m: monoseq {
bpm: 120;
pitch: "C4C#4 D4D#4E4 F4 F#4->G4->G#4->A4 A#4B4";
time: " x-x- x x x x x x x x x-x-";
attack: 0.02;
}

o: osc {
function: "saw";
freq: m.frequency;
amplitude: m.amplitude;
duration: m.duration;
}