brown.models.interval

classes

A pitch interval.

__init__ (specifier) permalink view source

arguments:

specifier (str): A description of the interval.

properties

staff_distance: float The number of staff units covered by this interval. permalink view source

If this value is converted to a StaffUnit, it will give the vertical distance from the starting note to ending note on the staff, where 1 is the distance between two staff lines.

Note that the interval quality has no effect on this property.

>>> Interval('aM3').staff_distance
1.0
>>> Interval('dm3').staff_distance
-1.0
>>> Interval('aP1').staff_distance
0.0
>>> Interval('dP8').staff_distance
-3.5

read-only.

simple_distance: float The simplified interval distance collapsing compound intervals. permalink view source

This value is the simplified version of self.distance where intervals larger than an octave are moved to be within one octave.

Examples:

>>> Interval('aM10').simple_distance
3
>>> Interval('dP12').simple_distance
5

read-only.