| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Sound.Tidal.MIDI.Control
Description
Mappings between Tidal's Params and MIDI control changes
- n_p :: Param
- type RangeMapFunc = (Int, Int) -> Double -> Int
- type MIDINoteShape = ParamMap
- data ControlChange
- data ControllerShape = ControllerShape {
- controls :: [ControlChange]
- latency :: Double
- midiShape :: Shape
- computeTiming :: Tempo -> Ratio Integer -> MIDINoteShape -> ((Int, Int, Ratio Integer), Double)
- toShape :: ControllerShape -> Shape
- passThru :: (Int, Int) -> Double -> Int
- mapRange :: (Int, Int) -> Double -> Int
- mCC :: Param -> Int -> ControlChange
- mNRPN :: Param -> Int -> ControlChange
- mrNRPN :: Param -> Int -> (Int, Int) -> ControlChange
- toParams :: ControllerShape -> [Param]
- ctrlN :: Num b => ControllerShape -> Param -> Maybe b
- paramN :: ControllerShape -> Param -> Maybe ControlChange
Documentation
type MIDINoteShape = ParamMap Source #
Make sure you apply cutShape midiShape to an ParamMap
before passing it into a function wanting this type
data ControllerShape Source #
A definition for using a Tidal with specific MIDI device type.
By default, every ControllerShape accepts the following Params:
which will define the MIDI note to be played.
Constructors
| ControllerShape | |
Fields
| |
Arguments
| :: Tempo | the current playback speed |
| -> Ratio Integer | if |
| -> MIDINoteShape | A map of |
| -> ((Int, Int, Ratio Integer), Double) | A tuple of a |
Turns a MIDINoteShape into concrete values for scheduling.
toShape :: ControllerShape -> Shape Source #
Converts a ControllerShapes controls into Params and makes a Shape
This acts as an interface between Tidal's scheduling loop and MIDI scheduling.
passThru :: (Int, Int) -> Double -> Int Source #
A RangeMapFunc that simply passes floors Doubles.
This can be used if a MIDI parameter of a device has different meanings for each value, e.g. the type of oscillator has to be specified by either "0", "1", "2" or "3" each representing a different waveform (sine, tri, square, rand)
mapRange :: (Int, Int) -> Double -> Int Source #
Default mapping function from Double to Int.
>>>mapRange (0, 127) 0.563
mCC :: Param -> Int -> ControlChange Source #
Helper function for creating a standard ControlChange for MIDI parameter
mNRPN :: Param -> Int -> ControlChange Source #
Helper function for creating a standard ControlChange for a non-registered MIDI parameter
mrNRPN :: Param -> Int -> (Int, Int) -> ControlChange Source #
Helper function for creating a ControlChange for a non-registered MIDI parameter with a custom range
toParams :: ControllerShape -> [Param] Source #
Translate a ControllerShapes controls into a list of Param
ctrlN :: Num b => ControllerShape -> Param -> Maybe b Source #
Translate a Tidal Param into the corresponding MIDI parameter number
according to a specific ControllerShape
paramN :: ControllerShape -> Param -> Maybe ControlChange Source #
Find the first ControlChange that uses Param