hey there! i'm stuck at setting up OSC with my tidal setup. i have tried many different ways (e.g. different indentations, pasting the code from the official docs in a .tidal vs. a .hs file, etc.). the intent once that's done is to communicate with ableton.
i'm in VS Code with the tidal extension setup, set to read my custom BootTidal.hs file at the root of my project. i wrote a separate OSC.hs file to set the OSC targets & streams, loaded from the BootTidal.hs file. but even by pasting the code in the same file it doesn't work.
the way i'm testing my setup is by running x1 $ s "hello" # cut 1 # intensity 1, as suggested in the docs.
i've been getting indent issues, or syntax: :script <filename> error when loading :script ./OSC.hs. as far as i understand these errors have to do with haskell specificities which are beyond me as i don't know haskell.
here is my my latest implementation with VS Code, Tidal extension & custom BootTidal.hs at root of directory:
:set -fno-warn-orphans -Wno-type-defaults -XMultiParamTypeClasses -XOverloadedStrings
:set -package tidal-core
:set prompt "tidal> "
:set prompt-cont ""
import Sound.Tidal.Context
import Sound.Tidal.Boot
default (Rational, Integer, Double, Pattern String)
tidalInst <- mkTidal
instance Tidally where tidal = tidalInst
let glassPc = sound "bifs-glass-piece"
metalTxt = sound "bifs-metal-texture"
beep = sound "bifs-beep"
:script "/Users/<username>/Library/Application Support/SuperCollider/synthdefs/mi-ugens-params.hs"
:{
let target = Target {oName = "ableton",
oAddress = "localhost",
oPort = 5050,
oLatency = 0.2,
oSchedule = Live,
oWindow = Nothing,
oHandshake = False,
oBusPort = Nothing
}
oscplay = OSC "/play" $ ArgList [("s", Nothing),
("vowel", Just $ VS "a"),
("pan", Just $ VF 0.5),
("volume", Just $ VF 1),
("cut", Just $ VI 1),
("intensity", Just $ VI 0)
]
intensity = pF "intensity"
oscmap = [(target, [oscplay])]
:}
stream <- startStream defaultConfig oscmap
:{
let x1 = streamReplace stream 1
x2 = streamReplace stream 2
x3 = streamReplace stream 3
x4 = streamReplace stream 4
:}
and the error i get when running smth like x1 $ s "db", using the tidal extension commands ctrl+enter:
2025-11-14 11:25:50.083 [error] tidal>
[GHC-88464]
Variable not in scope: x1 :: ControlPattern -> b
Suggested fix: Perhaps use ‘d1’ (imported from Sound.Tidal.Boot)
2025-11-14 11:25:50.090 [info] tidal>
i'm at a loss with what options to try at this point, welcoming suggestions or working examples <3
System info:
OS: Macos
Installation: cabal
Code editor: VS Code
SuperCollider version: 3.14.0
SuperDirt version: 1.7.3?
GHC version: 9.6.7
Tidal version: 1.10.1
Audio device & protocol: internal speakers
Audio card: none