Cabbage Logo
Back to Cabbage Site

Knobman sliders

Just modified the UDO so that the value for the slider’s min/max gets normalized to 0 - 1

opcode filmStrip, 0,Siiikkk
	Sident, iframes, iWidth, iHeight, kval, kmin, kmax xin
	knorm = (kval - kmin) / (kmax - kmin) ; normalize min and max values to 0 - 1 range
	if changed(kval) == 1 then
		SMessage sprintfk "crop(0, %d, %d, %d)", int(knorm*iframes)*iHeight, iWidth, iHeight
		chnset SMessage, Sident
	endif
endop

this also changes the UDO call to something like

    iknobW = 50 ;knob width
    iknobH = 50 ; knob height
    iframes = 100 ; number of image frames
    
    
    filmStrip "rsliderIdent1", iframes, iknobW, iknobH, kchop, 0.03, 0.5

where 0.03 is the min and 0.5 is the max

1 Like

why your example(KnobImageSlider) knob can’t rotate ?

One doesn’t rotate Knobman images. We just move through the frames which is what this example does. Btw, there is a new rotary slider look and feel with the latest version of Cabbage that you might prefer to use over the older one.

U have example complete code ? if you have you can send to me. I want make custom knob sliders thanks .

The full example is in the Examples folder under Miscellaneous…

I see it already. but I get a problem as why knob can’t rotate.

Or if knob will rotate must be file .svg ? in example Miscellaneous file import is .png

Hi , I’m very new to cabbage audio or any programming but I am trying to learn how to make plugin.
Somehow, knobman-slider code in the example does not let me scroll thru the knobman stitched image when I run the example code. It shows the image but it does not look scroll to next frame . The value in the popup keeps changing when I drag the knob image. I have just installed latest cabbage software in win10 environment. Dose anyone have any clue ?
Please advise .
When I installed cabbage software, one .dll file could not be installed . Is this the reason?

Hi , I solved my issue written in one above comment!! .
I solved it by changing my audio device setting sample rate to 44,1kHz from 48kHz.
I don’t know how this audio device setting is related to this issue.

Hi @Dixy, can you let me know the version number you are using? I thought this issue with sampling rates and audio settings was fixed :thinking:

I just checked here myself and I see the issue persists. :fearful: I’ll take another look and see if I can find a fix.

Hi @Dixy. There is a new version available here that addresses this issue. I quickly tested on Windows and OSX and it seems to work fine now. Let me know if you’ve any further problems.

Hello Rory

Thanks for the bug fix!
It looks fine now.