Page 1 of 1

Numeric input

PostPosted: Mon Sep 06, 2010 9:43 am
by flowstone
How do I enable a numeric input field on a front panel and have it coexist peacefully with a slider or knob? For example, in this simple function generator using the slider to sweep over a range is nice, but sometimes it is helpful to have exactly x freq or y level. Using a float data component works OK a the component level for such specific input, but as far as I can tell, it's only possible to display a float label at the module level--which is only for reporting the value, not adjusting it. Ideally, such an input would alter the slider position appropriately. I tried to use the "edit box", but can't seem to iron out the string - float conversion, thus get some undesired results. Thanks for your help!

Re: Numeric input

PostPosted: Mon Sep 06, 2010 7:10 pm
by Exo
The edit box should work ok.

Can you post an example of the issue your having using it?

I do have a more advanced edit box if your interested. Where one can drag and change the values in the edit box.

Cheers ;)

Exo

Re: Numeric input

PostPosted: Mon Sep 06, 2010 8:48 pm
by flowstone
Here is as close as I have been able to get.

The good: The frequency and level inputs can be changed by either the edit box or the slider.

The bad: The edit box display doesn't update until clicked on, requiring a redundant float label for display purposes. Plus, the edit box on the level side starts full of digits after clicking, due to the math operations beforehand. Any way to round a float of a specified number of digits? Also, the edit box has no provisions for units, font size, alignment, and other formatting elements like the float label to make the front panel look nice and clean. I'm staring at the guts of the float label, but what I'm looking for seems to be inaccessible from the edit control module.

Re: Numeric input

PostPosted: Tue Sep 07, 2010 2:12 pm
by Exo
It is possible to update the display but requires an extra redraw component. (which should be in there already I guess.)

But really rather than work around the limitations of the edit box just use mine. :)

My version works by having a nice display on show which is draggable to change the values. Then it only switches to the basic edit box display when double clicking the display.

I took the liberty of hooking everything up for you, the "slider with drag edit box" is a module I made long ago.

If you look inside the slider you will see where to route values back into the slider. These values must always be in the 0..1 range even if your slider is set to a bigger range, hence the drag edit box actually outputs 0..1 values.

By the way sorry if it's seems like I'm just doing stuff for you rather than helping you to work stuff out your self. But I've been working around many of flowstones/synthmakers limitations for years, so have much better solutions for many things.

Cheers ;)

Exo

Re: Numeric input

PostPosted: Tue Sep 07, 2010 7:43 pm
by flowstone
Exo,

That's super helpful, thanks! I'm still on the steep part of the learning curve with respect to GUI-related aspects of Flowstone, so some working examples are really helping me understand it better. Thanks a bunch for sharing your knowledge!

Clayton