Search guides and the APICtrl K
  1. API reference
  2. DSP

transport.h

Musical time.

#include <sonore/transport.h>
On this page

Design notes

The host tells us the tempo, the position and whether it is playing on every block. A tempo-synced delay, an LFO locked to eighth notes, a gate that restarts on the bar: all of it needs this, and a plugin that ignores it is limited to knob-in-milliseconds designs.

TransportInfo is filled by the format wrapper before process() and handed to the DSP; NoteLength converts a musical division into seconds at the current tempo, which is the calculation every synced effect gets slightly wrong when it writes its own.

Types 2

What the host knows about musical time at the start of this block.

An LFO that stays locked to the host's timeline.

Free-running phase drifts: stop and restart playback, or loop a bar, and a plain oscillator is wherever it happened to be. This derives phase from the transport's beat position instead, so the same bar always sounds the same, which is the entire reason a producer syncs a modulation in the first place. When the host isn't playing (or reports no beats) it free-runs, so the plugin still moves while auditioning.

Functions 4

Enums 1

↑↓ to move↵ to openEvery public name in the headers, and every guide