Documentation / SPSQ Syntax
Write a SynapSeq score
SPSQ is a plain-text format for describing sound states and the way they change over time. Start with the structure, then add the sound and motion you need.
How It Works
Introduction
Think of an SPSQ file as a score. You first name sound states, then place those states on a timeline. SynapSeq renders the movement from one state to the next into stereo audio.
Binaural, monaural, and isochronic tracks can all express rhythm, but they create it differently. Binaural tracks use a left/right frequency difference; monaural tracks mix nearby tones into an audible pulse; isochronic tracks repeatedly gate one carrier tone.
Syntax
Syntax panels show the permitted shape of a line. Read them from left to right: literal words are typed as shown, while the notation identifies the values you need to provide or may leave out.
| Notation | Meaning | Example |
|---|---|---|
<value> | A required value you provide. | <carrier> becomes 220. |
[value] | An optional part. Omit the whole bracketed group when it is not needed. | [waveform <name>] |
a|b | Choose one of the listed alternatives. | white|pink|brown |
... | Continues with the source form described by that topic. | waveform sine tone ... |
| Literal word | Type the keyword exactly as shown. | tone, binaural, amplitude |
0..100 | An inclusive numeric range. | amplitude <0..100> |
| Named placeholder | A label for the kind of value expected; its rule appears below the syntax line. | <rate>, <effect> |
Sequence Structure
A playable sequence reads from top to bottom: options, presets with their indented tracks, then timeline entries. Blank lines and comments can appear anywhere.
# Options
@option <value>
# Presets
<preset-name>
<track>
# Timeline
HH:MM:SS <preset-name> [transition] [steps]
HH:MM:SS <preset-name> [transition] [steps] Options
Options begin with @ and belong at the top of the file. They configure the
whole sequence or define reusable resources before any preset or timeline entry is read.
| Option | Allowed values | Purpose |
|---|---|---|
@samplerate | <positive integer>; prefer standard rates such as 44100 or 48000. | Sets the audio sample rate for rendering. |
@volume | 0..100 | Sets the global output volume. |
@ambiance | <name> [path-or-url]. Names have 1–20 characters, start
with a letter, and then use letters, digits, _, or -. Local paths have no extension. | Names an ambience source for use in tracks. |
@music | <name> [path-or-url]. Names have 1–20 characters, start
with a letter, and then use letters, digits, _, or -. Local paths have no extension. | Names a music source for use in tracks. |
@waveform | <name> <point> <point> [...]. Names follow
the same rule; use 2–16,384 decimal points from 0 to 100. | Defines a reusable custom waveform. |
@transition | <name> 0 <point> [...] 100. Names follow the same
rule; use 2–256 non-decreasing decimal points from 0 to 100. | Defines a reusable custom transition curve. |
@extends | <path>. Relative path without an extension; forward
slashes only, with no absolute path or .. traversal. | Loads options, presets, and reusable definitions from an SPSC file. |
@samplerate 44100
@volume 80
@ambiance rain sounds/rain
@music bed music/soft-bed Local paths use forward slashes, stay relative to the sequence, and do not include a file extension. SynapSeq rejects absolute paths and parent-directory traversal.
Presets and Tracks
A preset is a top-level name. The lines directly below it are its tracks, and each track must start with exactly two spaces. Tracks can be tones, noise, ambiance, or music.
focus
tone 240 binaural 12 amplitude 16
noise pink smooth 35 amplitude 9
ambiance rain amplitude 12 silence is always available without declaring it. It is useful as a quiet
starting point or destination because it creates a fade-compatible boundary with an active
preset.
| Rule | Requirement |
|---|---|
| Preset name | Use 1–20 characters. The first character must be a letter; the remaining
characters may be letters, digits, _, or -. |
| Reserved name | silence is the built-in preset and cannot be declared as a custom
preset. |
| Uniqueness | Preset names are case-insensitive and must be unique within a sequence. |
Timeline
A timeline is the schedule for a sequence. Each top-level entry names the sound state that begins at a timestamp; its optional transition and step count shape the period leading to the next entry.
00:00:00 silence
00:00:30 focus
00:02:00 focus ease-in
00:04:00 high-focus
00:08:00 high-focus
00:09:00 silence | Rule | Requirement |
|---|---|
| Timestamp format | Use exactly HH:MM:SS, with two digits per field. Hours run
from 00 to 23; minutes and seconds run from 00 to 59. |
| First and final structure | Define timelines after presets. The first entry must be 00:00:00, and a sequence needs at least two entries. |
| Order | Timestamps must be unique and strictly increasing. Two entries cannot share a time or move backward. |
| Preset | Use an existing playable preset, or the built-in silence preset.
Template presets cannot appear in the timeline. |
| Transition | The transition belongs to the entry that starts an interval. For example, 00:02:00 focus ease-in shapes the change from 00:02:00 until the following timestamp. |
Sound Sources
Every tone track begins with tone <carrier>. Choose a beat method
when you want rhythmic behavior, or go straight to amplitude for a pure tone.
Binaural
A binaural track places related frequencies in the left and right channels. The
value after binaural is the total difference between those channels, while
the carrier is their pitch center.
alpha
tone 240 binaural 10 amplitude 18 Headphones help keep the two channels distinct. Use a comfortable carrier and treat the beat value as a sound-design setting rather than a promised outcome.
Monaural
Monaural tracks combine nearby frequencies before playback, so the pulse is already present in the waveform.
alpha
tone 180 monaural 8 amplitude 16 The result tends to sound more obviously pulsed than a binaural track and does not rely on left/right separation in the same way.
Isochronic
An isochronic track switches a carrier on and off at a regular rate. The number
after isochronic controls that gate rate.
theta
tone 200 isochronic 7 amplitude 14 The pulse is directly audible, so start with a comfortable rate and amplitude. You can later adjust the sound shape and movement in the advanced sections.
Noises
Noise adds texture beneath a session. Choose white for a brighter
texture, pink for a more balanced texture, or brown for a deeper
low-weighted texture.
texture
noise white amplitude 10
noise pink amplitude 14
noise brown amplitude 18 Smoothness
smooth is optional. When present, it rounds the moment-to-moment roughness
of the selected noise color; it does not turn white, pink, or brown noise into another
color.
bed
noise pink smooth 45 amplitude 18 Place smooth <value> after the noise color and before amplitude. Leave it out when you want the default texture.
Ambiance and Music
Declare a named resource with an option, then reference that name from a track. Ambiance loops its source; music plays until its source ends.
@ambiance rain sounds/rain
@music bed music/soft-bed
scene
ambiance rain amplitude 20
music bed amplitude 28 A global option can also point directly to a remote audio file. Give the resource a local name, then use its HTTPS URL as the source:
@ambiance rain https://example.com/audio/rain.wav
@music bed https://example.com/audio/soft-bed.mp3 WAV is the preferred format for looping ambiance. Music and ambiance can use the same supported effects as tones, with waveform prefixes shaping effect movement rather than the source PCM itself.
“Pure” tones
A pure tone has a carrier and amplitude, with no beat method. The carrier is the frequency you hear, and amplitude controls its level.
drone
tone 174 amplitude 10Advanced topics
Advanced syntax changes how a track moves, sounds, or is reused. Add it after the source declaration and before the final amplitude setting.
Effects
Effects animate an existing source. Their rate comes after effect; intensity controls how much of the effect is applied.
motion
tone 240 effect pan 0.25 intensity 60 amplitude 18Modulation
Modulation moves a track’s gain over time, creating a breathing or pulsing layer without changing its fundamental source.
noise pink effect modulation 4 intensity 35 amplitude 16Shift
Shift creates a wet stereo pair by moving the combined signal up on the left and down on the right. The value is the total frequency separation; intensity blends dry and shifted sound.
tone 220 effect shift 10 intensity 35 amplitude 14 Shift works with tones, noise, ambiance, and music. It adds spectral divergence; it is not the same as creating a simple binaural beat.
Doppler
Doppler varies playback speed or oscillator advance, so pitch moves gently up and down. It is available on tones, ambiance, and music, but not noise.
ambiance rain effect doppler 0.4 intensity 40 amplitude 20Pan
Pan moves energy across the stereo field. It changes where the sound appears to sit, rather than changing the source pitch.
music bed effect pan 0.15 intensity 55 amplitude 24Waveforms
A waveform gives generated tones their oscillator shape. Use a waveform prefix before tone, ambiance, or music tracks. It defaults to sine.
bright
waveform triangle tone 220 amplitude 14Sine
Sine is the default: a smooth, single-frequency oscillator shape. It is a good neutral starting point for pure and beat-based tones.
sine-tone
waveform sine tone 220 amplitude 14Square
Square switches sharply between extremes, adding strong harmonic content and a more assertive tone.
square-tone
waveform square tone 220 amplitude 10Triangle
Triangle rises and falls linearly. It is brighter than sine but softer than square or sawtooth.
@ambiance rain sounds/rain
atmosphere
waveform triangle ambiance rain effect pan 0.2 intensity 50 amplitude 20Sawtooth
Sawtooth ramps in one direction and resets sharply, producing a bright harmonic-rich character.
@music bed music/soft-bed
movement
waveform sawtooth music bed effect modulation 0.2 intensity 30 amplitude 18Custom
Define a named cycle with points from 0 to 100. Points are
evenly spaced, joined linearly, and the final point connects back to the first.
@waveform softpulse 0 0 20 60 100 60 20 0
soft
waveform softpulse tone 200 amplitude 12 Use between 2 and 16,384 points. Sharp corners can emphasize harmonics and aliasing at higher carrier frequencies.
Transitions
A transition shapes the path from one timeline state to the next. It can move
compatible track values such as amplitude and carrier, or fade to and from silence.
00:00:00 silence
# Default is "steady"
00:00:30 focus
00:02:00 focus ease-in
00:04:00 relax ease-out
00:06:00 low-freqs smooth
00:09:00 alpha steady
00:10:00 silenceSteady
steady changes at a constant rate. Use it when you want an even, direct progression.
Ease in
ease-in begins gently and gains speed later in the period.
Ease out
ease-out moves more quickly early on and settles toward its destination.
Smooth
smooth eases in, moves through the middle, and eases out. It is the most
rounded built-in curve.
Custom
Define a named curve with non-decreasing points from 0 to 100. The first point must be 0, and the last must be 100.
@transition soft-land 0 2 12 42 78 96 100
00:00:00 silence soft-land
00:00:30 focusSteps
Append a non-negative integer after the transition to add back-and-forth movement inside the period. Steps create alternating legs before the final arrival; they do not simply split time into blocks.
00:00:30 focus smooth 2
00:01:00 rest Templating Presets
Templates let you define a reusable track layout once, then create variants without repeating every track. A template itself is not playable in the timeline.
@ambiance rain ambiance/rain
@music bed music/soft-bed
calm-bed as template
waveform sine tone 220 binaural 8 amplitude 14
noise brown smooth 35 amplitude 10
waveform triangle ambiance rain effect pan 0.04 intensity 30 amplitude 12
waveform sawtooth music bed effect modulation 0.15 intensity 20 amplitude 10
calm-deep from calm-bed
track 1 binaural 6
track 2 smooth 50
track 3 intensity 45
track 4 amplitude 16 The template above combines a tone, noise, ambiance, and music. The derived preset keeps those four tracks in the same order while changing the beat rate, noise smoothness, an effect intensity, and music level.
Relative values
Numeric overrides accept a leading + or - to adjust the inherited
value rather than replace it. The adjustment is measured from the corresponding value
in the source template.
base-focus as template
tone 240 binaural 10 amplitude left 16 right 12
noise brown smooth 30 amplitude 10
waveform triangle ambiance rain effect pan 0.08 intensity 40 amplitude 14
focus-variant from base-focus
track 1 tone +20
track 1 binaural -2
track 1 left +4
track 1 right -3
track 2 smooth +15
track 3 pan +0.02
track 3 intensity -10 Here the tone becomes 260 Hz, its binaural difference becomes 8 Hz, and its channel amplitudes become 20 and 9. The noise smoothness changes from 30 to 45; the ambiance pan changes from 0.08 to 0.10 and intensity from 40 to 30.
SPSC Files
An .spsc file is a reusable extension file. Reference it with @extends to bring in options, custom waveforms/transitions, templates, and
presets.
@extends presets/base
00:00:00 preparation
00:10:00 preparation SPSC files use the same parser for options, presets, tracks, and overrides, but they cannot contain timeline entries or extend another file themselves.
Comments
Use
#for a note the parser ignores. Use##when you also want the text stored as sequence metadata and available through the loaded context.