floating point sliders

Eric Lyon's icon

Feature request: As MIDI gradually recedes in favor of OSC or something like it, it will be increasingly useful to have graphic controllers that output floating point values, rather than integers. It would be great to have new versions of horizontal, vertical and pic sliders, along with knobs, that output floats. There is one existent object, multislider, which has this option, though in float mode its resolution appears to be controlled by the size of the object, which is a bit weird.

In any case if the integer controllers are updated, it would be even spiffier, while you're in the neighborhood, to add alternative mappings (exponential, power, user-drawn, spline, whatever) and maybe other enjoyable features. It just seems that whenever I throw down a slider, I immediately have to follow up with a zmap, which gets a bit old.

Thanks for considering this!

Eric

Andrew Benson's icon

In the meantime, you should have a look at JSUI. There are a number of
UI objects already written for you that use floating point.

Cheers,
Andrew B.

barry threw's icon

Is there any other option than for the resolution to be determined by
the size of the object? You only have a limited number of pixels. The
resolution can't be any more than that, right? Or am I missing
something? I haven't tested this object to see quite what you are
referring to...

--
barry threw :: sound | (if you would see the stars clearly,
http://www.barrythrew.com | look hard at the surrounding darkness)
bthrew(at)gmail(dot)com | -Ooka Makoto
857-544-3967 |

Eric Lyon's icon

You could limit the resolution to yield predictable results. The extreme case of this is an integer slider which puts out the same integers for a given logical position on the slider, irrespective of slider size. But you could quantize to other levels (nearest 0.25 or whatever). In most cases, it doesn't matter but in some cases it might. Where predictability of output is really important the slider size could be fixed, as in the keyboard slider.

Eric

Michael Hastings's icon

This is a really newbee question, but isn't there just a way to add a math object after the slider to then have the slider output float numbers? If there is, I would really love a quick refresh. Thanks!

José Manuel Berenguer's icon
tim_thompson@mac.com's icon

Quote: Dj_ICN wrote on Sun, 03 September 2006 17:11
----------------------------------------------------
> This is a really newbee question, but isn't there just a way to add a math object after the slider to then have the slider output float numbers? If there is, I would really love a quick refresh. Thanks!
----------------------------------------------------

Yes, there are plenty ways to do this, including (as has been mentioned) zmap or just dividing/multiplying by a float. Eric is suggesting that building this versatility into the sliders would be nice.

The talk about higher resolution UI objects and OSC has reminded me of something I have yet to hear any comment on. Has anyone used the Lemur enought to say anything about functional control resolution? It seems as if its ability output data at a high resolution would be limited by the nature of a touchscreen interface...(?)

vade's icon

or use multislider with 1 slider?

v a d e //

www.vade.info
abstrakt.vade.info

On Sep 3, 2006, at 6:00 PM, Tim wrote:

>
> Quote: Dj_ICN wrote on Sun, 03 September 2006 17:11
> ----------------------------------------------------
>> This is a really newbee question, but isn't there just a way to
>> add a math object after the slider to then have the slider output
>> float numbers? If there is, I would really love a quick refresh.
>> Thanks!
> ----------------------------------------------------
>
> Yes, there are plenty ways to do this, including (as has been
> mentioned) zmap or just dividing/multiplying by a float. Eric is
> suggesting that building this versatility into the sliders would be
> nice.
>
> The talk about higher resolution UI objects and OSC has reminded me
> of something I have yet to hear any comment on. Has anyone used
> the Lemur enought to say anything about functional control
> resolution? It seems as if its ability output data at a high
> resolution would be limited by the nature of a touchscreen
> interface...(?)
> --
> Tim Thompson
>
> Assoc. Professor
> Palm Beach Atlantic University
>
> dorkbot-sofla
> http://dorkbot.org/dorkbotsofla

Michael Hastings's icon

Well I want to thank everyone for their response to my question, I'm just not getting it, maybe I just need to spend some more time with the tutorials...
I have my slider set for BPM's, then I have it connected to a message box for displaying the BPM. After that I have it connected to a math box !/ 60000 for the milliseconds (I'm working on a very basic metronome...).
But when I try and add a divide or multiply by a float box it doesn't do anything to the message box's displayed number. I'm afraid I will just need a step by step explanation of what to do...

sorry everyone, I feel bad asking for such a basic question. I am taking a class on this, but the instructors gone for this next week, and I don't have any email addresses of my other classmates.

tim_thompson@mac.com's icon

Quote: Dj_ICN wrote on Sun, 03 September 2006 20:31
----------------------------------------------------
> Well I want to thank everyone for their response to my question, I'm just not getting it, maybe I just need to spend some more time with the tutorials...
> I have my slider set for BPM's, then I have it connected to a message box for displaying the BPM. After that I have it connected to a math box !/ 60000 for the milliseconds (I'm working on a very basic metronome...).
> But when I try and add a divide or multiply by a float box it doesn't do anything to the message box's displayed number. I'm afraid I will just need a step by step explanation of what to do...
>
> sorry everyone, I feel bad asking for such a basic question. I am taking a class on this, but the instructors gone for this next week, and I don't have any email addresses of my other classmates.
----------------------------------------------------

First, there are objects that provide metronome functions: metro takes as its argument the number of ms between output bangs, and tempo~ allows you to input a BPM value and specify a meter type, and has separate outputs for downbeats, other beats, and beat divisions.

To your question, when you say a message box, do you really mean a message box, or a number box? Do you need to use a message box to supply an object with a message? (Most objects that take int or float values in an inlet will accept just the value).

If you really mean it is a number box that doesn't change, then ensure it is the float variety, rather than the integer variety. If you are sending float values from 0. to 1., then an integer numbox will only show 0 or 1.

If you really mean it is a message box, then you can do a couple of things: have the float value go to a prepend object with the first part of the message as an argument (e.g. 'prepend set tempo' or whatever), or you can put your message box there and type the message and use $1 to hold the place for the variable (the floats as they come in). This latter message will cause the message to be output everytime the value changes. If you want to trigger the message at certain times, then preced the message box with a prepend object: 'prepend set mymessage $1'. This will set the message box without sending the message. Then you can provide a bang directly to the message box when you are ready to send it.

Does that help? See help files for message, numbox, prepend, metro, tempo.

tim_thompson@mac.com's icon

correction (sorry)--to set a message box ending with an incoming value, use prepend object: 'prepend set yourmessage' (in my last post, I accidentally added a variable...

Tim

Michael Hastings's icon

Thanks a lot, I think that was very helpful. I will try this out, and I'll let you know how it goes. =)

Michael Hastings's icon

I figured it out. I feel pretty stupid, I just didn't put a 0 in front of my .5 in the * object box. Thanks all, I feel soo much better I got that out of the way!
Thanks all =)

tim_thompson@mac.com's icon

That shouldn't matter--Max accepts [* .5] as the same thing as [* 0.5]. In any case, I'm glad you got it worked out.

Roman Thilenius's icon

>There is one existent object, multislider, which has this
>option, though in float mode its resolution appears to be
>controlled by the size of the object, which is a bit weird.

... hu? maybe a new bug in the last update? :)

Stefan Tiedje's icon

Tim wrote:
> The talk about higher resolution UI objects and OSC has reminded me
> of something I have yet to hear any comment on. Has anyone used the
> Lemur enought to say anything about functional control resolution?
> It seems as if its ability output data at a high resolution would be
> limited by the nature of a touchscreen interface...(?) -- Tim
> Thompson

This is for sure true for screen objects, usually limited to the screen
resolution, highest resolution is one pixel, I am certain that there is
a physical limit of resolution to a lemur as well...

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

Stefan Tiedje's icon

Roman Thilenius wrote:
>>There is one existent object, multislider, which has this
>>option, though in float mode its resolution appears to be
>>controlled by the size of the object, which is a bit weird.
>
> ... hu? maybe a new bug in the last update? :)

neither weird nor a bug: bigger size, more pixels...
(a mouse is never more accurate than one pixel)

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

Roman Thilenius's icon

Quote: Stefan Tiedje wrote on Sun, 10 September 2006 08:49
----------------------------------------------------
> Roman Thilenius wrote:
> >>There is one existent object, multislider, which has this
> >>option, though in float mode its resolution appears to be
> >>controlled by the size of the object, which is a bit weird.
> >
> > ... hu? maybe a new bug in the last update? :)
>
> neither weird nor a bug: bigger size, more pixels...
> (a mouse is never more accurate than one pixel)
>
> Stefan

are you suggesting eric lyon or me wouldnt know this. :P

Stefan Tiedje's icon

Roman Thilenius wrote:
> are you suggesting eric lyon or me wouldnt know this. :P

How could I... just to give our newbies less confusion...
All will go into the archives !!! Brave new world...

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

Matthew Aidekman's icon

coming in half way. Risking sounding obvious.

most JSUI have shift-drag and option-drag which. also, making your
cursor invisible means that for every 10 mouse pixels move, you may
increase the value .0001 hows that for accuracy?

heres another hint: endless encoder.

-matt

. . . . . . . . . . . .
Http://www.EstateSound.com
Http://ideasforstuff.blogspot.com
. . . . . . . . . . . .

Roman Thilenius's icon

Quote: Matthew Aidekman wrote on Mon, 11 September 2006 08:51
----------------------------------------------------
> coming in half way. Risking sounding obvious.
>
> most JSUI have shift-drag and option-drag which. also, making your
> cursor invisible means that for every 10 mouse pixels move, you may
> increase the value .0001 hows that for accuracy?
>
> heres another hint: endless encoder.
>
> -matt

well now that is a useful request; make all max objects
behave like the sliders in the pluggo runtime.

but i am still not getting the original topic about
interpolated resolution of sliders.
when i use a sider of 10 pixels size, i am getting 0.1
at pix 1 and 0.5 at pix 5, just as exspected.
how could it be more accurate?

Stefan Tiedje's icon

Roman Thilenius wrote:
> when i use a sider of 10 pixels size, i am getting 0.1
> at pix 1 and 0.5 at pix 5, just as exspected.
> how could it be more accurate?

put a line in between to get interpolated values, but the endpoints just
can't be more accurate... There is no information whatsoever of anything
inbetween...

But wait, No! that's not true: If you like to drag very slowly, you get
more resolution, but have to move a big amount of pixels (it just feels
not correct, if you move the mouse and the slider almost doesn't move):

Max Patch
Copy patch and select New From Clipboard in Max.

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com