Cabbage Logo
Back to Cabbage Site

Filmstrip sliders

It was brought to me attention that the use of Csound to control filmstrip sliders only works when a plugin is active. For most hosts this is fine, but for Cubase and Logic it means that the sliders won’t update their images UNTIL you hit play in the host.

To get past this issue, I’ve added a new filmstrip() identifier that you can use with sliders:

filmstrip(“filename”, numFrames, “orientation”) The filmstrip identifier allow users to use a filmstrip style .png to skin their sliders. “filename” is the name of the .png file to be used. numFrames is the number of frames in the film strip image. “orientation” should be ‘vertical’ or ‘horiztonal’. This tells Cabbage which way the frames are aligned. If you leave out the orientation, Cabbage will default to vertical.

An example is shown below (Sliders sourced from https://www.g200kg.com/en/webknobman/gallery.php).

This feature will be available in the following beta build, once it’s complete.

This looks awesome, I can’t wait to try it out!

Does using these filmstrip images for rsliders add much overhead to the effect? With the way I’m using imported macros to re-theme colors, in theory I could easily re-skin every knob with just a few lines of code!

It should be far more efficient than the current way of doing it. And yeah, you could quickly change your entire look and feel by simply swapping out the pngs.

This is epic stuff, thanks Rory! :exploding_head: Is this rslider only, or are h and v sliders already supported too?

I’ve got one or two other things to mess with today (for example, getting a better plan for windows support), but I definitely will take a crack at these ASAP.

I’m seeing something weird in non-filmstripped rsliders… most of my knobs now have a valuetextbox even if they shouldn’t. However, if they get sent messages over the identchannels, the valuetextbox seems to disappear again.

Plus I was having two other problems with filmstripped knobs:
My knobs only turn up part of the way before they disappear. I didn’t think to test it at the time, but is this maybe related to me not using range values scaled 0 to 1?

Also, filmstripped knobs in imported plants seem to break. My knob channels don’t seem to pass information at all. Does something special need to be done to allow them into the parsing lexicon for imported plants too?

Should work for all sliders.

As usual, thank for you taking the time to test! I’ll try to sort these issues asap and get back to you.

So I fixed the problem with the text boxes, thanks for the heads up on that one.

Shouldn’t be any issues with ranges. It’s most like to do with the number of frames. There is an example in the Misc folders. Try that one. Change around the ranges and see if you can break it. My attempts failed thus far.

Or course. Imported plants. The least used, but most labour intensive feature of Cabbage :laughing: I keep threatened to tell more people about these :rofl:

That was my first guess… I tried changing the frames expected, and it gave some pretty bizarre results. Since the size of the knob was steady, my first instinct was that it was something else.

I’ll definitely test with it some more, especially once the text boxes are fixed (I had to step back versions for now)… or imported plants. But this version just wasn’t gonna work for me yet :wink:

If you get my examples running and anything strikes your fancy, feel free to use it or even request me to modify it to fit your needs (chop out macros, etc etc). I think this feature has a TON of potential!

The fixed text boxes should be good to go in about 10 minutes. It’s underway:
https://dev.azure.com/rorywalsh/cabbage/_build/results?buildId=816&view=results

I was also able to use a filmstrip slider with an imported plant?

That’s odd… when it didn’t work for me, I tried a few different path configurations… I was thinking since my plants were loaded from another directory maybe it would take adjusting, but I didn’t have any luck.

I’m not able to test at the moment, but I shouldn’t be much longer than the new build completing. I’ll run it through more tests then. Having the textbox fix means if I can’t get it working, turning them off is still an option without a full reinstall :slight_smile:

Confirmed, textboxes are fixed in even my most convoluted examples.

Everything else appears to be my fault! :rofl: Sorry.

The knob range issue appears to be because I was trying to use the web knob generator at: https://www.g200kg.com/en/webknobman/gallery.php but it looks like my downloaded knob didn’t get all of the frames for some reason. It only has the first ~25%.

And yes, upon further inspection, they were working in imported widgets… however, my test widgets were using knobs that were default turned up to a point where they disappeared due to those same missing frames.

How embarrassing :wink:

In your test with the imported widget, were you able to pass the data from the channel to csound? I still get no data from mine…

I’m wondering if it might be because of macros and/or the order of the arguments for the widget (my filmstrip stuff ends up before the channel in these cases)

If you can prepare a simple example I’ll take a look :wink:

Simple? Hrm… I’ll take a shot, but no promises! :rofl:

This uses a 120 frame vertical oriented knob:

<Cabbage>
; this one adjusts audio
#define KNOB colour(255,0,0,255)
; this one does not
; #define KNOB filmstrip("knob1_grey.png",120)
form caption("Example") size(300, 180), import("FilmstripExample.xml"), pluginid("xmpl")
Widgets pos(30, 30) size(50, 50), channel("gainL"), namespace("Widgets")
rslider pos(30,100), size(50,50) channel("gainR"), $KNOB
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
nchnls = 2
0dbfs = 1
instr 1
	kGainL chnget "gainLKnob"
	kGainR chnget "gainR"
	aSig oscil 1, 440
	outs aSig*kGainL, aSig*kGainR
endin
</CsInstruments>
<CsScore>
i1 0 z
</CsScore>
</CsoundSynthesizer>

And the xml:

<?xml version="1.0" encoding="UTF-8"?>
<plant>
<namespace>Widgets</namespace>
<name>Widgets</name>
<cabbagecode>
	image pos(0,0) size(50,50) colour(0, 0, 0,0) {
		rslider pos(0,0), size(50,50) channel("Knob"), $KNOB
	}
</cabbagecode>
<csoundcode>

</csoundcode>
<help>
  Example to show channels not working with filmstrip identifier
</help>
</plant>

Can you share the png too?

Sure: https://github.com/tgrey1/Flex-Cabbage/blob/master/includes/images/knob1_grey.png

More info: For me, without the filmstrip the knobs control L and R volume respectively.

But with the filmstrip, neither knob controls anything, and I hear silence.

Good spot! I wasn’t attaching a listener to the new filmstrip slider! Should be good to go now. New build underway. Btw, are you noticing any issues with the text caret? It doesn’t show for me in the automated builds, but shows fine in my local builds :thinking:

I tested caret in a few places (combobox items, label text, etc), and didn’t notice anything out of the ordinary… where were you seeing this? Perhaps it’s one of those odd issues that sneaks in when different operating systems behave in minutely different ways that go unnoticed most of the time? Not that I’ve been dealing with that myself… :wink:

I’ve also tested filmstrip rsliders. I haven’t played with h/v sliders AT ALL yet, so some of this feedback might not apply there. It’s amazing and will really transform our ability to skin our cabbages! But here are my initial thoughts, take or leave any of it. I’ve tried to order them by importance.

  • If the filmstrip file is not found, can it fail back to normal rendering? Currently it doesn’t fail gracefully. image
  • Filmstrip knobs don’t update graphically when the channel’s value is changed by a chnset.
  • Filmstrip knobs seem to be ignoring the default value set in range()? Not tested extensively… but seeing it very consistently. LMK if you can’t recreate and I’ll isolate.
  • Support existing valuetextbox and text labels if defined? This would also (hopefully) help the “scale” between the two render methods balance out. Here’s a before and after of the same exact knobs, with the only difference being the png skin applied:

image

image

  • Allow further rescaling of the filmstrip image. If possible, maybe even using the existing trackerinsideradius() directive?

  • Allow cabbage rendered the “tracker”, if user tweaks inside and outside radius sizes to show it (normally “under” the knob)

Sorry, oversight on my part! Of course this should happen.

Interesting, and another thing I didn’t think of testing!

I’ll check thanks.

I should be able to do this.

These suggestions would be quite a bit of work. I’ll add them to the @t_grey list :laughing:

1 Like

Awesome! Glad I was able to find a few corner cases for you… being able to skin this into everything I have written with just a few lines in my include file was AMAZING.

That’s why those two filtered their way to the bottom of that list… :rofl: I already had a feeling they would be the most work for the least reward.

My thought is this would allow fewer knob pngs to be imported for projects that want multiple tracker color indicators (think like an audio mixer, with red on aux sends, blue on eq knobs, white on pan, etc).

It’d be great to have, but yeah… understandably difficult and not a very high priority. Is it safe to guess that the rest of those won’t need GH issues to track since they’ll be shorter term fixes?