music-notation-swift / music-notation-core

Music Notation Library in Swift (Deprecated. See `music-notation` instead)
MIT License
115 stars 16 forks source link

Need a way to get the flat note count within a measure #87

Closed moidx closed 8 years ago

moidx commented 8 years ago

Currently, Measure.noteCount does not take into account all the notes contained inside a deeply nested Tuplet. This causes issues with the way Measure.ModifyTie is implemented, due to the way range checks are performed.

It would also be useful to know how many notes are available within a measure give the way Measure.note(at:) is implemented.

This issue is to propose the creation of a Measure.noteFlatCount property to make the total note count available.

drumnkyle commented 8 years ago

Yeah. I found that it would be useful to have this type of property on Tuplet which is what would be needed for this change. Need to figure out the right naming.

moidx commented 8 years ago

Make sure to write a test that exposes this issue in Measure.ModifyTie