Expand description
How loud a note is: music21’s volume.Volume.
A volume is one number held two ways — a MIDI velocity from 0 to 127 and
the same value as a scalar from 0 to 1 — plus the rule for reading it
against the dynamic marks around it. A volume does not know the note it
belongs to, so Volume::realized_with takes the dynamic scalar and the
articulation shift as arguments; the marks themselves are found in a
stream by dynamic_context, dynamics_in_force and
realize_volume.
Structs§
- Volume
- How loud a note is: music21’s
volume.Volume.
Enums§
- Dynamic
Context - Where
realize_volumelooks for the dynamic a note sounds under: music21’suseDynamicContext, which isTrue,Falseor aDynamic.
Functions§
- dynamic_
context - The dynamic a note’s volume is read against: music21’s
getDynamicContext, which asks the note for the nearest dynamic at or before it. - dynamics_
in_ force - The dynamic each element of a stream stands under: for every element
Stream::leaveslists, the position in that list of the dynamic in force where it stands, orNonewhere no dynamic is. - realize_
volume - Sets how loud every note and chord of a stream sounds, from the dynamics
in force: music21’s
realizeVolumewithsetAbsoluteVelocity. - rounded_
str - A loudness written out the way Python writes
str(round(value, 2)): to two places, with the trailing zeros dropped but never the point.