Remember problem 21 and how it could have been a hard-core hacking task? This is it.
Write a program that can read abc, the musical notation language, and can play it. Submit your code on the coding19 channel together with a quick screencast of what it can do.
There are many MIDI libraries available. The amount of required musical background can be learned within an hour.
Lockdown-style challenge: Generate your own abc theme and use the coding19 channel to challenge (a specific or all the participants) to convert it to music!
Additional challenge: If you are using a statically typed programming language: can you use typing rules to enforce patterns such as metrics, e.g. that the total length count in a bar corresponds to the required meter?
Can you play Paddy O’Rafferty?
X:1
T:Paddy O'Rafferty
C:Trad.
M:6/8
K:D
dff cee|def gfe|dff cee|dfe dBA|dff cee|def gfe|faf gfe|1 dfe dBA:|2 dfe dcB|]
~A3 B3|gfe fdB|AFA B2c|dfe dcB|~A3 ~B3|efe efg|faf gfe|1 dfe dcB:|2 dfe dBA|]
fAA eAA|def gfe|fAA eAA|dfe dBA|fAA eAA|def gfe|faf gfe|dfe dBA:|