Function to return midi "ccn:value" syntax


I have set variables for ccn values named contextually ie
let decayCC = 80

I would like to make use it in ccn:value shortcut syntax like
cc decayCC:127 or cc (toCC decayCC 127)

I was thinking about something like this
let toCC cc v = (show cc) ++ ":" ++ (show v)

How can I do that ?

1 Like

Hey, I think since cc expects a Pattern String you only need to lift your String using the pure function like this:

toCC:: Integer -> Integer -> Pattern String
toCC cc v = pure $ (show cc) ++ ":" ++ (show v)