Safe Haskell | Safe-Inferred |
---|
Test MIDI bindings, automatically and manually.
Synopsis
- type Interface = Interface.RawInterface Midi.WriteMessage
- main :: IO.IO ()
- type ReadMsg = IO.IO (Maybe Midi.ReadMessage)
- type WriteMsg = (RealTime.RealTime, Midi.Message) -> IO.IO ()
- test_midi :: Either Text Interface -> IO.IO ()
- open_devices :: Interface -> Bool -> [Midi.ReadDevice] -> Maybe String -> IO.IO (WriteMsg, ReadMsg)
- nonblocking_get :: Interface.ReadChan -> ReadMsg
- blocking_get :: Interface.ReadChan -> ReadMsg
- usage :: String
- program_change :: WriteMsg -> ReadMsg -> IO.IO ()
- record_sysex :: ReadMsg -> IO.IO ()
- send_sysex :: WriteMsg -> IO.FilePath -> IO.IO ()
- monitor :: ReadMsg -> IO.IO ()
- thru_loop :: WriteMsg -> ReadMsg -> IO.IO ()
- thru_melody :: Interface -> WriteMsg -> ReadMsg -> IO.IO ()
- melody :: Interface -> WriteMsg -> IO.IO ()
- notes :: RealTime.RealTime -> [(RealTime.RealTime, Midi.Message)]
- mmc :: WriteMsg -> String -> IO.IO ()
- parse_smpte :: String -> Maybe Midi.Smpte
- spam :: Interface -> WriteMsg -> Int -> IO.IO ()
- pitch_bend_range :: WriteMsg -> Double -> IO.IO ()
- run_tests :: Interface -> WriteMsg -> ReadMsg -> IO.IO ()
- test_abort :: Interface -> WriteMsg -> ReadMsg -> IO.IO ()
- test_merge :: Interface -> WriteMsg -> ReadMsg -> IO.IO ()
- test_sysex :: WriteMsg -> ReadMsg -> IO.IO ()
- chan_msg :: Midi.ChannelMessage -> Midi.Message
- note_on :: Midi.Key -> Midi.Message
- note_off :: Midi.Key -> Midi.Message
- sleep :: Double -> IO.IO ()
- read_until :: NominalDiffTime -> ReadMsg -> IO.IO (Maybe (Midi.ReadMessage, NominalDiffTime))
- read_all :: ReadMsg -> IO.IO [Midi.ReadMessage]
Documentation
type WriteMsg = (RealTime.RealTime, Midi.Message) -> IO.IO () Source #
open_devices :: Interface -> Bool -> [Midi.ReadDevice] -> Maybe String -> IO.IO (WriteMsg, ReadMsg) Source #
program change
sysex
record_sysex :: ReadMsg -> IO.IO () Source #
send_sysex :: WriteMsg -> IO.FilePath -> IO.IO () Source #
monitor
thru
melody
thru_melody :: Interface -> WriteMsg -> ReadMsg -> IO.IO () Source #
Play a melody while also allowing msgs thru, to test merging.
notes :: RealTime.RealTime -> [(RealTime.RealTime, Midi.Message)] Source #
Write notes over time.
mmc
parse_smpte :: String -> Maybe Midi.Smpte Source #
spam
pitch bend range
tests
run_tests :: Interface -> WriteMsg -> ReadMsg -> IO.IO () Source #
Test a few things by writing and reading both ends of the same port.
test_abort :: Interface -> WriteMsg -> ReadMsg -> IO.IO () Source #
Ensure that aborts really cancel pending msgs.
test_merge :: Interface -> WriteMsg -> ReadMsg -> IO.IO () Source #
Ensure that timestamp 0 msgs get merged in ahead of timed msgs, as per
Interface.write_message
.
util
note_on :: Midi.Key -> Midi.Message Source #
note_off :: Midi.Key -> Midi.Message Source #
read_until :: NominalDiffTime -> ReadMsg -> IO.IO (Maybe (Midi.ReadMessage, NominalDiffTime)) Source #