subsequence.conductor¶
Global automation signals — LFOs and ramps that modulate a composition over time.
The Conductor holds named, time-varying signals (swells, fades, filter sweeps)
that any pattern can read via p.signal(name) to shape velocity, CCs, or
note choices across long stretches of music.
Module Contents¶
- class subsequence.conductor.Conductor[source]¶
A registry for global automation signals.
The
Conductorallows you to define time-varying signals (like LFOs or ramps) that are available to all pattern builders. This is ideal for modulating parameters (like velocity or filter cutoff) over long compositional timeframes.Create an empty conductor; register signals with lfo() or line().
- get(name: str, beat: float) float[source]¶
Retrieve the value of a signal at a specific beat time.
Most patterns should use
p.signal("name")instead, which calls this method with the current bar time automatically. Useget()directly when you need a beat time other than the current bar.
- lfo(name: str, shape: str = 'sine', cycle_beats: float = 16.0, min_val: float = 0.0, max_val: float = 1.0, phase: float = 0.0) None[source]¶
Register a named LFO signal.
Example
comp.conductor.lfo("swell", shape="sine", cycle_beats=32)
- line(name: str, start_val: float, end_val: float, duration_beats: float, start_beat: float = 0.0, loop: bool = False, shape: str | subsequence.easing.EasingFn = 'linear') None[source]¶
Register a named ramp signal.
- Parameters:
name – Signal name, used to retrieve the value via
p.signal(name).start_val – Value at the start of the ramp.
end_val – Value at the end of the ramp.
duration_beats – Duration of the ramp in beats.
start_beat – Beat time at which the ramp begins (default 0).
loop – If True, the ramp restarts from start_val after each cycle.
shape – Easing curve name or callable. Defaults to
"linear". Use"ease_in_out"for smooth crossfades,"exponential"for filter sweeps. Seesubsequence.easing.
Example
comp.conductor.line("fadein", start_val=0, end_val=1, duration_beats=64) comp.conductor.line("filter", start_val=0, end_val=1, duration_beats=32, shape="ease_in_out")
- class subsequence.conductor.LFO(shape: str = 'sine', cycle_beats: float = 16.0, min_val: float = 0.0, max_val: float = 1.0, phase: float = 0.0)[source]¶
Bases:
SignalA Low-Frequency Oscillator for generating periodic modulation signals.
LFOs are used to create cyclical changes (like a ‘swell’ or ‘vibrato’) over many bars.
Initialize an LFO.
- Parameters:
shape – The waveform shape (“sine”, “triangle”, “saw”, “square”).
cycle_beats – How many beats for one full cycle (e.g., 16.0 = 4 bars).
min_val – The bottom of the LFO range (default 0.0).
max_val – The top of the LFO range (default 1.0).
phase – Phase offset (0.0 to 1.0).
- class subsequence.conductor.Line(start_val: float, end_val: float, duration_beats: float, start_beat: float = 0.0, loop: bool = False, shape: str | subsequence.easing.EasingFn = 'linear')[source]¶
Bases:
SignalA ramp signal that moves from one value to another over time.
Initialize a ramp signal.
- Parameters:
start_val – Initial value.
end_val – Target value.
duration_beats – How long it takes to reach the target (in beats).
start_beat – Global beat time when the ramp should start (default 0).
loop – Whether to jump back to start_val and repeat (default False).
shape – Easing curve — a name string (e.g.
"ease_in_out") or any callable that maps [0, 1] → [0, 1]. Defaults to"linear". Seesubsequence.easingfor available shapes.