Enum Ramp Copy item path Source pub enum Ramp<T> {
Fixed(T),
Sweep {
from: T,
to: T,
},
Steps {
first: T,
rest: Vec <T>,
},
Timed {
ramp: Box <Ramp <T>>,
span_divisions: f64 ,
curve: RampCurve ,
},
}Expand description A value that may travel over the line’s Transform::RampSpan .
Three shapes, because a build is not always a smooth sweep: 4 stays put,
4..16 sweeps continuously, and 2>4>8>16 holds each value in turn. All of
them hold their final value once the span has passed — a crescendo arrives
and stays until the performer changes it.
4..16 — travels continuously from one end to the other.
2>4>8>16 — each value held for an equal share of the span.
Split into head and tail so the sequence can never be empty.
r(...) — a travel that carries its own window instead of inheriting
the line’s | ramp: a span in time divisions (the signature’s
beats) and its own curve. In 4/4, r(300,9000,4) spans one cycle; in
2/4 the same span is two. Written without internal spaces.
Fields The travel itself — always Sweep or Steps.
Window length in time divisions. Fractions are legal: 0.5 is
half a beat, which with osc is a wobble.
Build a stepped ramp, collapsing to a fixed value when nothing follows.
The value held before the ramp starts moving.
Whether this value travels, and so needs a ramp span.
Every value the ramp passes through, for range checking.
The window a r(...) value carries, if it has one of its own.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.