As far as I remember, all I need to do is add support for named radiogroups How hard can it be
User selectable external editor?
Oh yeah, now I rememberā¦
Iām just wondering if we canāt do this with Csound/Cabbage without having to tear up some internal stuff? The following code shows how it can be done with Cabbage, but there is an outstanding issue. Clicking on a button when it is on will cause it to go off, which ruins the illusion! I must think about a way of getting around that. Note this example uses Csound 6.14 and the new chngetk
opcode, which takes an array of channels, and outputs to an array.
radioGroups.csd (1.7 KB)
I feel like weāve had this exact conversation somewhere before, tho I looked and couldnāt find itā¦ or maybe Iām just misremembering. Ironically tho, I think that you had a nearly identical example at the time too.
Which, btw this example doesnāt compile on 6.13 for some reason involving the chngetkā¦ but thatās neither here nor there for this discussionā¦ I get the gist of what youāre suggesting, and I think I could get it to work.
I donāt mind using a method like this to get it to work for me, but I donāt particularly like it either. I feel like radio buttons is a common enough function that it should not need such clunky and customized code. Long term I do think itās absolutely worth the effort to keep as much feature equivalence between imported widgets and normal ones as possible!
But again, this entire conversation feels like deja vu.
That saidā¦ itās dangerous to get me looking back through my old posts. So many great ideas Iāve forgotten about.
I do like the idea, but it will involve quite a lot of work to get it done. The underlying JUCE mechanisms for radiogroups only take integers, so adding this will involve a fairly major rewrite of a lot of code that I know works well. Iām hesitant to mess with it.
Hrmā¦ I donāt know a lot about the underlying JUCE/Cabbage infrastructure, and it may be an obvious/overly simple suggestionā¦ but what if radiogroups still behave as before, with numeric group IDsā¦ but imported radiogroups have the text prefixes from channel names reduced to ascii values (or a checksum of them) to create the numeric equivalents to their existing values?
So for example, an imported button set could define itās radiogroup(55), but when actually imported it has a channel(āmainā), which might reduce to ā1234ā, giving you a final radiogroup of 123455?
I think this would keep groups together, while still guaranteeing separation between multiple groups. I have no idea if itās actually feasibleā¦ just brainstorming here.
That was my first thought on this the first time it popped up. I will look into this approach again. I think I got something working and then realised Iād somehow painted myself into a corner.
I gotta question, does this supersede CabbageLite, or is there a fundamental difference Iām missing?
Iāll write a post about this now, as it seems I should make the situation clearā¦
Hey Rory! Sorry I didnāt get back to you on this earlier. It took me way too long to get Cabbage installing on my Linux box, and once I had, it took me a good week to realize the package name had a capital C in it. But abhorrent brainfarts aside, Iāve got it running now, and the āauto-load from diskā feature seems dead.
When I first enable it, and write something new to the file, it says I need to open a file first, even though Iāve already got one open. I close the file, and open it again, and from there nothing happens when I write to the file. It just doesnāt automatically load it. Iām using version 2.3.44 on Manjaro Linux.
What editor are you using to edit the .csd files? I canāt recall if I tested on Linux, but Iām sure itās working on other platforms.
Iām using vim. Is there a specific trigger that it might not be hitting when writing?
Let me set up my Linux box. Iāll get back to you in a few momentsā¦
[edit] just building the latest tipā¦
What version of Cabbage are you using btw? You can find out in the āAboutā menu commandā¦
Itās working here for me? Iām on 2.3.44, which is the latest build. I open the file I want to edit in Cabbage, and then in my test editor. I then launch the file in Cabbage by hitting Ctrl+S. I then go back to my editor. From thereon in all changes appear in my Cabbage instrumentā¦
Is this not working for you?
Using the start/stop button apparently isnāt quite the same as Ctrl+S. I was avoiding using Ctrl+S so it wouldnāt overwrite the changes I made in the other editor. But yes. That is mostly working. I do still randomly get a popup saying I need to open a file first, after which it stops working, but if I press ok, go back to Cabbage and hit Ctrl+S, it loads and works again for a while.
I havenāt found a clear pattern for what causes the popup yet, other than maybe spouts of inactivity without writing to the file? Not sure.
If you can recreate it let me know. I can look at a fix. It sounds pretty randomā¦?
Will do! It seems pretty random right now, but nothing ever is.
I donāt know if this is helpful or will even work for your use case, but when Iām using an external editor, I prefer to use the CabbageLite binary instead of the full version. It doesnāt clutter up my workspace as much since I donāt have a need for the internal editor and file management. Iām pretty sure itās packaged with all cabbage releases for now, but keep in mind Rory said heāll be working to integrate the two into a single binary soon.
I donāt know if that would work for your workflow, perhaps you need some of the additional functionality of the full cabbage app. But FWIW I donāt encounter issues like accidentally overwriting files or being told a file isnāt open.
Hereās a screenshot. CabbageLite floats as āalways on topā, and Iām able to still edit in the background, save, and the changes immediately render.
Yeah, I checked it out since you mentioned it earlier in the thread, and Iām using that now! Itās real handy!