Hello everyone!
When I control visuals (Processing, Unreal Engine) with Tidal, using OSC, I create functions like these red = pF "red" green = pF "green" blue = pF "blue"
Is it possible to create functions with multiple arguments?, similar to "stut" $ stut 8 0.5 0.5
A function that calls it like this # rgb 0.5 1 0.25
This is an example of a DAW-style visualizer for Tidal courses:
import Data.Colour.SRGB
let red = pF "red"
green = pF "green"
blue = pF "blue"
rgb r g b = red r # green g # blue b
colour :: Pattern ColourD -> ControlPattern
colour pat = do (RGB r g b) <- toSRGB <$> pat
red (pure r) # green (pure g) # blue (pure b)
With the above you can not only do # rgb 0.5 1 0.25
but also # colour "red green tomato seagreen orange"