Hope you are doing well!
I am having a little trouble with the SetChannel in Unity.
I was trying to set a frequency value from unity to the pitch channel in csound that was defined like the following:
In Csound:
kpitch chnget “pitch”
a1 expon .1, p3, 0.001
In Unity void Update():
csoundUnity.SetChannel(“pitch”, 200.0f);
However, as I try to run the game I am receiving the following error for this section from the CsoundUnity code, could you please let me know what could be the issue here?
Error Message:
NullReferenceException: Object reference not set to an instance of an object
CsoundUnity.SetChannel (System.String channel, System.Double val) (at Library/PackageCache/com.csound.csoundunity@470893372c/Runtime/CsoundUnity.cs:1002)
PitchShift.Update () (at Assets/Scripts/PitchShift.cs:54)
Error code ref
Thank you so much!
Susan