synthesizer-alsa-0.5.0.5: Control synthesizer effects via ALSA/MIDI

Safe HaskellNone
LanguageHaskell98

Synthesizer.ALSA.EventList

Synopsis

Documentation

getTimeSeconds :: C time => IO time Source

The time type needs high precision, so you will certainly have to instantiate it with Double. Float has definitely not enough bits.

wait :: C time => time -> IO () 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.

addStamp :: C time => T -> StampedEvent time Source

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

newtype ClientName Source

Constructors

ClientName String 

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

setTimestamping :: T mode -> T -> T -> IO () 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

makeEcho :: C time => T -> T -> T -> time -> Custom -> T Source

withMIDIEventsBlock :: C time => ClientName -> time -> (T StrictTime T -> IO a) -> IO a 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