skode/pattern
Sequencer pattern settings and step programming for Pulp’s pattern engine.
Mirrors parts/seq.h and the pattern opcode family (y, %, z, zq, zmu, x).
Types
pub type Pattern {
Pattern(
id: Int,
speed: Int,
length: Int,
mute: Bool,
control_events: Bool,
state: PatternState,
steps: dict.Dict(Int, String),
)
}
Constructors
-
Pattern( id: Int, speed: Int, length: Int, mute: Bool, control_events: Bool, state: PatternState, steps: dict.Dict(Int, String), )
pub type PatternState {
PatternStopped
PatternRunning
PatternPaused
}
Constructors
-
PatternStopped -
PatternRunning -
PatternPaused
Values
pub fn default(pattern_id: Int) -> Pattern
Create an empty default pattern at the given pattern ID (16 steps, speed 1).
pub fn diff_skode(old: Pattern, new: Pattern) -> List(String)
Compute delta Skode commands when a pattern’s parameters change.