pub struct Options { /* private fields */ }Expand description
What to build around the audio.
Implementations§
Source§impl Options
impl Options
Sourcepub fn new(name: impl Into<String>) -> Options
pub fn new(name: impl Into<String>) -> Options
Defaults: the name given, root key C4, the editor’s own top note, the editor’s record coding, no loop, the v2 generation.
Sourcepub fn layout(self, layout: Layout) -> Options
pub fn layout(self, layout: Layout) -> Options
Which generation to write: .nsmp, .nsmp3 or .nsmp4. The audio is the same
object in all three — what moves is the container and the stream’s units.
Sourcepub fn secondary_start(self, frames: f64) -> Options
pub fn secondary_start(self, frames: f64) -> Options
Resynchronise the stream at frames source frames from the first one — a
project’s m_startSecondary, measured from its m_start. Unset, the stream
resynchronises where a fresh project would put it: default_secondary_start.
Sourcepub fn channels(self, channels: u16) -> Options
pub fn channels(self, channels: u16) -> Options
How many channels the PCM interleaves — 1 or 2. Anything else is refused when the instrument is built.
Sourcepub fn shift(self, bits: u8) -> Options
pub fn shift(self, bits: u8) -> Options
Quantise at bits of shift instead of what the shift rule picks. Experimental: a
lever for laying the same stroke out at neighbouring shifts, not a setting the
editor exposes.
Sourcepub fn loops(self, points: Loop) -> Options
pub fn loops(self, points: Loop) -> Options
Loop the stroke, which also truncates it at Loop::end.
Sourcepub fn top_note(self, note: u8) -> Options
pub fn top_note(self, note: u8) -> Options
The highest note the zone covers. Defaults to two octaves above the root, which is the layout the editor lays down for a single zone.