Created
May 14, 2020 20:46
-
-
Save jarmitage/0e98e1be3d647fd43d9012d778410e61 to your computer and use it in GitHub Desktop.
[WIP] Tidal to Bitwig OSC API v2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Target | |
:{ | |
bwTarget = Target {oName = "bitwig", | |
oAddress = "127.0.0.1", | |
oPort = 8000, | |
oLatency = 0.2, | |
oWindow = Nothing, | |
oSchedule = Pre BundleStamp | |
} | |
:} | |
-- OSC paths and args | |
:{ | |
bwScene = OSC "/scene/{scene}/launch" $ ArgList [] | |
bwTempo = OSC "/tempo/raw" $ ArgList [("raw", Just $ VF 0)] | |
bwMaster = OSC "/master/{action}/{value}" $ ArgList [("volume", Just $ VF 0), | |
("pan", Just $ VF 0)] | |
bwTrack = OSC "/track/{track}/{action}" $ ArgList [("volume", Just $ VF 0), | |
("pan", Just $ VF 0)] | |
bwClip = OSC "/track/{track}/clip/{clip}/{action}" $ ArgList [] | |
bwMidi = OSC "/vkb_midi/{channel}/{action}/{value}" $ ArgList [("value", Just $ VI 0)] | |
bwMidiCC = OSC "/vkb_midi/{channel}/{action}/{channel}/{value}" $ ArgList [("value", Just $ VI 0)] | |
bwUser = OSC "/user/{channel}/value" $ ArgList [("value", Just $ VI 0)] | |
:} | |
-- OSC map | |
:{ | |
bwOscMap = [(superdirtTarget, [superdirtShape]), | |
(bwTarget, [bwScene, | |
bwTempo, | |
bwMaster, | |
bwTrack, | |
bwClip, | |
bwMidi, | |
bwMidiCC, | |
bwUser] | |
)] | |
:} | |
bwStream <- startStream defaultConfig bwOscMap | |
-- Stream | |
:{ | |
let b = streamReplace bwStream | |
:} | |
-- Pattern params | |
:{ | |
let channel = pI "channel" | |
value = pF "value" | |
-- vi = pI "value" | |
action = pS "action" | |
tempo = pF "raw" | |
scene = pI "scene" | |
track = pI "track" | |
clip = pI "clip" | |
-- p c v = value (range 0 16384 v) # channel c | |
:} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment