ELVIS-Project / vis-framework

Thoroughly modern symbolic musical data analysis suite.
http://elvisproject.ca/
31 stars 6 forks source link

Tied notes generate two note events #313

Closed alexandermorgan closed 9 years ago

alexandermorgan commented 10 years ago

If two notes are tied and occur with a longer note that encompasses the combined duration of both notes (e.g. two tied half notes over a whole note) the second note in the tied notes generates a new event which is not what users would want or expect as a default.

crantila commented 10 years ago

To be more precise, what Alex noticed is a discrepancy between "notes as written on a score" and "notes as heard by a listener." I agree it's more likely a music theory expects "events" to be "notes as heard by a listener," so this is likely a useful enhancement. Although the FilterByRepeatIndexer can already sort of simulate this behaviour, but Alex requests something that removes repeated identical events only for not-the-first note in a tied note.

Whether this should be a default, and how that would be implemented, is another discussion entirely.

alexandermorgan commented 9 years ago

This issue is addressed in music21 with the .stripTies() command that can be passed when streams are imported. The alex_devel branch makes use of .stripTies() in the "_import_score() method in indexed_piece.py making the desired durations reflected in the results of the noterest, duration, beatStrength, and interval indexers. .stripTies() also removes measure lines but this may be avoided with the retainContainers=False setting. See music21 documentation: http://web.mit.edu/music21/doc/moduleReference/moduleStream.html?highlight=strip%20ties#music21.stream.Stream.stripTies