Now the changes made to the Control Channels found in the csd are correctly serialised and saved in the Scene, and are fully compatible with Unity Inspector presets.
Added Edit Csd Section, to be able to edit the csd from Unity, and save its content on disk.
Added Test Score Section, to be able to send score to Unity when testing in Editor.
Added AudioChannels: the csd file is scanned for chnseta opcodes, and the resulting Audio Channels can be seen in the inspector, and publicly accessed from a dictionary.
Added folded groups:
Settings
Edit Csd Section
Test Score Section
Control Channels
AudioChannels
Added CsoundUnityChild, to be able to read audio from the AudioChannels of a CsoundUnity instance.
Added CsoundFileWatcher to detect changes made by an external program to the csds used in the scene, and update them. Add FILEWATCHER_ON in your project Scripting Define Symbols.
Added Android libraries, builds working on Android 64bit (it has been successfully tested on Oculus Quest).
Added an utility method to load samples from AudioClips (currently from Resources folder only).
Added CreateTable methods, to be able to create Csound tables from float arrays.
Added a toggle to show warnings and hard filter output samples with values higher than a threshold.
Cabbage widgets: Added support for ComboBoxes.
Added IsInitialized property and OnCsoundInitialized event.
Overriding the sample rate and control rate of the csd using Unity Audio Project Settings.
Improved Logging.
Updated macOS library to use a .bundle instead of a .framework, to be able to build for macOS straight out of the box.
Totally removed the need to use the StreamingAssets folder to store csds, libraries and audio files, the csd is saved into the CsoundUnity instance as soon as it is dragged in the Csd Asset inspector field.
Removed the overwriting of the Path variable of the operating system.
Fixes
Crash on exit.
Fixes for distorted audio output when reading mono files.
Build/Editor DLLNotFound issues on macOS.
Where to ask for help, report bugs, ask for new features: Cabbage forum: use this forum for everything related to the use and the features of CsoundUnity, ask for help, report bugs, ask for new features. Csound forum: help with Csound code, report bugs / ask for features relative to the Csound library. Csound dischord chat: where Csound developers meet. CsoundUnity Github repository: report specific issues with CsoundUnity, ask for new features, contribute to the development.
And now party time!
Very curious to see what you will create with it!
Like I said on the Cabbage list, I have to take my hat off to @g_b for this one. He’s restructured and updated a lot of the code base here. It now feels very much like a proper Unity package. I wonder does Unity they still have a problem with LGPL frameworks on their Asset Store? If not it would be nice to add CsoundUnity.
I just heard about this on the audioprogrammer discord, definitely nice work on how it sets up in Unity.
Can’t wait to try out some of the audio visual things I have already written in Unity with this. New to CSound but the machine opcode stuff seems pretty interesting for 3D.
Thanks to all involved in the project. I know what it’s like trying to make bridges with audio frameworks, it ain’t easy.
I have a lot of experience years ago with parsers and lexers, compilers and DOM code writing frameworks.
Has anybody done a node graph with Unity and CSound (that would create the csd file)? I don’t want to reinvent a wheel. But I can see from my naive perspective making a DOM in C# would make it a lot easier to work with.
I did this with an audio engine and C#/Unity, adds a lot of power.
I think that @DespairBear is working on something similar with CsoundUnity.
But he won’t create the csd file: instead, all the instruments inside the csd file will be nodes (if I understood his plan correctly).
Let’s wait for his word on this
Also @rory could be a good source of information because his framework Cabbage (based on Juce) has an integrated patcher.
Unfortunately I have no good hints on this, but I could help with some Editor stuff to connect nodes in the Unity inspector
Alright cool, I need to learn this stuff before I start really making broad claims of what is possible, I just get excited when I see an opportunity for an abstraction layer in something like a 3D engine and audio.
My suggestion is to start reading how you can pass data around, for example using chnset
You could of course use global audio vars (have a look here to know about the different Csound vars: /chapter: B-Local-And-Global-Variables / CSOUND), but it will be less dynamic than the chnset/chnget approach.
Also Macros could be useful in this scenario: /chapter: H-Macros / CSOUND
But let’s wait for suggestions from Csound devs with more experience than me!
Cabbage uses JUCE to implement its modular patching environment. But I think the same thing could potentially be achieved with Csound by manipulating the Csound DAG in real time. I have never tried, but I believe it might be possible to access low level orc nodes and restructure them on the fly.
Not that I am aware off. And I might be wrong about it, but the comments underneath the csoundCompileTree() function seem to imply a new TREE can be compiled at perf-time. Victor is not on this list, but I will write him and ask if it is at least theoretically possible to do this.
CompileTree() is called when we are compiling, to parse code and create the tree, which is then compiled into instrument structures
He suggests that it might be possible to call at runtime, but is not 100%. It’s over to John ffitch now Btw, Victor did mention he plans to do some work on this in the future, so watch this space.