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

Safe HaskellNone

Synthesizer.ALSA.EventList

Synopsis

Documentation

getTimeSeconds :: C time => IO timeSource

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 -> aSource

RealTime.toFractional for NumericPrelude.

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

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 

Instances

withMIDIEvents :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO aSource

withMIDIEventsNonblockWaitGrouped :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO aSource

withMIDIEventsNonblockWaitDefer :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO aSource

withMIDIEventsNonblockWaitSkip :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO aSource

withMIDIEventsNonblockWaitMin :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO aSource

withMIDIEventsNonblockConstantPause :: C time => ClientName -> time -> time -> (T StrictTime (Maybe T) -> IO a) -> IO aSource

withMIDIEventsNonblockSimple :: C time => ClientName -> time -> time -> (T StrictTime T -> IO a) -> IO aSource

setTimestamping :: T mode -> T -> T -> IO ()Source

withMIDIEventsBlockEcho :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO aSource

withMIDIEventsBlockEchoQuantised :: C time => ClientName -> time -> time -> (T StrictTime [T] -> IO a) -> IO aSource

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 aSource

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 aSource

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

withMIDIEventsBlock :: C time => ClientName -> time -> (T StrictTime T -> IO a) -> IO aSource

discretizeTime :: C time => time -> T time a -> T StrictTime aSource

We first discretize the absolute time values, then we compute differences, in order to avoid rounding errors in further computations.

lazySequence :: [IO a] -> IO [a]Source