VoltageKnob - MaxValue???

User avatar
Waverley Instruments
Posts: 129
Joined: Thu May 05, 2022 2:10 pm

Re: VoltageKnob - MaxValue???

Post by Waverley Instruments »

Well, I do actually have controls that go up to 11, but I think I should probably re-phrase what was typed as a quick aside without much thought, but now seems to be the bone of contention that eclipsed the original question.
Waverley Instruments wrote: Thu Jun 08, 2023 9:23 amI should be able to set the value to whatever I like programmatically, including values outside the UI range.
I'm actually OK with the ability to set the value to whatever I like programmatically, including values outside the UI range.

I figure if you're going to do that, you've probably got your reasons and who am I to judge.

Alternatively, if you don't trust yourself not to do it accidentally, write your own code to validate, clamp, or throw an Exception (heaven forbid...)

-Rob
Centripidity
Posts: 140
Joined: Sun Jan 22, 2023 5:18 am
Location: Melbourne
Contact:

Re: VoltageKnob - MaxValue???

Post by Centripidity »

ColinP wrote: Thu Jun 08, 2023 2:34 pm So this isn't actually a Spinal Tap spoof then?
:lol:
User avatar
seal58
Posts: 351
Joined: Fri Jul 12, 2019 5:28 pm
Location: Rostock, Germany
Contact:

Re: VoltageKnob - MaxValue???

Post by seal58 »

Well - a hot debate, but without an answer to my question.
As programmer I use to think strictly logically. On this thinking a maximum IS a maximum, not MIGHT BE a maximum.
I'll ask CA team and will report their answer.
User avatar
Waverley Instruments
Posts: 129
Joined: Thu May 05, 2022 2:10 pm

Re: VoltageKnob - MaxValue???

Post by Waverley Instruments »

seal58 wrote: Fri Jun 09, 2023 6:37 pmWell - a hot debate, but without an answer to my question.
Apologies, as I thought I'd answered your question with my first post before it got derailed into a software best practices debate / lecture. Anyhoo, I can confirm, your observation is correct, in that SetValue() can set a value outside of the range previously specified in SetRange() for a VoltageKnob.

Whether we like it or not. Ahem. :D

I think I already suggested if that's a big deal, then concerned citizens should report it as a bug.

-Rob @ WI
User avatar
seal58
Posts: 351
Joined: Fri Jul 12, 2019 5:28 pm
Location: Rostock, Germany
Contact:

Re: VoltageKnob - MaxValue???

Post by seal58 »

Here is the CA answer:
Danny L

Staff – 10 hours ago via Email
Hi Roland,

This appears to be a bug - calling GetValue() will return a different value than the actual value if you've called SetValue() with a value that's out of range. In the meantime, we suggest that you bounds-check the values before calling SetValue().
I have logged a bug report on this and notified the developers as well.
UrbanCyborg
Posts: 588
Joined: Mon Nov 15, 2021 9:23 pm

Re: VoltageKnob - MaxValue???

Post by UrbanCyborg »

Good to know. Thanks, Roland.

Reid
Cyberwerks Heavy Industries -- viewforum.php?f=76
Post Reply

Return to “Module Designer”