Page 1 of 1
preset drawing bug vertical slider!!
Posted: Thu Nov 22, 2012 9:32 pm
by Nubeat7
hallo, i found a preset drawing bug in the vertical slider, after presetchange it draws the slider upsidedown, the value is ok but the slider is on the wrong side, i think it has something to do with the opposite valuedirection to the drawdirection - value = 0 down / 1 up, but you always draw from the top to the bottom.. the horizontal slider works fine - here you draw in the same direction then the value goes, 0 at the left up to the right... sadly my programmingskills are not enough for that....just watch the fsm i commented inside..
Re: preset drawing bug vertical slider!!
Posted: Thu Nov 22, 2012 9:54 pm
by Nubeat7
Nubeat7 wrote:hallo, i found a preset drawing bug in the vertical slider, after presetchange it draws the slider upsidedown, the value is ok but the slider is on the wrong side, i think it has something to do with the opposite valuedirection to the drawdirection - value = 0 down / 1 up, but you always draw from the top to the bottom.. the horizontal slider works fine - here you draw in the same direction then the value goes, 0 at the left up to the right... sadly my programmingskills are not enough for that....just watch the fsm i commented inside..
ok i found an easy way to solve the problem, just delete the 1- at the "output 0,1-@value" -line in the "mouseMoveCaptured" definition and put it outside the code after the "preset" before the "min max" and it works fine with the presetmanager...
Re: preset drawing bug vertical slider!!
Posted: Thu Nov 22, 2012 11:18 pm
by trogluddite
Well spotted!
A slightly better solution would be to keep the
output 0,1-@value and then reverse the value when the Ruby 'event' method gets an input...
@value = [0,1-v,1].sort[1]This seems to do the same thing, but it has two advantages...
1) VST automation. Putting the reversal after the preset means that VST host automation lanes will be upside down - which could be a bit confusing.
2) you might want a slider where you can set the value from outside the module - for linked together controls, for example. So moving the reversal to the Ruby input event will make sure that this works as expected.
EDIT)
Three advantages...
3) The MIDI CC receiver is also inside the preset - so my code change will put the MIDI CC the right way around too.
Re: preset drawing bug vertical slider!!
Posted: Fri Nov 23, 2012 12:34 am
by Nubeat7
Thanks trog, i knew you were the right man for it

Re: preset drawing bug vertical slider!!
Posted: Fri Nov 23, 2012 3:20 am
by trogluddite
FYI
Reported this to Malc so that the toolbox can be updated for the next release.