r/haskell•
DimaSamoz

Mezzo – music composition meets dependent types

Hello all!

I'm very happy to have finished the first more-or-less public version of my undergraduate project, and I thought I would post it on Reddit and get some feedback!

GitHub

Mezzo is a music composition EDSL which uses Haskell's advanced type-level computation features to enforce various rules of classical music at compile-time. That is, a composition which violates a rule (e.g. contains dissonant harmonic intervals) fails to compile and displays a type error describing the nature and source location of the mistake. While the main aim of this project was to experiment with Haskell's fancy new dependently typed programming extensions (such as TypeInType), I think the end product could be useful for music education and composition in general. There is still quite a lot that can be added or improved, but the core features are complete. Take a look at the examples folder to see the library in action in compositions such as Bach's Prelude in C Major or Beethoven's Für Elise!

Let me know what you think!

Posted Jun 16, 2017, 7:00 PM UTC

11064
Loading comments…