# Mario Paint Composer File Parser (#215)

**URL:** <https://www.ruby-forum.com/t/mario-paint-composer-file-parser-215/172657>\
**Category:** Ruby\
**Created:** [July 24, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/mario-paint-composer-file-parser-215/172657 "2009-07-24T18:54:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [July 24, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/mario-paint-composer-file-parser-215/172657/1 "2009-07-24T18:54:41Z")

</div>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

The three rules of Ruby Q.:

1. Please do not post any solutions or spoiler discussion for this  
quiz until 48 hours have elapsed from the time this message was  
sent.

2. Support Ruby Q. by submitting ideas and responses  
as often as you can!  
Visit: [http://rubyquiz.strd6.com/suggestions](http://rubyquiz.strd6.com/suggestions)

3. Enjoy!

Suggestion: A [QUIZ] in the subject of emails about the problem  
helps everyone on Ruby T. follow the discussion. Please reply to  
the original quiz message, if you can.

RSS Feed: [http://rubyquiz.strd6.com/quizzes.rss](http://rubyquiz.strd6.com/quizzes.rss)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

## Mario Paint Composer File Parser (#215)

Niltze Rubyists,

This week’s quiz is to create a parser for Mario Paint Composer[1](http://www.unfungames.com/mariopaint/)  
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:  
[Zelda Gerudo Valley on Mario Paint Composer - YouTube](http://www.youtube.com/watch?v=XDQu_kFpIHs) . There are many many  
more[2](http://www.youtube.com/results?search_query=mario+paint+composer&search_type=&aq=0&oq=mario+paint+c).

Have Fun!
