Expand description
How what a stream’s notes sound goes with the dynamics they sound under:
music21’s analysis.correlate.
Functions§
- pitch_
to_ dynamic - Each pitch of each note and chord of a stream flattened, with each
dynamic it sounds under – the dynamic’s place in
SHORT_NAMES, fromppppppat nought toffffff– one pair for each: music21’sActivityMatch.pitchToDynamic. A dynamic holds from its offset to the next dynamic’s, the last to the end of the stream, and a note starting just where one dynamic ends and the next begins sounds under both. music21 reads where a dynamic ends as its offset plus its length in Python’s arithmetic, which rounds a sum of an offset in quarters and a length in thirds, so a note on a third of a beat can fall just after the end and sound under the next dynamic alone; this reads them so too. - pitch_
to_ dynamic_ counts - The same pairs, each once, with how many times it comes, in the order
first met: music21’s
pitchToDynamic(dataPoints=False).