| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Sound.Tidal.MIDI.Stream
Description
Entry functions for interacting with MIDI devices through Tidal.
- midiStream :: MVar MidiDeviceMap -> String -> Int -> ControllerShape -> IO (ParamPattern -> IO ())
- midiBackend :: MVar MidiDeviceMap -> String -> Int -> ControllerShape -> IO (Backend a)
- midiState :: MVar MidiDeviceMap -> String -> Int -> ControllerShape -> IO (MVar (ParamPattern, [ParamPattern]))
- midiSetters :: MVar MidiDeviceMap -> String -> Int -> ControllerShape -> IO Time -> IO (ParamPattern -> IO (), (Time -> [ParamPattern] -> ParamPattern) -> ParamPattern -> IO ())
- midiDevices :: IO (MVar MidiDeviceMap)
- displayOutputDevices :: IO String
Documentation
midiStream :: MVar MidiDeviceMap -> String -> Int -> ControllerShape -> IO (ParamPattern -> IO ()) Source #
Creates a single virtual stream to a MIDI device using a specific ControllerShape
Needs a MidiDeviceMap to operate, create one using midiDevices!
midiBackend :: MVar MidiDeviceMap -> String -> Int -> ControllerShape -> IO (Backend a) Source #
Opens a connection to a MIDI device and wraps it in a Backend implementation.
Needs a MidiDeviceMap to operate, create one using midiDevices!
midiState :: MVar MidiDeviceMap -> String -> Int -> ControllerShape -> IO (MVar (ParamPattern, [ParamPattern])) Source #
Creates a single virtual state for a MIDI device using a specific ControllerShape
This state can be used to either create a setter or a transition from it.
Needs a MidiDeviceMap to operate, create one using midiDevices!
Arguments
| :: MVar MidiDeviceMap | A list of MIDI output devices |
| -> String | The name of the output device to connect |
| -> Int | The MIDI Channel to use |
| -> ControllerShape | The definition of params to be usable |
| -> IO Time | a method to get the current time |
| -> IO (ParamPattern -> IO (), (Time -> [ParamPattern] -> ParamPattern) -> ParamPattern -> IO ()) |
Connect to a MIDI device with a given name and channel,
using a ControllerShape to allow customized interaction
with specific MIDI synths.
Needs a MidiDeviceMap to operate, create on using midiDevices!
Usage:
(m1, mt1) <- midiSetters devices "My Synth Controller Device name" 1 synthController getNow
To find the correct name for your device see displayOutputDevices
midiDevices :: IO (MVar MidiDeviceMap) Source #
Create a handle for all currently used Outputs indexed by their device name.
We use this to cache once opened devices.
This will be passed to _every_ initialization of a virtual stream to a MIDI device
and is necessary since, PortMidi only allows a single connection to a device.
displayOutputDevices :: IO String Source #
Example usage:
>>>putStrLn =<< displayOutputDevicesID: Name 0: Midi Through Port-0 2: DSI Tetra MIDI 1