split-measure

• Oct 4, 2011 - 20:53

Am interested in developing a plug-in to split a measure and am wondering whether the necessary objects/controls are available in the plugin framework. The functionality I'm after is:

- starting with a note selected, invoke the "split-measure" plugin, which would:
1) insert a new empty measure following the existing measure
2) copy and paste the notes from the existing measure to the new measure
3) in the existing measure, delete the selected note and all subsequent notes (i.e. turn them into rests)
4) in the new measure, delete all notes that are before the copy of the selected note (i.e. turn them into rests)

So, the end result would be two measures whose contents are the front-half and back-half of an existing measure.
Does this description make sense? and is this possible within the plugin framework?


Comments

In my experience, anything that involves creating notes where none existed before doesn't work well from a plugin. I mean, there methods to add notes, but there is no way to create a tuplet or a tie, and only limited control of enharmonic spelling. That's why my explode plugin works by having you copy lone to be exp.oded to all relevant staves first - it's far more effective to remove notes from existing chords than to create new notes. Even adding notes to existing chords is subject to these same limitations - you can't create ties, tuplets don't necessarily work right, and enharmonic spelling is not entirely under your control.

Do you still have an unanswered question? Please log in first to post your question.