alsa-midi-0.3.2: Bindings for the ALSA sequencer API (MIDI stuff)Source codeContentsIndex
Sound.ALSA.Sequencer
Synopsis
data Event
= MIDIEvent Channel T
| MetaEvent MetaEvent
| SysExStart ByteString
| SysExCont ByteString
isNoteOn :: Event -> Bool
isNoteOff :: Event -> Bool
createClient :: OpenMode -> String -> IO Client
deleteClient :: Client -> IO ()
createInputPort :: Client -> String -> IO Port
createOutputPort :: Client -> String -> IO Port
withMIDIEvents :: String -> String -> ([Event] -> IO a) -> IO a
receiveMIDIEvent :: Client -> IO (Maybe Event)
sendPlainEvent :: Client -> Event -> IO ()
drainOutput :: Client -> IO ()
initQueueTempo :: Client -> Queue -> Int -> Int -> IO ()
withNamedQueue :: Client -> String -> (Queue -> IO a) -> IO a
portAddress :: Client -> Port -> Address
numAddress :: Integer -> Integer -> Address
numAddressEither :: Integer -> Integer -> Either String Address
data Client
newtype Port = Port CUInt
eventFromMIDIEvent :: Queue -> Event -> (EventType, EventDataUnion)
Documentation
data Event Source
Constructors
MIDIEvent Channel T
MetaEvent MetaEvent
SysExStart ByteString
SysExCont ByteString
show/hide Instances
isNoteOn :: Event -> BoolSource
isNoteOff :: Event -> BoolSource
createClient :: OpenMode -> String -> IO ClientSource
deleteClient :: Client -> IO ()Source
createInputPort :: Client -> String -> IO PortSource
createOutputPort :: Client -> String -> IO PortSource
withMIDIEvents :: String -> String -> ([Event] -> IO a) -> IO aSource
Process MIDI events from ALSA in a lazy manner. The processing function must be strict, in order to let the cleanup take place after abandoning the process.
receiveMIDIEvent :: Client -> IO (Maybe Event)Source
sendPlainEvent :: Client -> Event -> IO ()Source
drainOutput :: Client -> IO ()Source
Strangly ALSA returns error code 2 (No such file or directory) if the destination port does not exist.
initQueueTempo :: Client -> Queue -> Int -> Int -> IO ()Source
withNamedQueue :: Client -> String -> (Queue -> IO a) -> IO aSource
portAddress :: Client -> Port -> AddressSource
numAddress :: Integer -> Integer -> AddressSource
numAddressEither :: Integer -> Integer -> Either String AddressSource
data Client Source
newtype Port Source
Constructors
Port CUInt
show/hide Instances
eventFromMIDIEvent :: Queue -> Event -> (EventType, EventDataUnion)Source
Produced by Haddock version 2.6.0