215 Mario Paint Composer File Parser

Description

Niltze Rubyists,

This week’s quiz is to create a parser for Mario Paint Composer files. Attached is a sample data file.

The file consists of three parts:

A time signature, either 3/4 or 4/4
A sequence of 384 beats which may each contain:
  up to five notes which contain:
    the instrument
    the position on the musical staff
  the volume for the beat
The tempo of the piece

The output can be in any format you want but should contain all the data from the original file format. For extra credit you can add the ability to translate back into the Mario Paint Composer format. Here is an example of Mario Paint Composer in action. There are many many more.

Have Fun!

Sample

Summary

There were no responses to this week’s quiz. However, if you are interested in parsing MPC files I did come across this Python application that has some similar parsing going on: Mario Paint Composer Assistant. This may come in handy on your journey.


Sunday, July 26, 2009