Cabbage Logo
Back to Cabbage Site

Setting k-rate in CsoundUnity

Hello there,

I’ve been having a great time with CsoundUnity for awhile, but I noticed that the ability to change sample rate and k-rate has recently been added. I was happy to see that, but I noticed that changing the sr/kr/ksmps values in the orchestra file header seems to have no effect; the sample rate and k-rate are still both reported in the console as being 48000. I also noticed in the CsoundUnity Inspector in the editor that sample rate and k-rate are visible and set to 48000, but can’t be changed there either. It looks like in CsoundUnity.cs there is a [HideInInspector] tag where sr and kr are set, and I wonder if that may be the issue? I am also open to the idea that I am missing something extremely obvious. Thank you!

Hello @Yardbird78 and welcome back to the forum.
yes you should be able to override the Orchestra sr and control rate from the settings:


I should document the feature maybe :man_facepalming: :sweat_smile:

2 Likes

Ha! Well as I suspected I was overlooking something extremely obvious! I can’t believe I did not see that checkbox right there. Not sure documentation is necessary, just that the users aren’t as blind as me. Thanks for that reply, Giovanni, and for all the work you’ve put into CsoundUnity!

1 Like