{-# LANGUAGE CPP #-}
module System.MIDI
( module System.MIDI.Base
, Source
, Destination
, Connection
, enumerateSources
, enumerateDestinations
, S.MIDIHasName
, getName
, getModel
, getManufacturer
, openSource
, openDestination
, start
, stop
, close
, send
, sendSysEx
, getNextEvent
, checkNextEvent
, getEvents
, getEventsUntil
, currentTime
#ifdef darwin_HOST_OS
, createDestination
, createSource
, disposeConnection
#endif
)
where
import Data.Word (Word8,Word32)
import System.MIDI.Base
#ifdef mingw32_HOST_OS
import qualified System.MIDI.Win32 as S
#define HMIDI_SUPPORTED_OS
#endif
#ifdef darwin_HOST_OS
import qualified System.MIDI.MacOSX as S
#define HMIDI_SUPPORTED_OS
#endif
#ifndef HMIDI_SUPPORTED_OS
import qualified System.MIDI.Placeholder as S
#endif
type Source = S.Source
type Destination = S.Destination
type Connection = S.Connection
enumerateSources :: IO [Source]
enumerateSources :: IO [Source]
enumerateSources = IO [Source]
S.enumerateSources
enumerateDestinations :: IO [Destination]
enumerateDestinations :: IO [Destination]
enumerateDestinations = IO [Destination]
S.enumerateDestinations
getName :: S.MIDIHasName a => a -> IO String
getModel :: S.MIDIHasName a => a -> IO String
getManufacturer :: S.MIDIHasName a => a -> IO String
getName :: a -> IO String
getName = a -> IO String
forall a. MIDIHasName a => a -> IO String
S.getName
getModel :: a -> IO String
getModel = a -> IO String
forall a. MIDIHasName a => a -> IO String
S.getModel
getManufacturer :: a -> IO String
getManufacturer = a -> IO String
forall a. MIDIHasName a => a -> IO String
S.getManufacturer
openSource :: Source -> Maybe ClientCallback -> IO Connection
openSource :: Source -> Maybe ClientCallback -> IO Connection
openSource = Source -> Maybe ClientCallback -> IO Connection
S.openSource
openDestination :: Destination -> IO Connection
openDestination :: Destination -> IO Connection
openDestination = Destination -> IO Connection
S.openDestination
getNextEvent :: Connection -> IO (Maybe MidiEvent)
getNextEvent :: Connection -> IO (Maybe MidiEvent)
getNextEvent = Connection -> IO (Maybe MidiEvent)
S.getNextEvent
checkNextEvent :: Connection -> IO (Maybe MidiEvent)
checkNextEvent :: Connection -> IO (Maybe MidiEvent)
checkNextEvent = Connection -> IO (Maybe MidiEvent)
S.checkNextEvent
getEventsUntil :: Connection -> TimeStamp -> IO [MidiEvent]
getEventsUntil :: Connection -> TimeStamp -> IO [MidiEvent]
getEventsUntil = Connection -> TimeStamp -> IO [MidiEvent]
S.getEventsUntil
getEvents :: Connection -> IO [MidiEvent]
getEvents :: Connection -> IO [MidiEvent]
getEvents = Connection -> IO [MidiEvent]
S.getEvents
send :: Connection -> MidiMessage -> IO ()
send :: Connection -> MidiMessage -> IO ()
send = Connection -> MidiMessage -> IO ()
S.send
sendSysEx :: Connection -> [Word8] -> IO ()
sendSysEx :: Connection -> [Word8] -> IO ()
sendSysEx = Connection -> [Word8] -> IO ()
S.sendSysEx
start :: Connection -> IO ()
start :: Connection -> IO ()
start = Connection -> IO ()
S.start
stop :: Connection -> IO ()
stop :: Connection -> IO ()
stop = Connection -> IO ()
S.stop
close :: Connection -> IO ()
close :: Connection -> IO ()
close = Connection -> IO ()
S.close
currentTime :: Connection -> IO Word32
currentTime :: Connection -> IO TimeStamp
currentTime = Connection -> IO TimeStamp
S.currentTime
#ifdef darwin_HOST_OS
createDestination :: String -> Maybe ClientCallback -> IO Connection
createDestination = S.createDestination
createSource :: String -> IO Connection
createSource = S.createSource
disposeConnection :: Connection -> IO ()
disposeConnection = S.disposeConnection
#endif