In this example, the first couple of measures of Hey Jude by the Beatles are modeled. The vocal score part is shown below:
In a time-based context representation, this excerpt can be visualized like this (click to enlarge):
An equivalent concise contextual tree representation looks like this:
Syntactically, this can be expressed in the MPS language:
title "Hey Jude" composer "The Beatles" composition { time 4/4, tempo 72, key F { harmonicProgression F C C7 F, harmonicRhythm 1 1 1 1 { instrument vocals { rhythm (4) 4 _2. { pitches 4 2 { lyrics "Hey Jude" } } rhythm (8 8 8) 4 _2. { pitches 2 4 5 1 { lyrics "don't make it bad" } } rhythm (8 8) 4 4 _2 { pitches 1 2 3 7 { lyrics "take a sad song" } } rhythm (8 8 8) 8 16 16 4 _2 { pitches 7 6 4 5 4 3 2 { lyrics "and make it bet-te--r" } } } } } }
A complete version of this song is available in the github example repository.