If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Bitmap knob arc
19 posts
• Page 1 of 2 • 1, 2
Bitmap knob arc
Is there a way to limit/define the arc of rotation of a bitmap knob, without altering the Drag XY input floats; in other words limiting the visual arc while retaining it's 0-1 float output.
Website for the plugins : http://kbrownsynthplugins.weebly.com/
- k brown
- Posts: 1198
- Joined: Tue Aug 16, 2016 7:10 pm
- Location: San Francisco, CA USA
Re: Bitmap knob arc
Yes, there is the start angle and sweep angle, you can change in the arc module
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
Re: Bitmap knob arc
In the old Vector knobs, yes; but I've yet to find a Bitmap knob with an arc module in it, that's why I'm askin'.
Website for the plugins : http://kbrownsynthplugins.weebly.com/
- k brown
- Posts: 1198
- Joined: Tue Aug 16, 2016 7:10 pm
- Location: San Francisco, CA USA
Re: Bitmap knob arc
You can do it in principle, but I don't think I've ever seen it done.
Most bitmap knobs use a "strip" of animation frames where the first frame represents the graphics for the "zero" output, the last frame represents the "one" output, and the frame index is just linearly interpolated in between. But that's just the most simple method - there's nothing to stop you from using any maths you like to map the 0..1 range to animation frame indexes.
Usually, there aren't any animation frames for the knob pointing downwards, as they wouldn't be used. But if you had frames covering the full circle, you could use modulus 360 degree maths to allow completely arbitrary arc limits for each control.
Most bitmap knobs use a "strip" of animation frames where the first frame represents the graphics for the "zero" output, the last frame represents the "one" output, and the frame index is just linearly interpolated in between. But that's just the most simple method - there's nothing to stop you from using any maths you like to map the 0..1 range to animation frame indexes.
Usually, there aren't any animation frames for the knob pointing downwards, as they wouldn't be used. But if you had frames covering the full circle, you could use modulus 360 degree maths to allow completely arbitrary arc limits for each control.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Bitmap knob arc
Setting different values for the Drag Y works fine for creating a short arc (and green maths to restore the output range to 0-1); the hangup is getting it stepped. With Y changed to say 0.25 to 0.75, you get a nice, centered ~100 degree arc, but now the step greens don't work. The whole reason for wanting a short arc knob is to make a selector switch with say, four positions. Must be a way to math it up in the right place to get steps, with 0.25 to 0.75 Y range, no?
Last edited by k brown on Sat Jun 20, 2020 10:27 am, edited 2 times in total.
Website for the plugins : http://kbrownsynthplugins.weebly.com/
- k brown
- Posts: 1198
- Joined: Tue Aug 16, 2016 7:10 pm
- Location: San Francisco, CA USA
Re: Bitmap knob arc
Working with angles is not as scaring as it might seem.
Getting position from angle on unit circle, add radius and you can draw your own arc:
The opposite is the function atan2, a variation of the arcus tangens:
Getting position from angle on unit circle, add radius and you can draw your own arc:
- Code: Select all
x = radius * cos(angle)
y = radius * sin(angle)
The opposite is the function atan2, a variation of the arcus tangens:
- Code: Select all
angle = atan2(x, y)
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Bitmap knob arc
Can anyone offer a solution for a knob that's not code-based - you know, a bitmap knob full of greens, not a Ruby one.
Website for the plugins : http://kbrownsynthplugins.weebly.com/
- k brown
- Posts: 1198
- Joined: Tue Aug 16, 2016 7:10 pm
- Location: San Francisco, CA USA
Re: Bitmap knob arc
There is the Arc module which is not code based, you can easily add an arc to any existing knob.
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
Re: Bitmap knob arc
You mean the GUI Arc? - that just draws a line doesn't it?; nothing to do with the rotation angle of the knob, much less create steps within the defined arc of rotation.
Maybe I need to restate my original question more fully/clearly:
I have a bitmap (old-style greens-based, not Ruby) knob; has the usual what is it - 270 degrees rotation. I want it to have only about 90 degrees of rotation for use as a selector switch, like a hardware rotary switch. Within that 90 degree arc, I want it have say four steps. This is all easy-peasy with the old SM Vector knobs; everything you need is already in there.
Like I said, I can get the angle of rotation I want by different values for the Drag Y prim min/max inputs; I just can't figure out how to then get steps within that new arc. The Step module in the knob no longer does it's thing, with the Drag Y values changed.
Maybe I need to restate my original question more fully/clearly:
I have a bitmap (old-style greens-based, not Ruby) knob; has the usual what is it - 270 degrees rotation. I want it to have only about 90 degrees of rotation for use as a selector switch, like a hardware rotary switch. Within that 90 degree arc, I want it have say four steps. This is all easy-peasy with the old SM Vector knobs; everything you need is already in there.
Like I said, I can get the angle of rotation I want by different values for the Drag Y prim min/max inputs; I just can't figure out how to then get steps within that new arc. The Step module in the knob no longer does it's thing, with the Drag Y values changed.
Website for the plugins : http://kbrownsynthplugins.weebly.com/
- k brown
- Posts: 1198
- Joined: Tue Aug 16, 2016 7:10 pm
- Location: San Francisco, CA USA
Re: Bitmap knob arc
I still dont really understand it. Is this what you mean? The arc only goes about 90 degrees and not the full angle of the knob. You can change this to whatever you like.
- Attachments
-
- sweep knob.osm
- (5.61 KiB) Downloaded 1335 times
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
19 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 9 guests