Music Theory in Ruby

Learning (and playing) with Ruby these past few weeks I’ve been looking for ways to solve modest, day-to-day Humanities problems. Digital Humanities, after all, doesn’t just have to be about big questions like crowdsourcing, right?

Here’s something that’s been making me very happy this week: automated generation of randomized music theory drills. I’m currently teaching an introductory theory course, and especially at the end of the semester the students are hungering for extra drills to prepare for their final exam. Wouldn’t it be great if I had a magic machine that would just pump out an endless number of these worksheets?


(click for the answer key)

Well…now I do! This worksheet was generated with a Ruby script (here’s the source) writing music notation in LilyPond. I also noticed that working out an algorithm for interval identification to generate the key helped me figure out how to better explain this task to the students.

Next up? An entire generated exam! (I’ll be a hero to future generations of instructors to this course.) I have some ideas about applications to more serious scholarly and artistic endeavors as well, but more on that later…

Chris Peck is a composer/performer whose work has been presented extensively around the US and internationally. His works involving collaboration with contemporary dance, audience participation, various mixtures of trained and “untrained” performers, and site specificity have been performed at the Venice Biennale, Performa, ImPulsTanz, Improvised and Otherwise, The Whitney Museum, and The Kitchen, and reviewed…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Archives