Cabbage Logo
Back to Cabbage Site

Saving .matrixB with .csd

Hi :slight_smile:

I am trying to save a scanned synthesis example from the manual to a new .csd file along with the .matrixB file in order to use the example in Unity. Where is the matrix located in the application content? How should I bundle/refer to the files in order to make them work in Unity?

Thank you!

All the best,
Chen Liu.

Hi again :wink:
Not sure, but the matrixB file should be saved where your Csound executable is. What Os are you on?
About using this in Unity, it is possible but not easy yet, see this thread for info: CsoundUnity 3.0, “sfload: cannot open SoundFont file”
For now you will have to use the custom_SSDIR branch to make it work, I will draft a new release as soon as I have some time :sweat_smile:

Hi :laughing:

I am using PC!

I am gonna looking into that thread. Hopefully it works! Thanks a lot for sharing.

So I found the matrix file and have it in the same folder as the csd file. How should I bundle it to a new csd?

To be able to be found by Csound this has to be inside one of the environment folders. The current release is not making this easy for Android so you would need to modify the source or use the custom_SSDIR branch, plus a script that copies the file into the Android persistent folder, or copy the file there manually. I’m in the process of creating a sample that shows how to do this, but this won’t happen until the weekend (hopefully :sweat_smile:)

Oh sounds good! No problem at all. I really appreciate your time and support. Looking forward to it!

I am going to record the scanned synthesis music and play it in Unity as a back up for my presentation for now.Screenshot 2022-02-23 183210
Could you help me with locating the recording file? I am still using the modified example file to record.

I’m not sure (I never used that feature, is this CsoundQT?) but I think you can set the output folder/filename in the settings, otherwise I would look where the csd is, or where the csound64.dll is :sweat_smile:

Cool sure I will take a look. Thank you!

On CsoundQT or Cabbage have you tried setting -o and the output filename in the Csound options?

In Unity you can already do this:

  • record the audio output to a table
  • after recording is done, get the samples of the table using CsoundUnity’s GetTable or CopyTableOut
  • use the samples to save an audio file in Unity

I’m taking notes and I will add a sample that shows this approach!

1 Like

That is an interesting approach. I will try that after class!