pub struct Track {
pub id: Option<String>,
pub node: Node,
pub pan: f32,
pub gain: f32,
pub at: f32,
pub mute: bool,
pub automation: Vec<AutoLane>,
pub sidechain: Option<Sidechain>,
pub bus: Option<String>,
pub sends: Vec<Send>,
}Expand description
One mixer channel in a Node::Tracks root.
Fields§
§id: Option<String>Stable layer id — a short slug like "kick" or "tail", unique within
the document. This is how edits address the track by id, so it never
shifts when sibling layers are added or
removed (unlike an array index). Omitted ids are backfilled
deterministically (layer_<position>) on the next build.
node: NodeThe track’s signal graph (usually a seq or a chain).
pan: f32Stereo position, −1 (hard left) .. 1 (hard right). Equal-power law.
gain: f32Channel fader, 0..2 (1 = unity).
at: f32Start offset in seconds: the rendered layer is shifted this far right on the bus (the transient + body + tail recipe). The render keeps its full length and the shifted tail is truncated at the document edge.
mute: boolMuted layers stay in the document but are left off the bus. This is rendered state, not a monitoring convenience — exports ship without muted layers.
automation: Vec<AutoLane>Song-time automation lanes for this track’s gain / pan (volume rides,
pan moves across sections). Empty ⇒ the static gain/pan apply and the
render is byte-identical to a document without this field. A lane’s value
overrides the static one over time; per-node modulators still cover the
node level (this is the track/song level).
sidechain: Option<Sidechain>Sidechain ducking: this track’s level dips whenever the source
track’s signal is loud — the classic kick→bass pump, at mixer level.
The source track renders exactly as it does today; only this (the
follower) track is gain-reduced. None ⇒ the render is byte-identical
to a document without this field. A sidechained mix streams natively
(the duck envelope advances per sample, so a schema-v2 tracks root
— sidechains, buses, and all — streams byte-identically to the
offline bounce).
bus: Option<String>The mix bus this track’s main output routes to (e.g. "drums",
"reverb"). None ⇒ the master bus, the only behavior documents had
before this field existed, so they render byte-identically.
sends: Vec<Send>Post-fader sends: copies of this track’s positioned stereo signal (post fader/pan/duck), each scaled by its amount, into mix buses. Empty ⇒ the render is byte-identical to a document without this field.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Track
impl<'de> Deserialize<'de> for Track
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Track
impl JsonSchema for Track
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more