Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data RawEvent
- rawEvent :: NFrames -> ByteString -> RawEvent
- rawEventTime :: RawEvent -> NFrames
- rawEventBuffer :: RawEvent -> ByteString
- toRawEventFunction :: (NFrames -> (NFrames, T) -> IO (NFrames, T)) -> NFrames -> RawEvent -> IO RawEvent
- type Port = Port EventBuffer
- withPort :: (Direction dir, ThrowsPortRegister e, ThrowsErrno e) => Client -> String -> (Port dir -> ExceptionalT e IO a) -> ExceptionalT e IO a
- withProcess :: ThrowsErrno e => Client -> Port Input -> (NFrames -> RawEvent -> IO RawEvent) -> Port Output -> ExceptionalT e IO a -> ExceptionalT e IO a
- data Buffer dir
- getBuffer :: Direction dir => Port dir -> NFrames -> IO (Buffer dir)
- clearBuffer :: Buffer Output -> IO ()
- readRawEvents :: ThrowsErrno e => Buffer Input -> ExceptionalT e IO [RawEvent]
- writeRawEvent :: ThrowsErrno e => Buffer Output -> RawEvent -> ExceptionalT e IO ()
- readRawEventsFromPort :: ThrowsErrno e => Port Input -> NFrames -> ExceptionalT e IO [RawEvent]
- writeRawEventsToPort :: ThrowsErrno e => Port Output -> NFrames -> [RawEvent] -> ExceptionalT e IO ()
- writeEvent :: ThrowsErrno e => Buffer Output -> NFrames -> T -> ExceptionalT e IO ()
- readEventsFromPort :: ThrowsErrno e => Port Input -> NFrames -> ExceptionalT e IO (T NFrames T)
- writeEventsToPort :: ThrowsErrno e => Port Output -> NFrames -> T NFrames T -> ExceptionalT e IO ()
- main :: (NFrames -> (NFrames, T) -> IO (NFrames, T)) -> IO ()
- mainRaw :: (NFrames -> RawEvent -> IO RawEvent) -> IO ()
Documentation
Represents a raw JACK MIDI event
Instances
Eq RawEvent Source # | |
Ord RawEvent Source # | |
Defined in Sound.JACK.FFI.MIDI | |
Show RawEvent Source # | |
Storable RawEvent Source # | |
Defined in Sound.JACK.FFI.MIDI |
:: NFrames | Sample index at which event is valid (relative to cycle start) |
-> ByteString | Raw MIDI data |
-> RawEvent |
Smart constructor for a raw MIDI event.
rawEventTime :: RawEvent -> NFrames Source #
rawEventBuffer :: RawEvent -> ByteString Source #
:: (NFrames -> (NFrames, T) -> IO (NFrames, T)) | transforms Sound.MIDI.File.Event |
-> NFrames -> RawEvent -> IO RawEvent | transforms Sound.JACK.MIDI.RawEvent |
Converts high level MIDI Event transformation functions into raw MIDI Event transformation functions
:: (Direction dir, ThrowsPortRegister e, ThrowsErrno e) | |
=> Client | Jack client |
-> String | name of the input port |
-> (Port dir -> ExceptionalT e IO a) | |
-> ExceptionalT e IO a |
:: ThrowsErrno e | |
=> Client | the JACK Client, whose process loop will be set |
-> Port Input | where to get events from |
-> (NFrames -> RawEvent -> IO RawEvent) | transforms input to output events |
-> Port Output | where to put events |
-> ExceptionalT e IO a | |
-> ExceptionalT e IO a | exception causing JACK to remove that client from the process() graph. |
sets the process loop of the JACK Client
:: ThrowsErrno e | |
=> Buffer Input | the PortBuffer to read from |
-> ExceptionalT e IO [RawEvent] |
reads all available MIDI Events on the given PortBuffer
:: ThrowsErrno e | |
=> Buffer Output | the PortBuffer of the MIDI output to write to |
-> RawEvent | the RawEvent to write |
-> ExceptionalT e IO () |
writes a MIDI event to the PortBuffer of a MIDI output or throws eNOBUFS if JackMIDI.buffer is full
readRawEventsFromPort :: ThrowsErrno e => Port Input -> NFrames -> ExceptionalT e IO [RawEvent] Source #
writeRawEventsToPort :: ThrowsErrno e => Port Output -> NFrames -> [RawEvent] -> ExceptionalT e IO () Source #
Clears an output buffer and writes a sequence of events to it. That is, you must only call this function once per callback.
writeEvent :: ThrowsErrno e => Buffer Output -> NFrames -> T -> ExceptionalT e IO () Source #
readEventsFromPort :: ThrowsErrno e => Port Input -> NFrames -> ExceptionalT e IO (T NFrames T) Source #
Reads midi events from an input buffer and converts them to a high-level representation. Messages are simply ignored if they cannot be parsed.
writeEventsToPort :: ThrowsErrno e => Port Output -> NFrames -> T NFrames T -> ExceptionalT e IO () Source #
Clears an output buffer and writes a sequence of events to it. That is, you must only call this function once per callback.
Creates an input and an output, and transforms all input events into output events using the given function