MarkGotham / Taking-Form

Code and corpus for processing analyses of musical form as reported in Gotham and Ireland, ISMIR 2019.
MIT License
12 stars 4 forks source link

Enable user to write shorthand in tabular markup #1

Open MatthewIreland opened 5 years ago

MatthewIreland commented 5 years ago

"Repeat" shorthand should be unpacked, to save user time when entering annotations in tabular format.

Example

1,-1,Scherzo,A,Theme a,X 5,-1,,,,X Repeat: 1-8,,,,,

Should become

1,-1,Scherzo,A,Theme a,X 2, 3, 4, 5,-1,,,,X 6, 7, 8, 1a,-1,Scherzo,A,Theme a,X 2a, 3a, 4a, 5a,-1,,,,X 6a, 7a, 8a,

Also "range equality":

33-36=1-4,-1,,A,Theme a,X 37,-1,,,,X 41,-1,,X,,

Becomes

33,-1,,A,Theme a,X 34, 35, 36, 37,-1,,,,X 38, 39, 40, 41,-1,,X,,