O'Reilly logo

The Haskell School of Expression by Paul Hudak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER TWENTY-ONE

Interpreting Functional Music

 

 

 

 

 

In Chapter 20 I defined a language called MDL for describing musical structures. The question now is, how do we actually interpret the structures; that is, how do we turn them into real music? (This is analogous to the question of how to draw a Shape or Region value in a graphics window.) The approach I will take will be to convert a Music value into a Standard MIDI File, which can then be played on your computer using any standard media player. I will do this, however, in three steps:

1. First I will convert a Music value into a value of type Performance, which is an abstract notion of what the music means.

2. Then I will convert this into a value of type MidiFile, a data type imported ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required