SynthMaker

knob rotation based on mouse position

Archive · 2008 10 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

instajungle ·

HI SM community !!!:D

My question is:Can I have knob that can be rotated just like a real knob?

for instance:I want to have a simple vector knob but instead of increasing the value using Y axsis of the mouse .I would like to increase the value using the position of the mouse kinda like when you right click on the knob and it jump rigth to the position where you clicked.instead I would want it to update as you click and move the mouse over it in a circular way.

some bright ones might have already guessed i'm working on an interactive touchscreen controller and I want to get rid of that one last step wich is blocking me from everything else.Basically what I want is to be able to turn the knob just like a "real one" using the mouse position.this is because I think that it is not so interactive to virtually turn the knob using Y axis on a touchscreen based interface it is probably much more interesting to just turn the knob using the single twist of a finger.And I'm mostly sure it is possible to acheive such a result since SM is very powerfull in converting data type .I hope you people get my point . I'm looking forward to hear you dear community!!!!

oddson ·

It's doable... I thought someone had made such a thing long ago but I can't locate any thread on it.

What you'd need to do is calculate the angle from the centrepoint of the knob when the person first clicks down and then calculate the change of angle based on the current xy coordinates.

I have some modules that will help (xy to polar coords) that are from the xy pad thread. They should be in this OSM (but I can't check because I'm away from my SM machine):

CircleXYpolar.osm

I'll throw something together for you later if no one gets there first.

instajungle ·

well this look like a good start thanks alot oddson!!!!!!!!!!! 😍 oddson do you know how many people you have helped over the past year 😉 you seem like a very nice person!!!!! 😀

oddson ·

😊 aw shucks it weren't nuttin'

Unfortunately this may be one of those times I've underestimated how easy it would be to do something. I just gave it a quick attempt and was spectacularly unsuccessful so far.

aliasant ·

oddson wrote: 😊 aw shucks it weren't nuttin'

Unfortunately this may be one of those times I've underestimated how easy it would be to do something. I just gave it a quick attempt and was spectacularly unsuccessful so far.

Here is a shot in the dark.....

Can you use a transparent.png image of the "track" somehow?

Nu Audio Science ·

This normally defined by the hosts it self For instance in Reaper you have a choice of four different types of rotation interaction and i know a lot of other hosts do the same Problem i would guess is that you want your controller to be stand alone so that doesn't really help does it

NAS

instajungle ·

Nu Audio Science wrote: This normally defined by the hosts it self For instance in Reaper you have a choice of four different types of rotation interaction and i know a lot of other hosts do the same Problem i would guess is that you want your controller to be stand alone so that doesn't really help does it

NAS

never heard about it and yes I want it to be standalone

instajungle ·

I finally got it to work ...I made a modification of oddson's circleXYpolar. It works well but there is only thing I would like to know how to set the start point of the value itself with the start angle of the Arc primitive so I can put it where ever I want?I have a big thanks to give to oddson!!!!since he basically made up the patch!!!.And I would also like to ask for the permission of using it in my own standalone???.Anyway I'm not planing to make money with it since I want it to be FREEWARE...

here is the osm: http://www.fileden.com/files/2008/4/11/ ... ouchme.osm

oddson ·

I would also like to ask for the permission of using it in my own standalone

Anything posted by me in the help folder is essentially public domain... it's there to answer someone's question so if they, or anyone else, wishes to use the idea or even copying the modules used that's always OK. There's no requirement for permission nor do you need to acknowledge it in any final product.

This would not necessarily extend to the examples folder but likely I would say go ahead providing you're not just repackaging something I've made (since I almost never post completed projects this is mostly theoretical for now... it would apply mostly to my KarplusPlus project which one day I may want to release more broadly).

instajungle ·

ok cool nice to know!!!

but I am still wondering something oddson??? how to set the value origin of the normalized data where I want . since I am not so sure how your conversion modules work If you could just tell in wich module I have to set it? and how can I make the value increase clockwise or anti clockwise?

here is the updated version of the osm: http://www.fileden.com/files/2008/4/11/ ... 20knob.osm

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.