NotatedDuration

class maelzel.scoring.NotatedDuration(base, dots=0, tuplets=None)[source]

Bases: object

Class representing the notated duration of a note

To convert base to quarterDuration: base/4

base

4=quarter note, 8=8th, etc.

dots

number of dots

tuplets

a list of (num, den). Example: [(3, 2)] for a normal triplet

Attributes Summary

dots

Number of dots

tuplets

A list of (num, den) tuplets.

Methods Summary

baseName()

The name of the base notation (one of 'quarter', 'eighth', '16th', etc.)

timeModification()

Returns the time modification determined by the tuplets in self

Attributes Documentation

dots: int = 0

Number of dots

tuplets: list[tuple[int, int]] | None = None

A list of (num, den) tuplets. A normal triplet would be [(3, 2)]

Methods Documentation

baseName()[source]

The name of the base notation (one of ‘quarter’, ‘eighth’, ‘16th’, etc.)

Return type:

str

timeModification()[source]

Returns the time modification determined by the tuplets in self

Return type:

Fraction

Returns:

a Fraction indicating the general time modification of the tuplets in this duration