dustinlacewell / vcv-minilab3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What do the base classes do, and are they thread safe?

squinkylabs opened this issue · comments

It's difficult for me to know what and why BaseWidget exists. Looking at createRelativePort is seems that every time you make a port you add a context menu item. Is every widget you make really going to want to do that?

But, lacking any comments on what these classes do it’s difficult for me to guess the intention of these. It's totally norm to have no comments explaining what the class are or what they are for, btw. (although again it would not pass muster at work).

One thing that I can’t really evaluate is the abstractions you have built around the SDK classes. It’s difficult to a) know what they are for, but b) to tell is they are thread safe. For example, it looks like BaseParam objects are shared between the UI Widget and the audio processing Module. I know that the way the SDK shares params works, but I don’t know if this code works. It probably does, but I don’t really know which pieces it are called from multiple threads, so I can’t really have an opinion on that.

The base classes are definitely conveience for adding absolute/relative params with the standard suite of options. Surprisingly, yeah all the outputs on both modules all have voltage and slew controls, with relative params adding encoder strength.

Thread safety is something I'll have to think about.