Next: , Previous: Stroke Enumeration, Up: Musical Analysis



7.2 Music Regular Expressions

The music_details class provides the means to describe musical rows to the music class. The music_details class stores details of the expression to be matched (as a string) and an associated rating, if the user so desires.

Ratings may be positive or negative, this allows a total weighted score to be calculated from the sum of the result scores. For example, 678s may be rated at a +2, but 87s at backstroke rated as -10.

When a match sequence is run via the music class, if a row matches that described by the details provided to a music_details object, then the count will be incremented.

The result can either be returned as a raw count, or as a score calculated from the multiplication of the count and the given rating.

If it is specified, then the count or score can be return for just the handstroke, backstroke or both.

Further details relating to the music_details class can be accessed from the menu below: