pub struct Section {
pub name: String,
pub muted: bool,
pub cycles: u32,
pub bpm: u32,
pub sig: (u8, u8),
pub scale: Option<(PitchRoot, ScaleMode)>,
pub patterns: Vec<PatternDef>,
pub groups: Vec<GroupDef>,
}Expand description
One resolved section: its members and the state in force while it plays.
Everything a section sounds like lives here rather than on the
Occurrence, because a section sounds the same wherever the arrangement
puts it (§8.5). The only thing an occurrence adds is when.
Fields§
§name: String§muted: boolA muted section still takes its time — it is a rest of its own length.
cycles: u32How many cycles it lasts. Always >= 1.
bpm: u32Tempo in force, after any bpm written inside the section (§8.5).
sig: (u8, u8)Time signature in force.
scale: Option<(PitchRoot, ScaleMode)>Default scale in force.
patterns: Vec<PatternDef>Member pattern lines, in source order.
groups: Vec<GroupDef>Groups declared inside the section, in source order.
Implementations§
Source§impl Section
impl Section
Sourcepub fn cycle_seconds(&self) -> f64
pub fn cycle_seconds(&self) -> f64
How long one of this section’s cycles lasts, in seconds.
Sourcepub fn audible_on(&self, cycle: u32) -> impl Iterator<Item = &PatternDef>
pub fn audible_on(&self, cycle: u32) -> impl Iterator<Item = &PatternDef>
The members audible on cycle (1-based, within this section), skipping
the muted ones and those whose span (§8.3) excludes the cycle.