Background
I am using VSTPlugin
library in SuperCollider to load VSTi as Ugens and have them played from within Tidal using MIDI. Here is a minimal definition of this workaround:
(
SynthDef(\VSTi, {|out|
var sound = VSTPlugin.ar(nil, ~dirt.numChannels, id: \SynthName);
Out.ar(out, sound);
}).add;
)
~synth = Synth(\VSTi);
~instrument = VSTPluginController(~synth, \SynthName).open("/path/to/vst/plugin", editor: true);
// add MIDI device to SuperDirt
~dirt.soundLibrary.addMIDI(\vst, ~instrument.midi);
The library has a nice feature, that is it is possible to change the synth parameter using set
messages such as
~instrument.set(param, value);
.
There is also another alternative, i.e. playing an Event
such as
(vst: ~instrument, type: \vst_set, params: [param], param: value).play;
I though of having this automated through Tidal and therefore I made a function that does nothing but calling set
method for the instrument. Here is a minimal definition:
(
SynthDef(\VSTiParams, { |param, value|
~instrument.set(param, value);
}).add;
)
I then have a loopback into Tidal so I can apply SuperDirt effects to the VSTi output:
(
SynthDef(\VSTIn, { |vstOut, out, pan|
var sound;
sound = In.ar(vstOut);
Out.ar(out,
DirtPan.ar(sound, ~dirt.numChannels, pan)
)
}).add
);
and here is how I call everything in a Tidal session:
do
d1
$ slow 8 $ n (scale "<minor scriabin>" ( "0 ~ 2 3 [5 ~ 7] -1"))
# "vst"
d2
$ sound "VSTIn"
d3
$ s "VSTiParams" # pI "param" "25" >| pF "value" "0 0.5"
Problem
The VSTi seems unresponsive although I can see that Dirt events are received from Tidal.
I haven't been lucky in identifying the problem, does anyone know if it is possible to call object methods in SuperCollider from Tidal using an ad-hoc SynthDef? Or is it a better way?