Cabbage Logo
Back to Cabbage Site

Getting Started with CsoundUnity


I have been getting started with Csound for unity and I would like to share some questions and the goals related to the project.

I am currently studying Csound at Berklee with Dr. Richard Boulanger and this is one of my latest projects.

I am using normcore to create a real-time multiplayer system and then using ExtOSC to send what I think is the transform local position of the characters into MAX(for the logic) and then using csound to produce sound.

I have been working sending midi to Csound but I don’t think the package for unity supports it right? That brings me to My first question :

1 - Does it support OSC? Would it be possible? I feel that would be an interesting way to skip the C# part of unity and get data into Csound.

2- I have checked the getting started page in the Csound for unity website but for me as a Unity starter it wasn’t clear how to use the chnget opcode to get the local position transform data of the object for example.

3 -In one of my unity projects csound for Unity runs smoothly. On the other it gives me an error saying “csound was not detected”. I have checked that “Csoundlib64.framework” is at the StreamingAssets and I do have csound installed. I tried creating another unity project and installing the package in the new work and it works fine. I tried looking at the package manager to uninstall the package and try to install again but I am not able to find it there. I think my question would be how to uninstall the Csound package from a project so I can install it again.

Here is a demo of the project

Thank you for the work with Csound for Unity. It seems like a great way to use Csound and create interactive music systems.

Hi Pedro. And welcome to the forum. Your project looks very interesting!

Sure. There shouldn’t be any problems there.

You’d have to send X,Y and Z points to Csound. You might do something like:

csoundUnity.setChannel("X", transform.position.x):
csoundUnity.setChannel("Y", transform.position.y):
csoundUnity.setChannel("Z", transform.position.z):

Much work is underway at resolving these issues. In fact, we’re in the middle of a complete rewrite (more below).

That’s because up till now it hasn’t really been a package, but rather a collection of scripts…

Using the old version all you would need to do is remove the CsoundUnity folder and streaming assets folder. But you might still have issues when you reinstall. If you fancy having a go at the new version let us know and we can talk you through the installation and setup. Note, for what it’s worth, I’m currently using the old version for a VR game, and I am going to continue using it because I don’t want to mess with everything just now. But for all new projects I’m using the latest beta version.