-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Binding to the ALSA Library API (MIDI sequencer). -- -- This package provides access to ALSA sequencer (MIDI support). For -- audio support see alsa-pcm. Included are some simple example programs. -- For more example programs including a GUI, see the alsa-gui programs. @package alsa-seq @version 0.6.0.8 module Sound.ALSA.Sequencer.Poll descriptors :: T mode -> Events -> IO [Fd] module Sound.ALSA.Sequencer.Query class C info => C info init :: C info => info -> IO () next :: C info => T mode -> info -> IO Bool first :: C info => T mode -> IO info loop_ :: C info => T mode -> (info -> IO ()) -> (info -> IO ()) -> IO () loop :: C info => T mode -> (info -> IO ()) -> (info -> IO a) -> IO [a] -- | Overview: -- http://www.alsa-project.org/alsa-doc/alsa-lib/seq.html -- -- WARNING: This whole library does not seem to be particlarly thread -- aware. Perhaps place the sequencer handle in an MVar? module Sound.ALSA.Sequencer -- | The type of sequencer handles. data T mode -- | Read/Write permissions for the sequencer device. This way we prevent -- the ALSA exception 22 "Invalid argument" when calling -- event_output on an input-only sequencer. class OpenMode mode class OpenMode mode => AllowOutput mode class OpenMode mode => AllowInput mode data OutputMode OutputMode :: OutputMode data InputMode InputMode :: InputMode data DuplexMode DuplexMode :: DuplexMode -- | Blocking behavior of the sequencer device. data BlockMode -- | Operations may block. Block :: BlockMode -- | Throw exceptions instead of blocking. Nonblock :: BlockMode -- | Creates a new handle and opens a connection to the kernel sequencer -- interface. After a client is created successfully, a -- ClientStart event is broadcast to the announce port. May -- throw an exception. See also: open_lconf, close, -- get_seq_type, get_seq_name, set_blocking, -- get_client_id. open :: OpenMode mode => String -> BlockMode -> IO (T mode) openDefault :: OpenMode mode => BlockMode -> IO (T mode) -- | Close the sequencer. Closes the sequencer client and releases its -- resources. After a client is closed, an event with ClientExit -- is broadcast to announce port. The connection between other clients -- are disconnected. Call this just before exiting your program. NOTE: we -- could put this in a finalizer for the handle? close :: T mode -> IO () with :: OpenMode mode => String -> BlockMode -> (T mode -> IO a) -> IO a withDefault :: OpenMode mode => BlockMode -> (T mode -> IO a) -> IO a -- | This is the name that should be passed to open in most cases. defaultName :: String -- | Get identifier of a sequencer handle. It is the same identifier -- specified in the call to open. getName :: T mode -> IO String -- | Change the blocking mode of the given client. In block mode, the -- client falls into sleep when it fills the output pool with events, or -- when it demands events from an empty input pool. memory pool with full -- events. Clients that are sleeping due to loack of space in the output -- pool are woken when a certain amount of free space becomes available -- (see set_output_room). setBlocking :: T mode -> BlockMode -> IO () -- | Return the byte size of the output buffer. getOutputBufferSize :: T mode -> IO Word -- | Resize of the output buffer. This function clears all output events -- (see drop_output). setOutputBufferSize :: T mode -> Word -> IO () -- | Return the byte size of input buffer. getInputBufferSize :: T mode -> IO Word -- | Resize the input buffer. This function clears all input events (see -- drop_input). setInputBufferSize :: T mode -> Word -> IO () -- | Resize the output memory pool. setPoolOutput :: T mode -> Word -> IO () -- | Specify how much space should become free before waking clients that -- are blocked due to a lack of space in the output pool. setPoolOutputRoom :: T mode -> Word -> IO () -- | Reset the output pool. resetPoolOutput :: T mode -> IO () -- | Resize the input memory pool. setPoolInput :: T mode -> Word -> IO () -- | Reset the input pool. resetPoolInput :: T mode -> IO () module Sound.ALSA.Sequencer.RealTime data T Cons :: !Word32 -> !Word32 -> T [secs] :: T -> !Word32 [nano] :: T -> !Word32 -- | Convert fractional number of seconds to T Time must be -- non-negative. fromDouble :: Double -> T fromFractional :: RealFrac a => a -> T -- | Convert number of nanoseconds to T fromInteger :: Integer -> T -- | Convert fractional number of seconds to T toDouble :: T -> Double toFractional :: RealFrac a => T -> a -- | Convert number of nanoseconds to T toInteger :: T -> Integer module Sound.ALSA.Sequencer.Time data T Cons :: Mode -> Stamp -> T [mode] :: T -> Mode [stamp] :: T -> Stamp consAbs :: Stamp -> T consRel :: Stamp -> T data Mode Absolute :: Mode Relative :: Mode data Stamp Tick :: !Tick -> Stamp Real :: !T -> Stamp -- | This module contains functions for working with sequencer queue. -- Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_queue.html module Sound.ALSA.Sequencer.Queue.Timer data T get :: T mode -> T -> IO T set :: T mode -> T -> T -> IO () copy :: T -> T -> IO () -- | Copy the content of an object to a newly created object. clone :: T -> IO T getQueue :: T -> IO T getType :: T -> IO Type getResolution :: T -> IO Word setType :: T -> Type -> IO () setResolution :: T -> Word -> IO () data Type Alsa :: Type MidiClock :: Type MidiTick :: Type instance GHC.Enum.Enum Sound.ALSA.Sequencer.Queue.Timer.Type instance GHC.Classes.Ord Sound.ALSA.Sequencer.Queue.Timer.Type instance GHC.Classes.Eq Sound.ALSA.Sequencer.Queue.Timer.Type instance GHC.Show.Show Sound.ALSA.Sequencer.Queue.Timer.Type instance Sound.ALSA.Sequencer.Area.C Sound.ALSA.Sequencer.Queue.Timer.T -- | This module contains functions for working with sequencer queue. -- Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_queue.html module Sound.ALSA.Sequencer.Queue.Tempo data T get :: T mode -> T -> IO T set :: T mode -> T -> T -> IO () copy :: T -> T -> IO () -- | Copy the content of an object to a newly created object. clone :: T -> IO T getQueue :: T -> IO T getTempo :: T -> IO Word getPPQ :: T -> IO Int getSkew :: T -> IO Word getSkewBase :: T -> IO Word -- | Copy the content of one object into another. setTempo :: T -> Word -> IO () setPPQ :: T -> Int -> IO () setSkew :: T -> Word -> IO () setSkewBase :: T -> Word -> IO () instance Sound.ALSA.Sequencer.Area.C Sound.ALSA.Sequencer.Queue.Tempo.T -- | This module contains functions for working with sequencer queue. -- Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_queue.html module Sound.ALSA.Sequencer.Queue.Status data T get :: T mode -> T -> IO T -- | Copy the content of one object into another. copy :: T -> T -> IO () -- | Copy the content of an object to a newly created object. clone :: T -> IO T getQueue :: T -> IO T getEvents :: T -> IO Int -- | Allocate an uninitialized object. (Not exported) getTickTime :: T -> IO Tick getRealTime :: T -> IO T instance Sound.ALSA.Sequencer.Area.C Sound.ALSA.Sequencer.Queue.Status.T -- | This module contains functions for working with sequencer queue. -- Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_queue.html module Sound.ALSA.Sequencer.Queue.Info data T get :: T mode -> T -> IO T set :: T mode -> T -> T -> IO () copy :: T -> T -> IO () -- | Copy the content of an object to a newly created object. clone :: T -> IO T getQueue :: T -> IO T getName :: T -> IO String getLocked :: T -> IO Bool getOwner :: T -> IO T getFlags :: T -> IO Word setName :: T -> String -> IO () setLocked :: T -> Bool -> IO () setOwner :: T -> T -> IO () setFlags :: T -> Word -> IO () instance Sound.ALSA.Sequencer.Area.C Sound.ALSA.Sequencer.Queue.Info.T module Sound.ALSA.Sequencer.Client.InfoMonad data T a run :: T a -> T -> IO a get :: T mode -> T a -> IO a modify :: T mode -> T a -> IO a getClient :: T T getType :: T Type getName :: T String getBroadcastFilter :: T Bool getErrorBounce :: T Bool getNumPorts :: T Word getEventLost :: T Word setClient :: T -> T () setName :: String -> T () setBroadcastFilter :: Bool -> T () setErrorBounce :: Bool -> T () instance GHC.Base.Monad Sound.ALSA.Sequencer.Client.InfoMonad.T instance GHC.Base.Applicative Sound.ALSA.Sequencer.Client.InfoMonad.T instance GHC.Base.Functor Sound.ALSA.Sequencer.Client.InfoMonad.T -- | This module contains functions for working with sequencer clients. -- Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_client.html module Sound.ALSA.Sequencer.Client -- | The type of client identifiers. newtype T Cons :: Word8 -> T unknown :: T system :: T subscribers :: T broadcast :: T -- | Get the client identifier for the sequencer. A convinience function. getId :: T mode -> IO T -- | Set the name for the sequencer client. A convinience function. setName :: T mode -> String -> IO () -- | The different types of clients. data Type User :: Type Kernel :: Type -- | This module contains functions for working with subscriptions. -- Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_subscribe.html module Sound.ALSA.Sequencer.Subscribe.Query data T data Type Read :: Type Write :: Type malloc :: IO T copy :: T -> T -> IO () clone :: T -> IO T getClient :: T -> IO T getPort :: T -> IO T -- | Set the client/port address of a query getRoot :: T -> IO T getType :: T -> IO Type getIndex :: T -> IO Word getNumSubs :: T -> IO Word getAddr :: T -> IO T getQueue :: T -> IO T getExclusive :: T -> IO Bool getTimeUpdate :: T -> IO Bool getTimeReal :: T -> IO Bool setClient :: T -> T -> IO () setPort :: T -> T -> IO () setType :: T -> Type -> IO () setIndex :: T -> Word -> IO () -- | Queries a subscriber connected to (Write) or from (Read) a given -- address: query seq addr typ index query :: T mode -> T -> Type -> Word -> IO (Maybe T) -- | Queries the list of subscribers accessing a port queryAll :: T mode -> T -> Type -> IO [T] instance GHC.Enum.Enum Sound.ALSA.Sequencer.Subscribe.Query.Type instance GHC.Classes.Ord Sound.ALSA.Sequencer.Subscribe.Query.Type instance GHC.Classes.Eq Sound.ALSA.Sequencer.Subscribe.Query.Type instance GHC.Show.Show Sound.ALSA.Sequencer.Subscribe.Query.Type instance Sound.ALSA.Sequencer.Area.C Sound.ALSA.Sequencer.Subscribe.Query.T -- | This module contains functions for working with subscriptions. -- Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_subscribe.html module Sound.ALSA.Sequencer.Subscribe data T malloc :: IO T copy :: T -> T -> IO () -- | Copy the content of an object to a newly created object. clone :: T -> IO T getSender :: T -> IO T getDest :: T -> IO T getQueue :: T -> IO T getExclusive :: T -> IO Bool -- | Allocate an uninitialized object. (Not exported) getTimeUpdate :: T -> IO Bool getTimeReal :: T -> IO Bool setSender :: T -> T -> IO () setDest :: T -> T -> IO () setQueue :: T -> T -> IO () setExclusive :: T -> Bool -> IO () setTimeUpdate :: T -> Bool -> IO () setTimeReal :: T -> Bool -> IO () -- | Subscribe a port connection subscribePort :: T mode -> T -> IO () unsubscribePort :: T mode -> T -> IO () create :: T -> T -> Bool -> Maybe (T, Bool) -> IO T -- | Subscribe a port connection: subscribeSimple sender dest -- exclusive (Just (updatequeue, realtime)) subscribe :: T mode -> T -> T -> Bool -> Maybe (T, Bool) -> IO () -- | Unsubscribe a port connection: unsubscribeSimple sender -- dest unsubscribe :: T mode -> T -> T -> IO () instance Sound.ALSA.Sequencer.Area.C Sound.ALSA.Sequencer.Subscribe.T -- | This module contains functions for working with ports. Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_port.html module Sound.ALSA.Sequencer.Port.InfoMonad data T a run :: T a -> T -> IO a get :: T mode -> T -> T a -> IO a modify :: T mode -> T -> T a -> IO a getPort :: T T getClient :: T T getAddr :: T T getName :: T String getCapability :: T Cap getMidiChannels :: T Word getMidiVoices :: T Word getSynthVoices :: T Word getPortSpecified :: T Bool getTimestamping :: T Bool getTimestampReal :: T Bool getTimestampQueue :: T T getReadUse :: T Word getWriteUse :: T Word setPort :: T -> T () setClient :: T -> T () setAddr :: T -> T () setName :: String -> T () setCapability :: Cap -> T () setMidiChannels :: Word -> T () setSynthVoices :: Word -> T () setMidiVoices :: Word -> T () setPortSpecified :: Bool -> T () setTimestamping :: Bool -> T () setTimestampReal :: Bool -> T () setTimestampQueue :: T -> T () instance GHC.Base.Monad Sound.ALSA.Sequencer.Port.InfoMonad.T instance GHC.Base.Applicative Sound.ALSA.Sequencer.Port.InfoMonad.T instance GHC.Base.Functor Sound.ALSA.Sequencer.Port.InfoMonad.T -- | This module contains functions for working with ports. Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_port.html module Sound.ALSA.Sequencer.Port.Info data T -- | Set the information for the sequencer port based on the data in the -- given information area. get :: T mode -> T -> IO T getAny :: T mode -> T -> T -> IO T -- | Get information about the first port on our client. queryFirst :: T mode -> IO T -- | Get information about the port with the next biggest identifier. If a -- matching port is found, then its information is stored in the given -- area and True is returned. queryNext :: T mode -> T -> IO Bool queryLoop_ :: T mode -> T -> (T -> IO ()) -> IO () queryLoop :: T mode -> T -> (T -> IO a) -> IO [a] set :: T mode -> T -> T -> IO () copy :: T -> T -> IO () clone :: T -> IO T getPort :: T -> IO T getClient :: T -> IO T getAddr :: T -> IO T getName :: T -> IO String getCapability :: T -> IO Cap getMidiChannels :: T -> IO Word getMidiVoices :: T -> IO Word -- | Copy the content of an object to a newly created object. getSynthVoices :: T -> IO Word getPortSpecified :: T -> IO Bool -- | Copy the content of one object into another. getTimestamping :: T -> IO Bool getTimestampReal :: T -> IO Bool getTimestampQueue :: T -> IO T getReadUse :: T -> IO Word getWriteUse :: T -> IO Word setPort :: T -> T -> IO () setClient :: T -> T -> IO () setAddr :: T -> T -> IO () setName :: T -> String -> IO () setCapability :: T -> Cap -> IO () setMidiChannels :: T -> Word -> IO () setSynthVoices :: T -> Word -> IO () setMidiVoices :: T -> Word -> IO () setPortSpecified :: T -> Bool -> IO () setTimestamping :: T -> Bool -> IO () setTimestampReal :: T -> Bool -> IO () -- | Set the port address. setTimestampQueue :: T -> T -> IO () -- | This module contains functions for working with ports. Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_port.html module Sound.ALSA.Sequencer.Port newtype T Cons :: Word8 -> T -- | Create a new port, as described by the info structure. create :: T mode -> T -> IO () -- | Create a port - simple version. createSimple :: T mode -> String -> Cap -> Type -> IO T -- | Delete the port. delete :: T mode -> T -> IO () -- | Delete the port. deleteSimple :: T mode -> T -> IO () withSimple :: T mode -> String -> Cap -> Type -> (T -> IO a) -> IO a systemTimer :: T systemAnnounce :: T unknown :: T -- | Port capabilities. type Cap = T CUInt CapabilityFlag capRead :: Cap capWrite :: Cap capSyncRead :: Cap capSyncWrite :: Cap capDuplex :: Cap capSubsRead :: Cap capSubsWrite :: Cap capNoExport :: Cap caps :: [Cap] -> Cap -- | Port types. type Type = T CUInt TypeFlag typeSpecific :: Type typeMidiGeneric :: Type typeMidiGM :: Type typeMidiGS :: Type typeMidiXG :: Type typeMidiMT32 :: Type typeMidiGM2 :: Type typeSynth :: Type typeDirectSample :: Type typeSample :: Type typeHardware :: Type typeSoftware :: Type typeSynthesizer :: Type typePort :: Type typeApplication :: Type types :: [Type] -> Type -- | This module contains functions for working with sequencer queue. -- Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_queue.html module Sound.ALSA.Sequencer.Queue -- | The type of queue identifiers. data T direct :: T alloc :: T mode -> IO T allocNamed :: T mode -> String -> IO T -- | Delete the specified queue. free :: T mode -> T -> IO () with :: T mode -> (T -> IO a) -> IO a withNamed :: T mode -> String -> (T -> IO a) -> IO a -- | startstopcontinue a queue -- -- In the prototype event you can provide additional information. The -- prototype event does not need to be a queue control event, this part -- is ignored anyway. In the prototype event you may also specify a -- queue. This is the queue that the timestamp of the prototype event -- refers to. This way you can control the target queue using timing from -- another queue. control :: T mode -> T -> QueueEv -> Maybe T -> IO () -- | This module contains functions for working with sequencer clients. -- Reference: -- http://www.alsa-project.org/alsa-doc/alsa-lib/group___seq_client.html module Sound.ALSA.Sequencer.Client.Info data T get :: T mode -> IO T -- | Copy the content of an object to a newly created object. -- -- Create a new information area filled with data about an arbitrary -- client. getAny :: T mode -> T -> IO T queryFirst :: T mode -> IO T -- | Get information about the client with the next biggest identifier. queryNext :: T mode -> T -> IO Bool queryLoop_ :: T mode -> (T -> IO ()) -> IO () queryLoop :: T mode -> (T -> IO a) -> IO [a] -- | Set the information for the sequencer client based on the data in the -- given information area. set :: T mode -> T -> IO () -- | Create a new information area filled with data about the sequencer -- client. copy :: T -> T -> IO () clone :: T -> IO T getClient :: T -> IO T getType :: T -> IO Type getName :: T -> IO String getBroadcastFilter :: T -> IO Bool -- | Allocate an uninitialized object. (Not exported) getErrorBounce :: T -> IO Bool getNumPorts :: T -> IO Word getEventLost :: T -> IO Word setClient :: T -> T -> IO () setName :: T -> String -> IO () setBroadcastFilter :: T -> Bool -> IO () setErrorBounce :: T -> Bool -> IO () filterClear :: T -> IO () filterAdd :: Type e => T -> e -> IO () filterDel :: Type e => T -> e -> IO () filterCheck :: Type e => T -> e -> IO Bool -- | This module allows to cancel events according to some criteria. In all -- cases other than setInput and setOutput the criteria are -- combined by logical AND. For every criterion we provide three kinds of -- accessors: -- --
-- (Event.simple myAddr (Event.simpleNote (Event.Channel 0) (Event.Pitch 60) Event.normalVelocity)) {Event.dest = destAddr}
--
simple :: T -> Data -> T
forSourcePort :: T -> Data -> T
forConnection :: T -> Data -> T
data Data
NoteEv :: NoteEv -> Note -> Data
CtrlEv :: CtrlEv -> Ctrl -> Data
QueueEv :: QueueEv -> T -> Data
AddrEv :: AddrEv -> T -> Data
ConnEv :: ConnEv -> T -> Data
EmptyEv :: EmptyEv -> Data
CustomEv :: CustomEv -> Custom -> Data
ExtEv :: ExtEv -> ByteString -> Data
class Type e
data NoteEv
ANote :: NoteEv
NoteOn :: NoteEv
NoteOff :: NoteEv
KeyPress :: NoteEv
data Note
Note :: !Channel -> !Pitch -> !Velocity -> !Velocity -> !Duration -> Note
[noteChannel] :: Note -> !Channel
[noteNote] :: Note -> !Pitch
[noteVelocity] :: Note -> !Velocity
[noteOffVelocity] :: Note -> !Velocity
[noteDuration] :: Note -> !Duration
-- | Make a note whose unspecified fields contain 0.
simpleNote :: Channel -> Pitch -> Velocity -> Note
data CtrlEv
Controller :: CtrlEv
PgmChange :: CtrlEv
ChanPress :: CtrlEv
PitchBend :: CtrlEv
Control14 :: CtrlEv
NonRegParam :: CtrlEv
RegParam :: CtrlEv
SongPos :: CtrlEv
SongSel :: CtrlEv
QFrame :: CtrlEv
TimeSign :: CtrlEv
KeySign :: CtrlEv
data Ctrl
Ctrl :: !Channel -> !Parameter -> !Value -> Ctrl
[ctrlChannel] :: Ctrl -> !Channel
[ctrlParam] :: Ctrl -> !Parameter
[ctrlValue] :: Ctrl -> !Value
data CustomEv
Echo :: CustomEv
OSS :: CustomEv
User0 :: CustomEv
User1 :: CustomEv
User2 :: CustomEv
User3 :: CustomEv
User4 :: CustomEv
User5 :: CustomEv
User6 :: CustomEv
User7 :: CustomEv
User8 :: CustomEv
User9 :: CustomEv
data Custom
Custom :: !Word32 -> Custom
[custom0, custom1, custom2] :: Custom -> !Word32
customZero :: Custom
data ExtEv
SysEx :: ExtEv
Bounce :: ExtEv
UserVar0 :: ExtEv
UserVar1 :: ExtEv
UserVar2 :: ExtEv
UserVar3 :: ExtEv
UserVar4 :: ExtEv
data QueueEv
QueueStart :: QueueEv
QueueContinue :: QueueEv
QueueStop :: QueueEv
QueueSetPosTick :: !Tick -> QueueEv
QueueSetPosTime :: !T -> QueueEv
QueueTempo :: !Tempo -> QueueEv
QueueClock :: QueueEv
QueueTick :: QueueEv
QueueSkew :: !Skew -> QueueEv
QueueSyncPos :: !Position -> QueueEv
data AddrEv
ClientStart :: AddrEv
ClientExit :: AddrEv
ClientChange :: AddrEv
PortStart :: AddrEv
PortExit :: AddrEv
PortChange :: AddrEv
data ConnEv
PortSubscribed :: ConnEv
PortUnsubscribed :: ConnEv
data EmptyEv
TuneRequest :: EmptyEv
Reset :: EmptyEv
Sensing :: EmptyEv
None :: EmptyEv
Unknown :: EmptyEv
newtype Tag
Tag :: Word8 -> Tag
[unTag] :: Tag -> Word8
newtype Tempo
Tempo :: Int32 -> Tempo
[unTempo] :: Tempo -> Int32
newtype Parameter
Parameter :: Word32 -> Parameter
[unParameter] :: Parameter -> Word32
newtype Value
Value :: Int32 -> Value
[unValue] :: Value -> Int32
newtype Channel
Channel :: Word8 -> Channel
[unChannel] :: Channel -> Word8
newtype Pitch
Pitch :: Word8 -> Pitch
[unPitch] :: Pitch -> Word8
newtype Velocity
Velocity :: Word8 -> Velocity
[unVelocity] :: Velocity -> Word8
normalVelocity :: Velocity
offVelocity :: Velocity
newtype Duration
Duration :: Word32 -> Duration
[unDuration] :: Duration -> Word32
module Sound.ALSA.Sequencer.Concurrent
-- | Wait for new input to be available from the sequencer (even if there
-- is already input in the buffer)
threadWaitInput :: AllowInput mode => T mode -> IO ()
-- | Wait until new output may be drained from the buffer to the sequencer
-- (even if the output buffer is already empty)
threadWaitOutput :: AllowOutput mode => T mode -> IO ()
-- | Wait until new input is available or new output may be drained
threadWaitDuplex :: (AllowInput mode, AllowOutput mode) => T mode -> IO ()
-- | A thread-compatible version of
-- Sound.ALSA.Sequencer.Event.input. This call is always
-- blocking (unless there are already event in the input buffer) but will
-- not block other threads. The sequencer, however, must be set
-- non-blocking or this will not work as expected.
input :: AllowInput mode => T mode -> IO T
-- | A thread-compatible version of
-- Sound.ALSA.Sequencer.Event.output. This call is always
-- blocking (unless there is space in the output buffer) but will not
-- block other threads. The sequencer, however, must be set non-blocking
-- or this will not work as expected.
output :: AllowOutput mode => T mode -> T -> IO Word
-- | A thread-compatible version of
-- Sound.ALSA.Sequencer.Event.drainBuffer. This call is always
-- blocking but will not block other threads. The sequencer, however,
-- must be set non-blocking or this will not work as expected.
drainOutput :: AllowOutput mode => T mode -> IO ()