Yes but expose the whole API so you could do a UI scripted too.
Iāve been using a custom āeditor moduleā that can attach to any other module, modify positions of widgets and save the layout, which the modulewidgets can load later. This way it is possible to switch between positioning/scaling knobs, ports etc and testing them without recompilation or restarting Rack. But adding new params still needs a make.
Sounds very interesting. Something you made? Something you can share?
Itās something I made for Rack 1, but havenāt touched since v2. My modules still use the layout files, but the editor module isnāt ported to v2 (as Iām not working on new modules rn) and it isnāt isolated from my plugin enough to be easily reused or shared.
Maybe some day Iāll make a separate repo for it or someone gets inspired enough to make it in a better way.
Hereās an old gif of it in action.
Interestingā¦ is it just for placement of widgets or?
Yes but eventually it would be cool if it could create lines, basic shapes and text labels as well for designing simple panels completely.
Iāve only made the two modules, but I definitely use Inkscape. And thus helper.py, if only to figure out where the dots ended up. The ease of using Inkscape/helper.py definitely helped convince me to start developing my plugin in earnest, so Iām grateful for it.
basically, extend it to be a full screen design tool, with all the features that other top tier screen designers (sketch ,figma, affinity designer, XD) have? sounds ambitious.
That might be too far, mainly three tools from such programs is needed: being able to place rounded rectangles, bezier curves and text in relation to ports and knobs/buttons.
Itās common you want to connect ports or knobs representing some signal flow, or put boxes behind outputs etc. I found reordering these either with code or in inkscape to be a hassle. Of course fancier graphics and components themselves would still require the programs you mention.
Since we have names for everything now (meaning both for params and ports), it could use these names for example to automatically add labels (with optional string shortening like āclockā ā āclkā) which would be great to get a āworkingā panel fast and to avoid mismatching params in code with graphics.
Many panels donāt need more than these basic things and once those are working, ambitious features can be added like drawing circles in case a fully rounded square wasnāt enough
I use Inkscape and helper.py for almost all my modules.
Itās value for me
- Creating a working shell of a module when I was first starting out.
- Locating and copying the x,y coordinates from Inkscape.
Where it needs improvements:
- Its not designed to update module positions
- It incorectly places things sometimes because it canāt handle rotatons on the circles or translations on the component layer.
- It misses compnentes that are not circles (happened to me in accident)
How I would improve it:
- Split the coordinates into its own hpp file and give the tool the ability to update only that.
- Warn when itās generating coordinates off the panel.
The code for this is mostly implemented in helper.py, I tweaked it a bit and it worked well. If you want a copy, Iāll send it to you.
However, I really hardly used. Now I just start with a large blank panel, and copy/paste/edit from my other code.
Yes, this is what I call āthe normal methodā. I had a slight refinement I had a module called āblankā, and would clone that first thing. Same idea, though.