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>,
}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).
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