Skip to main content

Module duration

Module duration 

Source
Expand description

Rhythmic duration primitives.

Structs§

Duration
Rhythmic duration measured in quarter lengths.
DurationTuple
One written value of a duration and how long it lasts: music21’s DurationTuple.
Grace
How a grace note is written and played: what music21’s GraceDuration carries beside its written values.
Tuplet
A length written as a tuplet: actual notes in the time of normal, each side optionally counted in a written value.
TupletNotation
How a tuplet is written on the page, as music21 starts one: no bracket placed yet, drawn as a bracket above the notes, with the number of notes shown.

Enums§

DurationType
A note-value name, as music21’s duration.typeToDuration defines them.
TupletBracket
How a tuplet’s bracket is drawn: music21’s bracket, True, False or 'slur'.
TupletShow
Which of a tuplet’s counts is shown and how: music21’s tupletActualShow and tupletNormalShow.
TupletType
Where a tuplet’s bracket falls over its notes: music21’s Tuplet.type.

Functions§

quarter_conversion
The written note values a length is made of and the tuplet, if any, they are written inside: music21’s quarterConversion.
quarter_length_to_closest_type
Returns the note-value type closest to a quarter length, and whether it is exact, as music21’s quarterLengthToClosestType does: a length between two types reports the longer one, so a triplet quarter is an inexact eighth.
quarter_length_to_non_power_of_2_tuplet
The one enormous tuplet music21 falls back on for a length no tie of written values reaches: its quarterLengthToNonPowerOf2Tuplet.
quarter_length_to_tuplet
The tuplets a length can be written as, shortest note value first: music21’s quarterLengthToTuplet, stopping after max_to_return of them.