ELVIS-Project / vis-framework

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

Error thrown with grace notes and layers #396

Open minamouse opened 8 years ago

minamouse commented 8 years ago

I found these errors popping up:

cannot reindex from a duplicate axis

and

reindexing only valid with uniquely valued index objects

and figured out that they happen when there are duplicates in the index, so duplicate offsets. Right now this is happening when there are grace notes in the music or different layers. There might be other cases too, but these are the ones I've found so far.

Here's an example of grace notes:

4.25       C5
4.50       C5
4.50       B4
5.50       A4
minamouse commented 8 years ago

I think the solution to this might be related to the issue with indexing chords - #258 and #382, so maybe they should be worked on together?

alexandermorgan commented 8 years ago

Good catch! What piece did you use that had the grace notes? The issue with grace notes is that they're not exactly the same as chord objects, because in reality they don't happen at the same time as the "real" note. They happen in a linear succession. Perhaps we should check for grace notes and ignore them? This doesn't seem like an ideal solution either. This should be discussed in the next ELVIS meeting because it's more of a musicological problem than a coding one.

musicus commented 8 years ago

@mborsodi did you you already try your proposed solution?