yes I did
CsoundUnity Package (UPM) development
Iām a bit late to this, but whatās the difference between these two Csound packages?
Should be the same .framework, I donāt remember having modified anything!
Thatās really odd? I canāt think what might be causing the problem there.
I pushed a new feature, now itās possible to edit the csd from the inspector and save the changes on the file.
Question for @rorywalsh: how to highlight the code?
It looks itās going to rain here tomorrow, so I guess Iāll have some time for this! Iām looking forward to checking out this new feature. Btw, you are familiar with the Csound extension for VS Code? Or do you use Mono?
I use Visual Studio for Mac for C# and Cabbage/CsoundQT for Csound code.
I found the Csound tokenizer of Cabbage (https://github.com/rorywalsh/cabbage/blob/master/Source/CodeEditor/CsoundTokeniser.h)
and I was thinking of porting it to C# someday.
Btw, for now it is useful to have the chance to edit the csd āon the flyā, but in the future a basic Csound editor in the inspector could be a great feature!
Iām sure there are easier ways to do this. I used various syntax highlighting libraries in JS, Iām sure there must exist a few for C# too?
I donāt know any, Iāll do a search!
Let me know if you have some ideas!
Iāve just pulled the latest dev2 tip now. Iām not seeing any way to edit the .csd file from the editor however?
Iāve been sidetracked with work this past week or so. Where are we at now in terms of bigger picture? Are most of the main features we planned working Ok now? Is the FileWatcher only testing CSD files on Windows at the moment? I can see about getting that working on OSX too? Then I might try another example to see how it works. An example that reads and writes to function tables should be a good test case!
Iāll try to recap:
Build
- Build works on Windows.
- Build doesnāt work on macOS but there is a workaround.
- Build not tested on Android (we should probably remove some old code)
Usage
-
Csound works on Editor for Windows and macOS
-
Inspector shows Control Channels and Audio Channels
-
Control channels values are serialized and saved
-
Unity Presets can be used
-
Edit CSD:
Itās possible to edit the csd and save the changes from the CsoundUnity inspector.
You should see something like this:
Notice that the tabs (\t) have some problems, but editing and saving works on macOS. -
Foldable sections to have a cleaner inspector
(EDIT)
- CsoundFileWatcher works on macOS, I havenāt tested it on Windows
TODO
-
Some work has to be done to parse other popular Cabbage Widgets, especially
- groupbox
- label
- radio button
- keyboard?
-
0dbfs bug: itās not working on macOS, it always reports 1 even if thereās no 0dbfs set. Lots of older csound files are using 32767 as sample max level, very dangerous!
(EDIT)
- Bug: Unity crashes on exit! (maybe related to CsoundFileWatcher)
I can take a look at that 0dbfs bug. Itās definitely one that needs fixing! Iām not seeing any way to edit the csd files though? Iām working off the latest dev2 tip?
really strange!
Try to reset the inspector, but it should work even without
EDIT: Notice I put a LogWarning in ProcessBlock when sample value goes over 10.0 (and set the sample value to 0.0), as temporary workaround
this is the last commit:
(well of course not pressing play but pressing the save csd button )
Iāll try this. Note I just merge dev2 back into develop. I hope thatās Ok. All the dev2 history will not be accessible though the develop branch so i think I will probably delete dev2 in the future. Iāll be sad to see it go. As far as git goes, it was one of the better branches Iāve worked on!!
Ok thatās fair!
Yes it will be missed, I think I never reached 150 commits on a branch
Is it all ok now? Iāll pull the develop branch now to do some tests.
We should mark this day every year with a glass of whiskey and a nice cigar
You should do it from the inspector of the CsoundUnity instance where you set it!
(sorry it wasnāt clear)
Oh yes, I see it now. Oh this looks like itās going to be a complete distraction!!
Are there any existing code editor components that we can use? If not I think any time spent on this might be a waste of effort Weāll never match VS Code for functionalityā¦