Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

Cmd.PlayC

Description

The FFI-using part of Cmd.Play. It uses the FFI because the play monitor wants to directly call to the UI to update the playback indicator, which is much more efficient than going through the whole Ui.Diff thing.

But that means Cmd.Play would import FFI-using modules, which causes a problem for ghci, and, since I want the Cmd.Play functions to be available there, for the REPL as well. So I engage in a hack: the play cmd returns a special Cmd.PlayMidi value which contains the arguments for the play monitor thread. The responder treats it as a Done but will call play with the given args.

Actually since I have *Stub modules now I think this hack is no longer needed. But I'll leave it in place for now since it doesn't seem to be hurting anything and it's nice to divide play into low and high level.

Synopsis

# Documentation

Respond to msgs about derivation and playing status.

This actually kicks off a MIDI play thread, and if an inverse tempo function is given, a play monitor thread.