Cabbage Logo
Back to Cabbage Site

CsoundUnity DummyClip pops up

I just freshly installed everything and tried running a new Csound program in Unity. However, every time it runs there is a DummyClip popping up in the Audio Clip and my Csound doesn’t make any sound. Loop also gets checked automatically. I didn’t put any C# yet.

The program plays normally in CsoundQt.


Hmmm where does this DummyClip come from? I would really appreciate if someone could help out :open_mouth: Thanks a lot!

Ah yes, the DummyClip! This is not something you need to worry about. @giovannibedetti will know better than I, but as far as I can remember, an AudioSource needs to have a clip if you want to do spatialisation. So CsoundUnity generates one when the scene starts, and fills it with the output of the Csound buffers as it’s run. Unity can then process and spatialise the audio as it would a native AudioSource.

1 Like

Yes, the Unity spatialization calculations happens before OnAudioFilterRead, so to keep the results we have to use a dummy clip. This is an audioclip filled with all 1s, and the results of the spatializations are applied to it. This output is then multiplied with the Csound output, resulting in a spatialized audio.
To have a spatialized sound also be sure to set its spread to max and set the AudioSource Spatial Blend to full 3d.
I tried yesterday using Oculus Spatializer in audio project settings, and I was getting no output indeed. Maybe there is some other setting to tweak I am not aware of atm.
Are you using the default Unity spatializer or the Oculus one?

Btw Happy New Year!

1 Like

Oh, I see, but I wasn’t using Oculus. I haven’t installed the Oculus Integration on this PC yet. I just dragged the CSD into an empty Audio Source in a new Unity project and hit Play.