I've traced this down to vscode extension (which i may just use improperly, will update). Copying from discord:
1
So in sclang I call:
(
var on, off, cc;
var osc;
osc = NetAddr.new("127.0.0.1", 6010);
MIDIClient.init;
MIDIIn.connectAll;
cc = MIDIFunc.cc({ |val, num, chan, src|
osc.sendMsg("/ctrl", num.asString, val/127);
});
)
and i can verify that indeed osc messages are being sent to port 6010, where I expect tidal to listen. My boottidal.hs doesn't overwrite the defaults, so based on docs it should listen for these messages. How I test that it works (doesn't) is by playing some sound modulated by cf 0 "<osc message string>"
. It doesn't change with incoming messages (it stays on the default 0 value, if i change the default to i.e. 0.5 the sound does change)
2
I've disabled firewall and didn't help
3
Have just noted a log from ghci BootTidal.hs
: it says:
Listening for external controls on 127.0.0.1:6010
so indeed tidal listens
4
I found sth: so the full tidal logs actually show sth:
GHCi, version 9.4.8: https://www.haskell.org/ghc/ :? for help
[TidalCycles version 1.9.4]
Installed in /nix/store/dqy1y08zc9sr3nkyhmpy8js3zn7dqylq-tidal-1.9.4-data/share/ghc-9.4.8/x86_64-linux-ghc-9.4.8/tidal-1.9.4
Listening for external controls on 127.0.0.1:6010
Connected to SuperDirt.
Loaded GHCi configuration from /nix/store/zlxa2pk4kizcwp81a61c7vk5zrvmbx1c-source/BootTidal.hs
tidal> tidal> [TidalCycles version 1.9.4]
Installed in /nix/store/dqy1y08zc9sr3nkyhmpy8js3zn7dqylq-tidal-1.9.4-data/share/ghc-9.4.8/x86_64-linux-ghc-9.4.8/tidal-1.9.4
Listening for external controls on 127.0.0.1:6010
That port isn't available, perhaps another Tidal instance is already listening on that port?
Warning: GHCi | Can't handshake with SuperCollider without control port.
tidal> tidal>
This is the output as witnessed in vscode from the tidalcycles extension. It looks like the ghci
command is run twice, because the output is sort of doubled and the second time it says "That port isn't available, perhaps another Tidal instance is already listening on that port?" Why twice? I assumed it's a problem with the extension and run tidal (ghci BootTidal.hs
) directly from shell. Success! If I do that, then inside that ghci shell I receive the midi signal correctly.
Summarizing: The midi setup, directly mirrored from the docs, works for me. I need to debug the vscode extension.