Exception: Not implemented: play

28 views
Skip to first unread message

oliver...@gmail.com

unread,
Oct 17, 2014, 4:07:24 PM10/17/14
to music-sui...@googlegroups.com
I'm trying to play a test, but I get an exception:

ghci> import Music.Prelude
ghci> let example = c |> d |> e
ghci> play $ asScore $ example
*** Exception: Not implemented: play

What do I need to set up to get playing to work?

Hans Höglund (2)

unread,
Oct 18, 2014, 7:24:14 PM10/18/14
to music-sui...@googlegroups.com, oliver...@gmail.com
Hi Oliver,

Sorry about the missing function. This used to be implemented using Haskell MIDI-bindings which did not work well on all platforms.

I recommend installing Timidity and defining your own play as follows:

let play x = do
  writeMidi "test.mid" $ asScore x
  System.Process.system "timidity test.mid"

Good luck,
Hans
Reply all
Reply to author
Forward
0 new messages