Custom OSC - pre 1.5.0

From TidalCycles userbase
Revision as of 00:26, 8 January 2019 by Yaxu (talk | contribs) (Created page with "It's possible to define your own Open Sound Control messages, to target software other than SuperDirt or Dirt. customTarget = OSCTarget {oName = "MyStrangeSoftware", -- Giv...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

It's possible to define your own Open Sound Control messages, to target software other than SuperDirt or Dirt.

 customTarget = OSCTarget {oName = "MyStrangeSoftware", -- Give your target a name
                           oAddress = "127.0.0.1", -- the target network address
                           oPort = 5050, -- the target network port
                           oPath = "/trigger/something", -- the OSC path
                           oShape = Nothing, -- The 'shape' - see below
                           oLatency = 0.02, -- the latency (to smooth network jitter)
                           oPreamble = [], -- Some fixed data to put at the start of messages
                           oTimestamp = BundleStamp -- The style of timestamp
                          }


 anotherTarget :: OSCTarget
 anotherTarget = OSCTarget {oName = "Another one",
                            oAddress = "127.0.0.1",
                            oPort = 7771,
                            oPath = "/play",
                            oShape = Just [("note", Nothing),
                                           ("distortion", Just $ VF 0),
                                           ("loops", Just $ VI 1),
                                           ("vowel", Just $ VS "a")
                                     ],
                            oLatency = 0.02,
                            oPreamble = [],
                            oTimestamp = MessageStamp
                           }