hogbait/hairy-octo-robot — pull request #26 by hogbait (2013-10-24 04:18:17+00:00)
Title: changed the spec for the Bar class

@jpmccabe @fmmoret

While writing tests for the parser, I realized that I did not provide a way to mark bars as the "ending" of major sections. The problem arises when we have to figure out the repeated sections. Here is a quote from the abc subset:

"The begin repeat bar '|:' may be omitted; in this case, the repeat is from the beginning of a major section (i.e. the bar that immediately follows '|]'), or the beginning of the musical piece."

I changed the bar specification and ported Patrick's code to use it. It seems to work on the mario example. Though, I bet he needs to tweak his algorithm a tiny bit to fulfill the above requirement (now that the data structure supports section endings).

Take a look at the design doc for more information on the following classes:

Bar
BarPrefix
BarSuffix