Cabbage Logo
Back to Cabbage Site

Polyphonic Sampler in Csound for use in Unity

Hi,

I want to use unity in conjunction with either Chuck(Chunity), PDlib or Csound for audio-visual installations/live performances.
Thanks to Rory’s youtube channel I already know that building a sequencer with csound in unity is possible. Besides synthesis, which is obviously possible, I also need a polyphinc sampler (something like Kontakt, just much more limited). Is this possible/feasible in csound? And if so, are there examples/tutorials/resources on it somwhere?

Thanks in advance!
All the best :slight_smile:

Hello @woodwindblues, and welcome to the forum.

This is just one approach, and geared toward creating a plugin. But the same code can be tweaked to target any number of platforms. One thing to watch out for, you should make sure to use Csound as the master clock for all audio events. Trying to sequence audio events from Unity will result is pretty awful synchronization. Also, take a look through the Csound for games sub-category here. You’ll find some useful info there.

In my experience, if it has to do with audio, it can be done with Csound. They question isn’t ‘can I’, but ‘how do I’ :slight_smile:

Thanks for the incredibly quick and helpful response. I actually skimmed over the video before, but did not realize that it actually had pretty much everything I was looking for (at first glance I mistook it for a one-shot style sampler without pitch-shifting and real polyphony). I also found some helpful examples in the cabbage IDE.

Skimming through the CsoundForGames category also made me realize how active the developement and the Community on Csound for Unity is. This is a very big plus compared to Chuck and PD for Unity!

Thank you for your help and all the work you put into this!

1 Like

The CsoundUnity project is blessed with some great contributors, especially @giovannibedetti who will probably be answering more of your questions that I :wink:

1 Like