I’m interested in porting over some DSP code I’ve written for embedded processors over the last couple years but I’m struggling to successfully compile the tutorial module on the VCV site (this one: VCV Manual - Plugin Development Tutorial).
Compilation isn’t necessarily the issue, rather, what happens after compilation:
An issue with the helper.py script not grabbing the correct coordinates from the .SVG file. This leads to things being placed incorrectly on the front panel.
For example, the LED in the example is located here:
I don’t remember. Let me look…
…it look to me like the default main branch is for 1.x, but there is a branch called v2 for 2.0. Perhaps I should merge that branch and make sure everything is ok, now that 2.0 is out.
On the helper.py issue, are you doing any transforms in Inkscape? It doesn’t parse them (see a few posts starting here) which can result in things getting misplaced (although there could be other reasons. (Like @Squinky I don’t use helper.py, which definitely isn’t necessary, but I can see the convenience).
I didn’t touch the SVG file at all. I was just using the default file from website. I dug into helper.py a little bit and tried to figure out why my components were being scaled. I think I may have found something though. I don’t often use the re library or regex but I wonder if the issue has to do with the ‘scale’ parameter in helper.py
The variable root_width is a floating point number (30.48mm in my case) and I wonder if this expression only accounts for decimal/whole numbers:
if re.match(’\d+mm’, root_width):
Here is the broader snippet where that code comes from:
Ah! Sorry, I read your post too quickly and didn’t get that you were using the tutorial files. If there’s an error in those it should definitely get fixed ASAP!
On a glance I think you might have found the issue already in the re; nice work!
As to other approaches, what a lot of people do is either figure out all of the coordinates by hand or use a bunch of LEFT_MARGIN and PORT_SPACING type local constants to make things easier to tweak.
I’ll try to repro the crash in a bit (as well as double-checking the Inkscape thing to corroborate your findings). Do you have an easy way (github etc.) to post the final code you’re compiling that causes the crash?
Welcome to the forum, by the way! Once the toolchain stuff is sorted out, I’m looking forward to hearing what your DSP ports are (if you’re planning on making them public, that is).
Yes! I think I ran through the tutorial a dozen times now so I don’t think I’m missing anything but who knows. On another note, i think I fixed the regex expression to account for floating point numbers by using the following:
if re.match('[+-]?([0-9]*[.])?[0-9]+mm', root_width):
scale = 1
Seems to work OK (See screenshot below). Note sure where this is being repo’d but if that is the issue and someone could review and fix it, that would be great.
Yes I’ll try and commit something to GitHub tomorrow for others to review.
Is there anywhere where I can grab a crash report or something to help diagnose why I’m getting the following error when I open VCV Rack? It has to be associated with the module I’m compiling, because when I delete it, it stops showing up.
JCL on a punch card deck with in-stream DD containing your Fortran IV program and another in-stream DD for the input to said program which you had to hand in to the computing centers front desk, and the results of which you could pick up as a stack of chain printed fan-fold zebra paper the next day. The horror indeed. Especially if you had a syntax error in your JCL or Fortran IV program and had to do it all again.