Can you add these when you get a chance! And push, Iāll jump to dev2 thenā¦
CsoundUnity.cs (35.7 KB) CsoundUnityNode.cs (2.6 KB)
Can you add these when you get a chance! And push, Iāll jump to dev2 thenā¦
CsoundUnity.cs (35.7 KB) CsoundUnityNode.cs (2.6 KB)
The funny thing is I kept pulling your changes into my local branch here without even noticing we were on different branches!
ok done!
I still hear pops
My audio was running pretty smooth. Might it be a good idea now to start creating some examples, so that we all testing with the same scenes?
Yes I added my current scene to samples!
It seems the ref to the csd is mantained! No need to update it (never tried this)
Of course a lot of debugging has to be done, I feel thereās a lot of things that can break with the FileWatcher and Editor stuff
Cool. Iāll have a look at your sample so I can add a few of my own for testing.
Cool thing is that in the CsoundUnityNode inspector appears an audiometer when playing!
I know. What great developers we are
If OnAudioFilterRead is implemented a VU meter is shown in the Inspector displaying the outgoing sample level. The process time of the filter is also measured and the spent milliseconds are shown next to the VU meter. The number turns red if the filter is taking up too much time, meaning the mixer will be starved of audio data.
https://docs.unity3d.com/2019.1/Documentation/ScriptReference/MonoBehaviour.OnAudioFilterRead.html
Nice to have!
In CsoundUnity we donāt see it because we override the inspector, but maybe we can bring it back somehow
I just did a fresh checkout of the the current dev2 branch and created a new Unity project. Into a CsoundUnityPacakage folder in my projectās Packages directory I pasted all the files from the current branch. When i start unity Iāve a few errors that are preventing me from running the sceneā¦:
After restarting the project I get some different errors:
Maybe Iāll start it again and it will work 3rd time lucky!
What I did to make it work was cloning the repo in the packages folder, if it exists already delete it and recreate it, and without going to unity (that will recreate the manifest.json) clone the repo there
So I just did that, clone into Project/Pacakges, but I still get the same error as above, specifically the ones about CsoundUnity not recognised in CsoundUnityEditor?
Iām also getting these warningsā¦
Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs(715,18): warning CS3014: 'CsoundUnityBridge.ChannelInfo' cannot be marked as CLS-compliant because the assembly does not have a CLSCompliant attribute
(Filename: Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs Line: 715)
Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs(717,54): warning CS3001: Argument type 'CsoundUnityBridge.ChannelType' is not CLS-compliant
(Filename: Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs Line: 717)
Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs(717,78): warning CS3001: Argument type 'CsoundUnityBridge.ChannelDirection' is not CLS-compliant
(Filename: Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs Line: 717)
Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs(724,28): warning CS3003: Type of 'CsoundUnityBridge.ChannelInfo.Type' is not CLS-compliant
(Filename: Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs Line: 724)
Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs(725,33): warning CS3003: Type of 'CsoundUnityBridge.ChannelInfo.Direction' is not CLS-compliant
(Filename: Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs Line: 725)
Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs(733,18): warning CS3014: 'CsoundUnityBridge.ChannelHints' cannot be marked as CLS-compliant because the assembly does not have a CLSCompliant attribute
(Filename: Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs Line: 733)
Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs(749,45): warning CS3001: Argument type 'CsoundUnityBridge.ChannelBehavior' is not CLS-compliant
(Filename: Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs Line: 749)
Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs(762,32): warning CS3003: Type of 'CsoundUnityBridge.ChannelHints.behav' is not CLS-compliant
(Filename: Packages\CsoundUnity\Runtime\CsoundUnityBridge.cs Line: 762)
Packages\CsoundUnity\Runtime\CsoundUnityNode.cs(23,18): warning CS0414: The field 'CsoundUnityNode.ksmpsIndex' is assigned but its value is never used
(Filename: Packages\CsoundUnity\Runtime\CsoundUnityNode.cs Line: 23)
Packages\CsoundUnity\Editor\CsoundUnityEditor.cs(23,22): error CS0246: The type or namespace name 'CsoundUnity' could not be found (are you missing a using directive or an assembly reference?)
(Filename: Packages\CsoundUnity\Editor\CsoundUnityEditor.cs Line: 23)
Packages\CsoundUnity\Editor\CsoundFileWatcher.cs(13,12): error CS0246: The type or namespace name 'CsoundUnity' could not be found (are you missing a using directive or an assembly reference?)
(Filename: Packages\CsoundUnity\Editor\CsoundFileWatcher.cs Line: 13)
Packages\CsoundUnity\Editor\CsoundUnityEditor.cs(27,5): error CS0246: The type or namespace name 'CsoundUnity' could not be found (are you missing a using directive or an assembly reference?)
(Filename: Packages\CsoundUnity\Editor\CsoundUnityEditor.cs Line: 27)
Packages\CsoundUnity\Editor\CsoundFileWatcher.cs(15,36): error CS0246: The type or namespace name 'CsoundUnity' could not be found (are you missing a using directive or an assembly reference?)
(Filename: Packages\CsoundUnity\Editor\CsoundFileWatcher.cs Line: 15)
Ok some asmdef could have gone wrong, drag the csound.unity asmdef in the asmdef of the editor, like this:
Ok, Iām up and running now once I added the csound.unity.com reference to the asmdef file settings I assume end-users wonāt need to do this?
The warnings about cls compliance are something I found in Richard code, tried to use them to see what would happen I think we can remove some of the [CLSCompliant(true)] around
exactly you have the reference of the csound runtime package missing, drag the com.csound.unity.asmdef file there in the field where it says missing reference
Ok, Iām hearing the clicks now. I donāt have them in my local branch, let me take a lookā¦