david-c14 / SubmarineFree

Free plugins for VCV Rack
Other
48 stars 10 forks source link

AO-1xx: Remove 100V limit on C value #181

Open DaveBenham opened 2 years ago

DaveBenham commented 2 years ago

The AO-1xx modules seem to have no constraint placed on the computed value. I really like this feature - it definitely comes in handy.

Yet the C value is constrained to <= 100! When doing frequency/wavelength calculations, I frequently need values greater than 100, and I find myself having to do a basic computation in stages to get around that limitation.

Please remove the limit on the C value. At least support values in the tens of thousands.

Another potential issue, the C value precision can not go lower than 0.01. I can imagine that becoming a problem at some point.

Perhaps you could always support 5 digits of precision, regardless of the magnitude. Then the C value can go as low as .00001 and as high as 99999, and the value would always fit in the display without changing the module layout or font.

david-c14 commented 2 years ago

How would I use the knob (dragging the control) to set values in such a huge range?

DaveBenham commented 2 years ago

Honestly, I never even realized you could drag the control to set the value. I always right clicked and keyed in the value.

You have a point, dragging to such large and small values would be next to impossible. But is dragging to 100 really any better? (Well of course it is better, but it still seems impractical once you get outside of -10 to 10.) Or am I missing some dragging shortcut for large values?

Nysthi allows dragging individual digits in many of his modules, but I never liked that solution, at least the way he has it implemented, because then I cannot key the value in.

Given that dragging is nearly pointless for a value like 100 anyway, I don't see any harm in extending the range as I suggested.

But if that is something you are not comfortable with, then I can certainly live with the module as it is. It is just a bit awkward for some formulas.

david-c14 commented 2 years ago

I'm still thinking about this. It might make sense to allow a variable range on these, maybe a right click option to change the range. I couldn't go a far as 10 significant digits, because floats don't have that precision, but you wouldn't need to have 5 decimal places at the same time as going up to 10,000. It might be workable.

DaveBenham commented 2 years ago

Thanks for continuing to explore possibilities.

Right. That is what I meant by 5 digits of precision - 5 different ranges for each power of ten max value: (well, 10 ranges with the negatives)

.00001 - .99999 1.0001 - 9.9999 10.001 - 99.999 100.01 - 999.99 1000.1 - 9999.9 10000 - 99999

Not sure how to display 0.

If someone keys in more significant digits, then round to 5 digits: 12345.67 -> 12346, 123.4567 -> 123.46

I suppose a context menu option to pick range/precision could work, and then the drag feature would work about as well as it does now. That would certainly solve the number of decimal digits to display with 0.

Ideally you can always key any value between -99999 and 99999, with any number of decimal digits, and the number of decimals would automatically adjust to preserve 5 digits of precision, and automatically set the context menu range in the process. But even if the selected context menu range is a hard limit, it would still be a significant improvement for me.

Thanks