« Back to jordanbalagot.com
Find tuplets below the staff in Finale files via music XML

Posted on Monday 28 April 2008

In the orchestration class I’m taking we have some very strict guidelines on how our sheet music should be formatted. I’m writing some scripts to detect notational errors in my scores based on these guidelines.

The first one I wrote detects if tuplets are marked below the staff. Our conductor requires us to have all tuplets marked above the staff.

This works on macs or linux (or cygwin on windows):

First export the file to a music XML file. File > Music XML > Export. Save it as test.xml in your home folder.

Then open up terminal and run this command:

tr ‘\r’ ‘\n’ < test.xml | egrep -i "tuplet.+below" If you exported the file on windows, you can just run egrep -i test.xml "tuplet.+below" The tr command converts the line breaks from mac to unix for grep to output properly. If you see something like "<tuplet number="1" placement="below" type="start"/>" then you have a tuplet below the staff somewhere, if you just see a line break then you don't. I haven't figured out yet how to have it tell you where in the file it is though. :/ Music XML is a powerful feature - it means you can mass find, manipulate, and replace elements in scores with a text editor if you search for the right things.


No comments have been added to this post yet.

Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed. Please consider what you're posting.

Use the buttons below to customise your comment.


RSS feed for comments on this post | TrackBack URI