Got it! It was a bug in v2.0-dev firmware. The LedDisplayTextField widget was trying to reference the last selected widget (APP->event->selectedWidget) which is not defined in firmware (APP->event was a nullptr). I removed that call and also made it so the rest of the APP context objects are defined now.
I replaced some usages of CenteredLabel which is a widget with just text in the svg/png.
One thing I am not sure how to fix yet is the dynamic labels I have for knob turns. Like the bpm when you turn the clock knob here
You could use the VCVTextDisplay to do that. But it might be easier to keep CenteredLabel deriving from Widget and using draw() to update itself, like you have it.
The MetaModule engine should already be calling the draw() function of bpmLabel. Do you see the initial text being drawn? But it just doesn’t update?
I looked through the code briefly… if that’s what’s happening then I think the problem is that SmallWhiteKnob::onChange() is not called by MetaModule. So the text from the paramQuantity that’s linked to the label via connectLabel is never read after the initial time.
So maybe there’s another way to signal to the label widget that its text should change? The draw() function could maybe read the current value of the knob or paramQuantity?
Or I can look into what it would mean for the MetaModule engine to call onChange for all parameters but I suspect it would be taxing on performance.
I tried just overriding SvgKnob::drawLayer(args, layer); and calling nvgText and it works in vcv but doesn’t show at all in the MM. I tried several different ways and couldn’t get it.
i just tried a black rectangle. VCV Rack show a black rectangle in place of the knob like it should but when I rebuild and load it on to the MM, it shows the knob and no black rectangle.
OK, good! Now the draw() function for the label (not the knob) needs to grab the new text value, since only the draw() function for the label will be called (not the knob’s draw function).
Something like this (though there’s probably a prettier way to do this, I didn’t wan to move big blocks of code around, so I just used forward declarations)
I got the 8seq running on the Meta using your latest Beta / v2.12.12
I realise these are still in development but just feeding back that the 8seq parameters are jumbled up in relation to the jack/knob display alongside when setting up. No biggie and after a bit of trial and error I got it working using the Rebel CLK but for some reason using an external clock input into the Meta didn’t work (but maybe that was my error).
That’s odd, I just tried compiling using your repos and have been playing with the Clock module in a few patches with no issues. The left side of the text is cut-off, but it still seems to be updating the text with the BPM (just missing the first couple digits).
I didn’t try any other modules.
Here’s a test patch I used for a while with no issues (other than the digits being cut-off): Clock test.yml (4.7 KB)
What firmware version are you on, and what SDK commit are you using?
I’m on firmware v2.0.0-dev-12.14 (just released today) and the same SDK as used in that firmware (commit eab57d32a4145da529e39263cd5ee8ffd86fd20d)
No change. I made sure I only had one mmplugin. I made sure to unload and reload the plugin and I either get no updates or it freezes right away loading the SimpleClock.