Tonal space manipulations and analysis.
Note that this module is only intended for formalism-independent tonal
space manipulations. Functions should not rely on representations that
are formalism-specific, like TonalDenotation.
They may use things like coordinates, which could be produced from an
formalism-specific semantics.
|
(x,y) coordinate
|
nearest_neighbour(base_coord,
root_number)
Returns the coordinate of the point with the given root number that
is closest to the given point base_coord. |
source code
|
|
|
|
|
|
|
coordinate_to_roman_name(coord,
sharp='#',
flat='b',
plus='+',
minus='-',
names=None,
accidentals_after=False)
Given a coordinate (x,y), returns the unique roman numeral name of
that point in the space, assuming that I is at (0,0). |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
equate_ends(coords0,
coords1)
Translates the second list of coordinates so that it ends at the same
point as the first and returns the result. |
source code
|
|
|
|
coordinate_to_et(coord)
Takes a point in the tonal space and returns the number of semitones
above the origin's pitch that point would be in equal temperament. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
tonal_space_pitch(coord)
Given a 3D coordinate in the tonal space, returns the pitch ratio of
that point from the origin's pitch. |
source code
|
|
|
|
tonal_space_pitch_2d(coord)
Given a 2D coordinate in the tonal space, returns the pitch ratio of
that point from the origin's pitch assuming that the point is within
one octave above the origin. |
source code
|
|
|
|
tonal_space_et_pitch(coord)
Given a (2D) point in the tonal space, returns the pitch ratio from
the origin that it would have in the equal-temperament wrapped space. |
source code
|
|
|
|
et_interval(st=1,
oct=0)
Frequency ratio corresponding to a number of ET semitones and
octaves. |
source code
|
|
|
|
add_z_coordinates(coords,
center=(0, 0, 0),
pitch_range=1)
Given a list of (x,y) coordinates, adds a z-coordinate to each such
that the pitch of the notes is kept within a given number of octaves
around the given center. |
source code
|
|
|
|
root_to_et_coord(root)
Given a ET root as an integer in the range 0 <= r < 12, returns
the 2D ET coordinate in the range (0,0) <= (x,y) < (4,3) that
that root has in the 4x3 ET space. |
source code
|
|