SlickFader

Fader Control based on specific requirements

(24 Votes)
1.1 (Updated 20 years ago)
17.5kB
March 28, 2005
Reaktor 5 or lower

DESCRIPTION

I wanted a fader with the following behaviors:

1) If you click on the thumb, the thumb is draggable.
2) If you click outside of the thumb, the thumb should automatically snap to the new position.
3) Accurate to the pixel.


Two days and four Advil later, I finished SlickFader.



If you want to change the bitmap I used, here's the steps you need to take:
-- To get 100%-pixel-resolution while you drag, you'll need to change some settings on the MultiPicture control (it can be found at the first-level within my macro):

OutputRangeY Max = [Pixel Height of bitmap]
OutputRnageY Min = 1
OutputRangeY Stepsize = 1
OutputRangeY NumSteps = [Pixel Height of bitmap - 1]
OutputRangeY MouseReso = [Pixel Height of bitmap - 1]


-- Now, you need to set the inputs to the macro with appropriate constants:

Init - Pixel-offset from the lowest thumb-position to initialize to.
cPxl - Pixel Height of bitmap
cTh - Pixel Height of thumb
cTop - Number of pixels in border at the top of the fader (i.e. number of pixels above the thumb at its topmost position)
cBot - Number of pixels in border at the BOTTOM of the fader (i.e. number of pixels BELOW the thumb at its lowest position)


------------------------------
v1.1: Added a prettier graphic; Added support for snap-values.

COMMENTS  (6)

ant stewart
19 years ago
It can be using CPU as something to do with internal wireless controls and MIDI controls which does bugs. must say it's not a complete upload until it is usable in any ensemble like a normal panel element with the recall- it looks really great I'm definitely going to try it
tymes2
20 years ago
Thanks for your effort. Ido! Hopefully other users find snap support useful ;-)
Ido Benshachar
20 years ago
Jo, I took a look at the performance issue you mentioned. Since the fader is event driven, there should be 0 events while the fader isn't being moved. (I verified that 0 events are firing in the control's steady state using debugging macros.) I'll try and find out more on the ReaktorBuilderForum to see why a purely event-based macro is taking CPU. Also, I added simple snap-support for you.
tymes2
20 years ago
...well, without snap recall you couldn't use it in ANY ensemble ;-) unless you'd never use snaps. CPU wise, it was some 0.7% on my laaaaame G4/500. But still, with lots of faders, this would add up - without making any noise. Just had a brief look under the hood - lots of logic there...
Ido Benshachar
20 years ago
Jo, good point about snap recall. It wasn't my main focus on this, but I'll definately try to add it as I get time. As far as CPU, I'll take a look. Thanks! -Ido
tymes2
20 years ago
Works very well - except snap recall. It does eat quite some cpu cycles, though...
now