Using VSTPlugin with Tidal

heh funny, i was just about to post a summary of this thread in the tidal discord channel and while writing came to the same conclusion as you: custom OSC messages and a message handler on the supercollider server could possibly sort it out.

i also think that this reframing of it being an issue of needing an interface to receive scheduled OSC messages as opposed to an issue more closely tied to superdirt/tidal should make it reasonable to open a github/git.iem issue with the developer and possibly work together on a solution

i'm not sure if supercollider can receive simultaneously on different ports though? time to make some coffee and experiment some more i guess :smile:

are you on the discord server as well?

I think that I can work on a prototype without any problems and we could do it together too :slight_smile: For this I would suggest an independent GitHub repo and discuss it here for references and for implementation details on Github and discord.

Or who do you mean by "a github/git.iem issue with the developer and possibly work together on a solution". The TidalCycle developers are already in this forum and you could address the SuperDirt developers too. But from my point of view, the first thing is to see if it doesn't even become a kind of "standalone addon" because it looks like that it could become an own interface beside SuperDirt.

Btw. SuperCollider can easily handle multiple ports.

And yes I can be found on the tidal discord server.

1 Like

Today I managed to finish my proof of concept on this topic. You can find my version of this on GitHub: GitHub - thgrund/TidalVST: Using Supercolliders VSTPluginController to control VST plugins with TidalCycles

It certainly cannot do everything that one would like to have in terms of features. But I have found that for now I can work well with it.

What you can do, however, is to:

  • use the VSTPluginController to make a VST plugin accesible for TidalCycles
  • control VST parameters with TidalCycles pattern. You can use simple functions or even control busses!
  • apply global effects from SuperDirt

I hope this isn't gatekeeping, but I uploaded a short demo video on Instagram:
https://www.instagram.com/p/CMZljk2i5G0/?utm_source=ig_web_button_share_sheet

5 Likes

Wild. Nice effort guys!

1 Like

Yeah a shoutout to @mattia.paterna. Some ideas you had already dropped here in the forum were still useful. While I don't think you should separate instruments and parameters, since the control busses in Tidal now allow you to separate notes and parameters, but diversions turned out to be very handy.

And thanks to @Robin_Hase with whom I had a more intensive exchange about this topic one evening.

1 Like

Thank you for your perseverance @mrreason!
I am sorry I have been very absent-minded over the past few months. Truth is, I have been going through a rough patch and I lost focus on the topic.
I hope I'll catch up at some point :slight_smile:

2 Likes

Thanks so much @mrreason & @mattia.paterna for this proof of concept!

I couldn't get this to work and filed an issue here, I think I might just be misunderstanding something:

Hey @jarm and thanks for trying out the experimental TidalVST. And sorry for the late reply. Today I was able to look into the issue.

You need to simply execute this statement in TidalCycles before you can use the vst statement:

vstName = pS "vstName"
vst name = s "vst" # vstName name

It is defined in this file: TidalVST/newFunctions.hs at main · thgrund/TidalVST · GitHub

Let me know if there is any further problem.

Progress!

I took a big step in simplifying the setup and becoming more flexible by being able to apply SuperDirt effects to the VST instruments. This is done by creating a VST plugin as SynthDef in SuperCollider and routing it into the SynthDef bus and linking the SynthGroup.

And the error message disappeared. I would say this is a huge step in creating a more generic approach.

The source code is updated and can be found (as always) here: GitHub - thgrund/TidalVST: Using Supercolliders VSTPluginController to control VST plugins with TidalCycles

I made a small showcase. You can find it here:

5 Likes

Hi. Love the plugin. However I have problems with frequent clipping which is not present using VSTPlugin in supercollider directly. Increasing fadeTime helps a little. I tried with Surge XT, Dexed and Odin2 vsts mono and poly modes. Maybe there is some parameter or hack that can help? Thanks

Glad to hear you're having fun with it! I've heard of clipping occurring, but I haven't had that problem yet. I would install Dexed and try to reproduce it. Do you have some information for me here? Something like what preset are you using and what does your TidalCycles code look like?

After a long debug session yesterady I realized that there is a problem with the event duration in combination with the ~dirt.server.makeBundle. But the solution could be a little bit complicated.
I think it's needed to re-build the SuperDirt midi event type to a vst-midi event type. There is a proxy interface that I could use.
And work with a thread scheduler with the event latency and the sustain value to manually trigger noteOn and noteOffs in sync with the rest of the event. I hoped there is a simpler solution (like I played a vst_midi event triggered by a dirt event.).
This in combination with an envelope in the VSTPlugin SynthDef should remove the clipping.

Btw. I tested everything with the Dexed Plugin. I will try to fix it asap because I would like to try a "one synthesizer challenge" with Dexed and this Tidal-VST. Sooo my motivation is huge to fix this.

3 Likes

Thanks. Glad to hear u found a problem. I want to ask or at least get pointers (maybe I will try to dig in myself) for 2 other things:

  1. Is it possible to have .scd file load automatically on Tidal/SuperDirt startup and make vsts permanent (or respawan but with pre-kill parameters). Because now at least for me I have to evaluate code in .scd by hand after startup and if I use kill in SC I need to reeavulate it again.
  2. Does code needs a lot of modifications to work with VST effects or is it matter of only changing synth definition and event type?

The short answer is that it is certainly all possible. But I can not estimate the effort and what is a good solution here.

But I always call it proof of concept because I am not able to answer all questions. What is important to me about my approach is that it works together with SuperDirt (otherwise there is the other approach with Ableton Studio).

But there is not yet a solution for everything, so everyone is free to contribute here and for help I am always grateful.

But for transparency, my next steps are:

  • Make playing VST instruments more robust (avoid clipping etc.)
  • And make the code more scalable, so that you can run 7 VST instruments in parallel, for example.

Next progress! I think I solved the clipping issue as I described here

You can try it out now:

3 Likes

That seems to have done the trick. Interestingly I was exploring a similar path this weekend but wasn't successful in getting good results.

Excellent work @mrreason

@qaciwq I might have a solution for you. Let me get some time to package it up and post my current version here.

2 Likes

Hi. Appreciate the update. I tried new code, but encountered similar clipping as before. I made short 1 min video in vimeo Vimeo of test using VSTPlugin directly and then Dexed.scd code.

Unfortunately I can not see your definition of the triggerFunc function. For me it looks like you have a function with makeBundle because I see that there are multiple notes triggered even when this should not be possible with your pattern:

Furthermore the clipping problem is harder to solve with the newest version of the VSTPlugin extension.
To avoid clipping, you may have to set the fadeInTime to 0.01 and set a begin value greater than 0 in the pattern. But this is only a small dirty hack (but it works).

I made a new showcase to demonstrate the current state of TidalVST. All sounds come exclusively from the VST plugin Dexed. The drum sounds are played as samples, but all other sounds are generated live from seven plugin instances:

Also, with the new version of the VSTPlugin extension, I am able to create and load presets.
The only downer is that I don't seem to be able to apply an envelope to the VST SynthDef. To avoid clipping, you may have to set the fadeInTime to 0.01 and set a begin value greater than 0 in the pattern. But this is only a small dirty hack (but it works).

You can find my SuperCollider code from the small example here:

5 Likes

Wow, great! @mrreason

I believe one of the significant unique points of using Tidal is that it is easy to trigger a massive number of parameters simultaneously with a simple code.

I think we can dive deeper into legendary synthesizers by combining them with Tidal VST. (I am trying to do it through Ableton Live, but it costs too much overhead memory and manual work...)

1 Like