The library documents itself · Sound
stzSoundScore
36 own methods · 14 forms written with extensions, listed under their method
the source: base/sound/stzSoundScore.ring(opens in a new tab) · All classes · The area reference: Sound
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
No method of this class is run on this page: the class reaches files, the network, processes, the clock, chance or sound, and an example run here would only be an example of its effects. Each method carries the explanation the library gives of itself.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
Note
building ------------------------------------------------------------ One pitched note, after everything already in the score. `pNote` is a note name ("A4", "C#3", "Bb2", "D4+50") or a frequency in Hz.QCSXTZZZIBWU
GlideAt
MU4: a note whose pitch MOVES from one pitch to another over its whole length -- a meend, a Zarma slide, a kalangu's squeezed tone. Names or Hz.no extension
NoteAt
MU3: a note at an explicit beat, for a score built from a pattern. It does not move where the next Note() goes; the length grows to cover it.no extension
StrokeAt
(no comment in the source: the name reads as a sentence) stroke atno extension
SetLength
The length in beats, set outright -- a pattern's cycles end where they end, whatever their last note does.no extension
Rest
(no comment in the source: the name reads as a sentence) restQCSXTZZZIBWU
Stroke
A struck sound on a membrane -- :dum, :tak, :ka, or :kick, :snare, :hihat on the kit. Which drum strikes it is the instrument's business (On).QCSXTZZZIBWU
AddNotes
Space-separated names, one beat each; the octave carries; ~ rests.QCSXTZZZIBWU
Then
the algebra --------------------------------------------------------- SEQUENCE: the other score starts where this one ends.QCSXTZZZIBWU
Together
PARALLEL: the other score starts where this one starts. The length is the longer of the two.QCSXTZZZIBWU
Repeat
The same score, n times in sequence.QCSXTZZZIBWU
On
AND it names the notes this score gains AFTERWARDS by Note and Stroke. The first cut was the pure modifier only, and the very first smoke test fell into it: StzSoundScoreQ().On(:Drumkit) then twenty strokes named NOTHING (the score was empty when On ran), so every stroke went to the default piano and was refused. A rule that the first user breaks in the first line is the rule's fault. Scores joined by Then or Together keep their own naming -- an unnamed part stays unnamed until an outer On names it.QCSXTZZZIBWU
Transpose
Semitones, fractional allowed (0.5 is a quarter tone). Strokes keep their pitch: a transposed drum pattern is the same drum pattern.QCSXTZZZIBWU
SetVelocity
The velocity of notes ADDED FROM NOW ON, 0 < v <= 1.QCSXTZZZIBWU
Tempo
the performance settingsQCSXTZZZIBWU
Quantize
Snap every start to the nearest multiple of `pnGrid` beats (0.25 = a sixteenth). 0 turns it off. Durations are left alone.QCSXTZZZIBWU
Swing
SWING: the first of each PAIR of subdivisions lasts `pnRatio` of the pair. 0.5 is straight, 2/3 is a triplet swing, 0.75 a dotted one. Every position is warped, not only those on the grid -- the first half of each pair is stretched and the second compressed, piecewise-linearly -- so a note between two grid points moves with its neighbours instead of jumping past one.QCSXTZZZIBWU
SwingOn
(no comment in the source: the name reads as a sentence) swing onno extension
Events
reading it ---------------------------------------------------------- The events in start order. A copy: changing it changes nothing here.no extension
NumberOfEvents
(no comment in the source: the name reads as a sentence) number of eventsno extension
PitchedEvents
The plan's fourth transform: key, mode, density, contour -- Music21's side, on the same stzSoundScore every other transform makes and reads. the pitched events, in start orderno extension
RangeInCents
lowest to highest pitch, in centsno extension
Density
pitched notes per beatno extension
Contour
"U", "D" or "S" from each pitched note to the next -- S within 5 centsno extension
BestModes
WHICH DECLARED MODE FITS: every mode of every universe, every note tried as its tonic, scored by how far (in cents) each note sits from the nearest degree of the mode, going up or coming down -- the mean. [ universe, mode, tonicHz, meanCentsOff ], best first. It ranks the DECLARATIONS; a tie is reported as a tie.no extension
Beats
(no comment in the source: the name reads as a sentence) beatsno extension
TempoInBpm
(no comment in the source: the name reads as a sentence) tempo in bpmno extension
SwingRatio
(no comment in the source: the name reads as a sentence) swing rationo extension
Seconds
(no comment in the source: the name reads as a sentence) secondsno extension
FrameOf
WHERE A BEAT LANDS, in 0-based frames at `pnRate`: quantised, then swung, then timed. The one place beats become frames -- the offline render and the live scheduler both call it, so they cannot disagree about when a note is.no extension
SecondsOf
(no comment in the source: the name reads as a sentence) seconds ofno extension
ToSound
performing it ------------------------------------------------------- The whole performance, rendered offline into one sound. Every note is the instrument's (MU1), placed at FrameOf() by mixInto.QCSXTZZZIBWU
Play
(no comment in the source: the name reads as a sentence) playno extension
LastError
(no comment in the source: the name reads as a sentence) last errorno extension
Refusals
(no comment in the source: the name reads as a sentence) refusalsno extension

