From: Steven S. <ste...@co...> - 2005-04-01 22:25:30
|
Bill Zwicky wrote: > Steven Schmidt wrote: > >> I’ve been casting it as a byte and while it seems to work up to a >> point – I’m not getting the negative values to display. >> I thought it should work the way I’m doing it, but it stops at zero. >> Please have a look at this snippet and make recommendations if you >> can: >> The purpose of this method is to subtract the max value for the >> widget if the param value is greater than the max value. > > You realize that "the math" prints get()+max-max, which is the same as > rawval? So if rawval has the right value, then you don't have a > problem. What is the value for min and max? If max is less than zero > but the spinner control itself won't go negative, then we have a bug. > Try using a SliderWidget, I know those work. > > -Bill Yes - min val is less than zero and the spinner won't go negative, although it does go negative in other instances. This: addWidget(p21_osc18va, new SpinnerWidget("**Tune", patch, -1200, +1200, -128, new TritonMultiCompModel(patch, 311, 1,1200), new TritonSender(311)), 3, 8, 1, 1, 15); displays the correct value of -5 for the MSB/LSB combo of 7f 7b (I haven't looked at why I had to subtact 128 (base val) to get it right, but that's a suspiciously even number) So, have we a bug? I'll try a slider and see if I have the same problem and report back. |