HSoM API

Last modified: Apr 26, 2016 @ 3:45 pm

This page gives a list of important datatypes and functions in the HSoM library. For more information on the functions, types, and type classes listed here, please see the Haskell School of Music textbook or, from GHCi with Euterpea and HSoM imported, type the following:

:i nameYouWantToKnowAbout

Performance Functions and Type Classes

Function/ClassDescription
PerformableType class with one function, perfDur, for performance with players.
hsomPerformPlayer-based conversion from Music to Performance.
playALike Euterpea's play but for use with HSoM's Players.
writeMidiALike Euterpea's writeMidi, but for use with HSoM's Players.

UISF Functions and Widgets

FunctionDescription
topDown/bottomUpWidgets get added from top to bottom or bottom to top.
leftRight/rightLeftWidgets get added from left to right or right to left.
setSizeSet the window size.
setLayoutSet window layout.
defaultMUIParamsDefault Window parameters for use with runMUI.
runMUIRun a UISF Window using the UIParams (like defaultMUIParams).
runMUI'Like runMUI but without the UIParams argument.
getTimeTime since program start in milliseconds.
labelText label.
displayDisplay a value (requires a Show instance).
displayStrDisplay a String without quotes.
withDisplayAttach a display to a value.
textboxTextbox widget that allows user input.
titleSet the title of a window.
buttonButton widget.
stickyButtonButton that stays depressed when clicked and must be clicked again to release it.
checkboxCheckbox widget.
checkGroupCollection of check box widgets.
radioCollection of radio button widgets.
hSlider/hiSliderHorizontal slider for continuous/discrete values.
vSlider/viSliderVertical slider for continuous/discrete values.
listboxList box widget.

MIDI Widgets

selectInputSelect a MIDI input device.
selectInputMSelect multiple MIDI input devices.
selectOutputSelect a MIDI output device.
selectOutputMSelect multiple MIDI output devices.
midiInReceive from a MIDI input device.
midiOutReceive from a MIDI output device.
midiInMReceive from multiple MIDI input devices.
midiOutMSend to multiple MIDI output devices.
midiOutBSend buffered, time-stamped events to a single MIDI output device.
midiOutMBSend buffered, time-stamped events to multiple MIDI output devices.