To stdout: what happens in the stdout where your rack runs? Do you run with a terminal attached? If not you will indeed not see the stdout
To html: check your browser tabs?
But I could add a to rack log option I guess also
To stdout: what happens in the stdout where your rack runs? Do you run with a terminal attached? If not you will indeed not see the stdout
To html: check your browser tabs?
But I could add a to rack log option I guess also
Yeah, I donāt run with a terminal. Clicking on HTML does not open any tabs in Firefox or Edge.
Ok must be failing to make the file
If you want to look itās show html in lintbuddy.cpp. I bet it is giving a bad temp name on windows and canāt make the html or canāt browser open it.
Works great in mac, as does the stdout!
(Dump to rack log is a good idea too tho)
donāt know if this is still current, but of course you can reuse any code in my repos under gpl, feel free to ask if things are unclear in the code.
Thanks!
I got it starting to work then realized in this case I can just reuse the scroll widget but I have another idea for a kind of sequencer where I will definitely use a bunch of that code.
One thing that always feels tedious is getting my ports, sliders, knobs, etc., aligned properly on the panel. I can usually just look inside my code and see the (x, y) coordinates of everything. But then I have to make a spreadsheet to verify that left and right margins are the same, that the horizontal spacing between things is consistent, etc.
I have read that some developers use formulas to calculate coordinates instead of hardcoding them. But for cases where I keep moving things around in my SVG background and adjusting numbers in the C++ code to match, it would be nice to get a report on the coordinates of everything in my module.
For example, take all controls and ports, sort them primarily by ascending y-coordinate (top to bottom), secondarily by x-coordinate (left to right). Then output as CSV text: each row could be (x, y, label). Anything I can load into Google Sheets to study would be pretty useful.
I would like to look at Īx between consecutive objects on the panel that all have the same y value, to make sure the horizontal spacing is the same. Then I could look at Īy going down the panel, for vertical spacing.
A more advanced version of this could try to do some symmetry analysis and point out coordinates that are not quite lined up right, but that may end up being an AI science project that never ends. Just throwing ideas out there for funā¦
I donāt know if this helps, but when I spec coords to Marc and Paul then when controls are on a grid of rows and columns, I give the centre coords of the top left item (or sometimes bottom left) and give horizontal and vertical offsets for the centres of the other rows/columns. I believe they are coded that way too so items always remain aligned and thereās no need for checking them individually.
yeah i do all our layout to formulae and then write a little layout manager that does the math. Iām happy to share that code.
I actually donāt know if I get access to the widget, as opposed to the module, with the trick I used. If I do though that would be a good one. Dump the position and type of every widget on the screen.
Oooh hey yeah you can.
So I just pushed test which for the module tries to get the widget and if it does just recursively walks the tree printing position and mangled C++ classname.
Iāll leave it as an exercise to the reader to add the constraint tests you want but Iām happy to merge them if you do!
Yeah, I really should do something like that⦠create a visual map, plan what I need, and then use formulas to calculate coordinates. OK, so thatās my resolution for my next module⦠invest a little time coding some alignment formulas that reflect what Iām trying to depict and just let them figure it out.
happy to walk you through how we did it in surge. we had 36 very very regular modules to make and ended up doing it almost all with just straight C++ data structures which drive a layout.
That is really cool! Itās pretty wild that a VCV Rack module can do āreflectionā (like we call it in programming languages like C#). The recursive part is cool, but I think the main thing I would need is a list of top-level objects, omitting info about whatās inside them. (Maybe people developing the innards of compound controls would need that, though.)
What would be really cool is to tie the widget components to the module controls. Basically, if have this in my module:
configInput(AUDIO_LEFT_INPUT, "Left audio");
and I have this in my widget:
addInput(createInputCentered<SapphirePort>(mm2px(Vec( 7.50, 115.00)), module, Elastika::AUDIO_LEFT_INPUT));
then they are tied together by the enum value AUDIO_LEFT_INPUT
. So it would be really cool to output something like
"x","y","id","name"
7.50,115.00,5,"Left audio"
where 5 is the numeric value of my enum value AUDIO_LEFT_INPUT
. This is dirt-simple CSV format that I could pull directly into a spreadsheet and sort however I want, and add formulas or whatever to check things.
I know many developers here dislike Inkscape and SVG, but those of us who use SVG could benefit from cross-referencing the coordinates in the SVG text with this kind of CSV output.
Yes, definitely! Iād like to hear any strategies or ways of looking at things to simplify the process. Especially if it helps me through the part of the design where I keep changing my mind and moving things around!
no size limit but there was a bug earlier where i truncated the display. Are you up to date?
i also call the module dataToJSON method so if you donāt implement that then nothing comes. Do we want the entire json dump or just the module specific json? I figured ārack doesnāt have a bugā so just dod the module bit
Fairly up to date⦠Although STDOUT and HTML donāt work on my Win (yet).
Actually thatās fine for me. Thatās what I need. But I could also use a complete JSON dump. Iām curious how others would use this featureā¦
Iād be also happy to put values to a variable (like DEBUGSTRING) at certain steps of my code and watch it in LintBuddy.
yeah stdout wonāt work on win unless you attach a terminal to rack
html - ugh i need to boot into windows to debug that and i donāt have a windows rack dev env. Anyone want to take a shot at āwrite a file to a temp location in a way that works on windowsā in an ifdef for me with a windows env running? Its literally 30 lines of code. BaconPlugs/LintBuddy.cpp at 9e1944ebf2a9d5fe1245f00d25fe69c53e14ae82 Ā· baconpaul/BaconPlugs Ā· GitHub but I wonāt get a windows env running before thanksgiving looking at my schedule. (I have a windows env for regular dev but not for the rack pretend-its-unix stuff).
This is a somewhat different, but kinda brilliant, idea for a rack dev console. Basically have a module with a scrollable set of text. Have an API in your module where you attach and can send strings over.
I see a lot of ways to write that code, but itās a bit of a different topology than āattach and probeā and requires a library you can include in the āawayā module too. Iāll think about it though.
OK how do I reproduce that truncation then? Which module did you attach to and can I run it?
I saw the JSON limitation in case of
These are all sequencers with a pretty long array in their JSON.