Module

Data.Midi.WebMidi

Package
purescript-midi
Repository
newlandsvalley/purescript-midi

This module provides plug and play support for MIDI input devices such as MIDI keyboards.

#WEBMIDI Source

data WEBMIDI :: Effect

The WEBMIDI Effect.

#RawMidiEvent Source

type RawMidiEvent = { encodedBinary :: String, timeStamp :: Number }

A 'raw' Midi Event where the event has not been decoded.

#Device Source

type Device = { connected :: Boolean, id :: String, manufacturer :: String, name :: String, portType :: String, version :: String }

A Midi Device.

#webMidiConnect Source

webMidiConnect :: forall eff. (Eff (wm :: WEBMIDI | eff) Boolean)

try to connect to Web-Midi.

#detectInputDevices Source

detectInputDevices :: forall e. (Device -> Eff e Unit) -> Eff e Unit

detect any input device as it connects or disconnects

#listen Source

listen :: forall e. (RawMidiEvent -> Eff e Unit) -> Eff e Unit

listen to 'raw' web-MIDI event messages.

#createDeviceChannel Source

createDeviceChannel :: forall eff. Eff (channel :: CHANNEL | eff) (Channel Device)

create a channel for MIDI device connections/disconnections and feed it from web-midi

#createEventChannel Source

createEventChannel :: forall eff. Eff (channel :: CHANNEL | eff) (Channel TimedEvent)

create a channel for MIDI timed event messages and feed it from web-midi