logarithmic slider for frequency

Discussion about the Bidule SDK, post your questions, feature request and plugins here.

Moderators: davidv, seb@plogue

dts350z
Posts: 1521
Joined: Thu Jan 15, 2009 1:18 pm

logarithmic slider for frequency

Postby dts350z » Mon Jan 17, 2011 7:39 pm

How to make a frequency slider with decades (20, 200, 2k, 20k)? Given:

Code: Select all

enum ScalingMethod {
         SCALING_LINEAR, SCALING_SQUARE, SCALING_CUBE, SCALING_GAIN10
      };
      //SCALING_GAIN10 will display like -oo, 10db but will get/set the linear value


Or can I do octaves with SCALING_SQUARE (20, 40, 80, 160, 320...)?

seb@plogue
Site Admin
Posts: 9592
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: logarithmic slider for frequency

Postby seb@plogue » Tue Jan 18, 2011 10:00 am

The square and cube scaling are barely used inside Bidule so I'm not sure they would be working fine.

20 * pow(10, x) where x would be 0 to 4 could give you the scale you want but that won't give you display on the slider, you could come up with a similar formula for the other case alas again without display.

dts350z
Posts: 1521
Joined: Thu Jan 15, 2009 1:18 pm

Re: logarithmic slider for frequency

Postby dts350z » Tue Jan 18, 2011 12:57 pm

I messed around a little with SQUARE and it seems ok as far as the scale for usable control of freq. from 0 to 22500 Hz.

What might not work? Parameter links? Relative Parameter Modulation?

seb@plogue
Site Admin
Posts: 9592
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: logarithmic slider for frequency

Postby seb@plogue » Tue Jan 18, 2011 1:14 pm

Relative will most likely only increment linearly, for the rest the part where scaling matters is usually parameter linking where values are "un-scaled" (i.e. brought back to a 0-1 interval) and "scaled" to the target parameter (brought back to the min-max interval using the scaling)/

dts350z
Posts: 1521
Joined: Thu Jan 15, 2009 1:18 pm

Re: logarithmic slider for frequency

Postby dts350z » Tue Jan 18, 2011 2:36 pm

OK, I think for now I'm only considering this for a human to move the slider. No links or PMs.

Thanks


Return to “Bidule SDK”

Who is online

Users browsing this forum: No registered users and 1 guest