Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- getTimeSeconds :: C time => IO time
- clockTimeToSeconds :: C time => ClockTime -> time
- wait :: C time => time -> IO ()
- type StampedEvent time = (time, T)
- getStampedEvent :: (C time, AllowInput mode) => T mode -> IO (StampedEvent time)
- getWaitingStampedEvents :: (C time, AllowInput mode) => T mode -> IO [StampedEvent time]
- realTimeToField :: C a => T -> a
- addStamp :: C time => T -> StampedEvent time
- getStampedEventsUntilTime :: (C time, AllowInput mode, AllowOutput mode) => T mode -> T -> T -> time -> IO [StampedEvent time]
- getEventsUntilEcho :: AllowInput mode => T -> T mode -> IO [T]
- getEventsUntilTime :: (C time, AllowInput mode, AllowOutput mode) => T mode -> T -> T -> time -> IO [T]
- getWaitingEvents :: AllowInput mode => T mode -> IO [T]
- type StrictTime = Integer
- newtype ClientName = ClientName String
- withMIDIEvents :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO a
- withMIDIEventsNonblockWaitGrouped :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO a
- withMIDIEventsNonblockWaitDefer :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO a
- withMIDIEventsNonblockWaitSkip :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO a
- withMIDIEventsNonblockWaitMin :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO a
- withMIDIEventsNonblockConstantPause :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO a
- withMIDIEventsNonblockSimple :: C time => ClientName -> time -> time -> (T StrictTime T -> IO a) -> IO a
- setTimestamping :: T mode -> T -> T -> IO ()
- withMIDIEventsBlockEcho :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO a
- withMIDIEventsBlockEchoQuantised :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO a
- withMIDIEventsChunked :: C time => ClientName -> time -> time -> ([IO (T StrictTime [T])] -> IO a) -> IO a
- withMIDIEventsChunkedQuantised :: C time => ClientName -> time -> time -> ([IO (T StrictTime [T])] -> IO a) -> IO a
- makeEcho :: C time => T -> T -> T -> time -> Custom -> T
- withMIDIEventsBlock :: C time => ClientName -> time -> (T StrictTime T -> IO a) -> IO a
- withInPort :: ClientName -> BlockMode -> (T DuplexMode -> T -> IO t) -> IO t
- discretizeTime :: C time => time -> T time a -> T StrictTime a
- ioToLazyList :: IO a -> IO [a]
- lazySequence :: [IO a] -> IO [a]
Documentation
getTimeSeconds :: C time => IO time Source #
clockTimeToSeconds :: C time => ClockTime -> time Source #
type StampedEvent time = (time, T) Source #
getStampedEvent :: (C time, AllowInput mode) => T mode -> IO (StampedEvent time) Source #
only use it for non-blocking sequencers
We ignore ALSA time stamps and use the time of fetching the event, because I don't know whether the ALSA time stamps are in sync with getClockTime.
getWaitingStampedEvents :: (C time, AllowInput mode) => T mode -> IO [StampedEvent time] Source #
only use it for non-blocking sequencers
realTimeToField :: C a => T -> a Source #
RealTime.toFractional for NumericPrelude.
getStampedEventsUntilTime :: (C time, AllowInput mode, AllowOutput mode) => T mode -> T -> T -> time -> IO [StampedEvent time] Source #
only use it for blocking sequencers
getEventsUntilEcho :: AllowInput mode => T -> T mode -> IO [T] Source #
The client id may differ from the receiving sequencer. I do not know, whether there are circumstances, where this is useful.
getEventsUntilTime :: (C time, AllowInput mode, AllowOutput mode) => T mode -> T -> T -> time -> IO [T] Source #
Get events until a certain point in time. It sends itself an Echo event in order to measure time.
getWaitingEvents :: AllowInput mode => T mode -> IO [T] Source #
type StrictTime = Integer Source #
newtype ClientName Source #
Instances
Show ClientName Source # | |
Defined in Synthesizer.ALSA.EventList showsPrec :: Int -> ClientName -> ShowS # show :: ClientName -> String # showList :: [ClientName] -> ShowS # |
withMIDIEvents :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO a Source #
withMIDIEventsNonblockWaitGrouped :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO a Source #
withMIDIEventsNonblockWaitDefer :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO a Source #
withMIDIEventsNonblockWaitSkip :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO a Source #
withMIDIEventsNonblockWaitMin :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO a Source #
withMIDIEventsNonblockConstantPause :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO a Source #
withMIDIEventsNonblockSimple :: C time => ClientName -> time -> time -> (T StrictTime T -> IO a) -> IO a Source #
withMIDIEventsBlockEcho :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO a Source #
withMIDIEventsBlockEchoQuantised :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO a Source #
This is like withMIDIEventsBlockEcho but collects all events at the beginning of the beats. This way, further processing steps may collapse all controller events within one beat to one event.
withMIDIEventsChunked :: C time => ClientName -> time -> time -> ([IO (T StrictTime [T])] -> IO a) -> IO a Source #
Make sure, that beat
is an integer multiple of recip rate
.
Since we round time within each chunk,
we would otherwise accumulate rounding errors over time.
withMIDIEventsChunkedQuantised :: C time => ClientName -> time -> time -> ([IO (T StrictTime [T])] -> IO a) -> IO a Source #
withMIDIEventsBlock :: C time => ClientName -> time -> (T StrictTime T -> IO a) -> IO a Source #
withInPort :: ClientName -> BlockMode -> (T DuplexMode -> T -> IO t) -> IO t Source #
discretizeTime :: C time => time -> T time a -> T StrictTime a Source #
We first discretize the absolute time values, then we compute differences, in order to avoid rounding errors in further computations.
ioToLazyList :: IO a -> IO [a] Source #
lazySequence :: [IO a] -> IO [a] Source #