Expand description
Two streams aligned note by note, as an edit from one to the other:
music21’s alpha.analysis.aligner.
Structs§
- Change
- A change from the target to the source: the target’s note, the source’s, and what became of it.
- Change
Place - Where a change stands: the places music21 reads the two hashes from, and what became of the note.
- Stream
Aligner - Two streams aligned by their notes’ hashes, the cheapest edit from one to
the other: music21’s
StreamAligner.
Enums§
- Change
Op - What becomes of a note from the target to the source: music21’s
ChangeOps.
Functions§
- change_
places - The cheapest edit from the target to the source read out of a matrix
already filled, each change with the places of the two hashes it is
between: the by-position twin of
calculateChangesList. - default_
hasher - A hasher for an alignment: music21’s
StreamAligner.getDefaultHasher, which hashes no offset and says what each hash was made from. - delete_
cost - What it costs to take a note out that the target has not got: music21’s
deleteCost, which is the same count. - fill_
distance_ matrix - The cheapest edit onto every opening of the two, written into a matrix
already set up: music21’s
populateDistanceMatrix. - hashes_
equal_ without_ reference - Whether two hashes say the same of a note, whatever each was made from:
music21’s
tupleEqualityWithoutReference. - insert_
cost - What it costs to put a note in that the source has not got: music21’s
insertCost, which is how many values the hash says. - moves_
from_ location - The costs of the three moves onto a cell – up, left and diagonally –
each nothing where that cell is off the matrix: music21’s
getPossibleMovesFromLocation. - num_
similarities - How many of the values two hashes say alike: music21’s
calculateNumSimilarities. - op_
from_ location - The change that leads to a cell: music21’s
getOpFromLocation– none where the cost standing there is the cheapest move’s, otherwise the cheapest move, up before left before diagonal. - populate_
distance_ matrix - A matrix set up and filled in one: music21’s
setupDistanceMatrixandpopulateDistanceMatrixtogether. - setup_
distance_ matrix - A matrix of the right size for an alignment, every cost nought:
music21’s
setupDistanceMatrix. - similarity_
score - How much of an edit changes nothing: music21’s
similarityScore. - substitution_
cost - What it costs to turn one note’s hash into another’s: music21’s
substitutionCost– nothing where the two say the same, otherwise how many of the values differ.