SynthMaker

GUI conventions: Knob

Archive · 2005 22 old posts

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

cbit ·

my thoughts about knob modules in sm v1 when it arrives:

I'd like to suggest that when sm v1 is released, the included knob modules display the 'hand' icon while the knob is being 'turned' (instead of the 'dot').

Also that the hand icon should freeze in position while the knob is being turned.

re. the hand icon: It probably seems like a trivial thing. But the 'dot' cursor that appears in most of the sm creations ive seen stuck out immediately the first time i tried sm. My guess is that a lot of people will be evaluating SM to see if it can be used to create 'pro' devices.

While I've no doubt that by v1 it will be fully capable of that, i think quirky behaviours in example sm devices (like the dot cursor) might undermine that impression (quirky in the sense of not comformig to established standards/expectations).

what do you think?

jorge ·

What about having the cursor disappear completely as it is already possible?

Nu Audio Science ·

I think the capabilty was added a while back to customise the cursor ?

The cursor staying centered thing has been asked for a lot aswell C, I'm pretty sure Malc said it would happen 😉

I'm busy at the mo but i will try and find the threads and link em here for you later.

skOre ·

There was somewhere a thread about custom cursors being about to be implemented, right?

Guess a Hand would be right, yes. The dot is more or less a non-statement. Suitable for X/Y-controllers however - the dot does not seem to be bound to a direction.

I think SM should ship a couple (by couple I mean at least twenty) of cursors, so that a programmer could chose between a number of SM-"related" cursors, so that there wouldn't be "oh, that cursor, must be SM-created"-reactions. Maybe it could be a good insider-thing to tell a SM synth by the cursor... but not at first sight 😉

cbit ·

jorge wrote: What about having the cursor disappear completely as it is already possible?

thats even better.. i don't have any vsts infront of me at the moment to check, but a disappearing cursor is a common approach isn't it? (i thought so..)

Nu Audio Science ·

yeah it seems like the dissapear is the most common approach 🙂

malc ·

I think this all sounds good to me.

Custom cursors will be possible but perhaps we should change our default too.

You can already hide the cursor using the Show Cursor component although this needs some more work. Would be easy to extend it to freeze the cursor while turning a knob.

cbit ·

that would be great!

GaryG ·

I just tried adding a Show Cursor element to a simple knob schematic; cursor certainly disappeared, I just couldn't get it back again... 🙂 Had to close SM completely and go back in for it to re-appear.

Still needs some work? What would be the 'correct' way of hiding the cursor? Mouse down event, neg'ed then into the Show Cursor input or something?

malc ·

Sorry about that GaryG, it is a little dangerous and that is indeed one of the things that needs more work 😉.

That said if we allow the flexibility to control such things then you do have to be careful how you use them. Please don't take that the wrong way, I'm not blaming you, it's just that with low-level functionality comes the risk of trouble if you accidentally get it wrong 🙂. Anyway, I'd like to make it a bit safer.

For an example of how to use it, see the example here: Hide Cursor

Just copy the Hide Cursor module from the schematic I posted there.

infuzion ·

malc wrote: Sorry about that GaryG, it is a little dangerous and that is indeed one of the things that needs more work 😉. ... Hide Cursor Just copy the Hide Cursor module from the schematic I posted there.

Yea, you need a mechanisim to turn on the cursor again after you turn it off. 🙂

GaryG ·

malc wrote: That said if we allow the flexibility to control such things then you do have to be careful how you use them.

oh quite, with great power comes great responsibility. 🙂

after posting I saw that topic you referred too, using it that way works fine so obviously my dodgy 'coding' yet again... 🙂

on a tangent, i assume you'd obviously have to have that hide cursor module in each knob, slider you use; will it have a significant cpu hit, assuming the code is duplicated? It hasn't been a problem but i do find myself duplicating large chunks of code sometimes and have wondered if it's realy efficient. Though I guess anything using a visual metaphor will look 'bloated', a whole network of elements could boil down to just a couple of lines of assembler...

malc ·

Hi GaryG,

Yeah, you would have to have the module in each knob. This won't affect cpu adversely at all. What it does affect are memory useage and file size and even though these are not bad at the moment they can still be improved.

GaryG ·

back to hiding cursors... 🙂

I figured out my mistake, simply releasing the mouse outside the mouse area. I can always get the cursor back by clicking (blindly 🙂) back on the knob.

So... can't a mouse_up be somehow unbound by an area? So you click on a knob, cursor is hidden, you adjust the value (straying from the area while doing so) then release the button and a mouse_up is generated even though it's outside the knobs area? I understand this would conflict with other modules that may use the mouse_up for other purposes but if the behaviour was made an option then you could at least use it when you were certain you wouldn't be doing any clever stuff...

am I being too simplistic?

Incidentally: I get the impression SM is a european creation? So why the daft spelling of 'center' on the text format fields etc.? 😉

infuzion ·

This works for me: malc wrote: For an example of how to use it, see the example here: Hide Cursor

Just copy the Hide Cursor module from the schematic I posted there.

The actual cursor postion won't move if you make the Hold True. You have to have some way of making the Show boolian turn true again, like LUp or a Control key, or maybe a timer.

malc ·

Hi GaryG,

GaryG wrote: So... can't a mouse_up be somehow unbound by an area? So you click on a knob, cursor is hidden, you adjust the value (straying from the area while doing so) then release the button and a mouse_up is generated even though it's outside the knobs area?

It can indeed. This is how the Drag Accumulate components work. As you've noticed, mouse messages are sent to the mouse area that is under the mouse pointer. We could add a component (or components) that would allow you to send all messages to a particular mouse area regardless of whether the pointer is over that area. This is known as capturing the mouse. You would then release the mouse when you are finished.

Of course if we did this then you would have to be careful to release the mouse otherwise it would stay captured. Another added responsibility, but perhaps worth it if you get flexibility in return 🙂

Best to use the drag accumulate components to do this for now. At some point I'm sure we'll look at giving you control over mouse capture.

GaryG wrote: Incidentally: I get the impression SM is a european creation? So why the daft spelling of 'center' on the text format fields etc.?

🙂 - yeah, it is a European creation. You can use 'centre' if you want as this should work as well. I think we used 'center' in the documentation and pop-up help because we were used to it from coding - just force of habit.

GaryG ·

Thanks Malc,

I think I've got my head around this now (bear in mind I'm not a Windows programmer so have never had to deal with things like mouse messages before).

However, I still can't hide the cursor properly... 🙂 your example has the same problem as my attempts; the cursor stays hidden if you release the mouse away from the control.

Please don't waste any time on my part on this, I'm moving on to other stuff, will re-visit this topic later (hardly a 'core' issue... 🙂)

I'm still having way too much fun with SM, I find myself approaching some tasks I set myself almost as logic puzzles, coding way into the night... I guess it's time to early adopt. 🙂

Gary.

Tom7777 ·

However, I still can't hide the cursor properly... 🙂 your example has the same problem as my attempts; the cursor stays hidden if you release the mouse away from the control.

2 workarounds for this although not the best method is to

1 - resize the area to slightly larger than the actuall panel itself.

2 - make the Mouse Up event seperate areas and use the area convert with floats that are much bigger than the actual area and then connect this so this way its very unlikely that you can not release the mouse correctly and it will work every time.

I always find workarounds 🙂

GaryG ·

life is a workaround sometimes... 🙂

Cheers Tom, much appreciated.

.g

Tom7777 ·

No problem 🙂

malc ·

Actually, I think that example worked in a previous release but it shouldn't have. I've changed it a bit now so if you follow the same link you'll see the changes I've made. The most important change is that instead of re-showing the cursor on mouse up, it does it when the drag operation is complete.

If you download this again or make the necessary changes to your local copy you should find that it works nicely.

It's still not perfect though. One issue is that the movement of the knob is related to the mouse position. So if you have a small scale for fine tuning, even though the cursor is hidden, behind the scenes it might reach the top of the screen and the knob will stop moving even though you keep moving your mouse.

This was something that Tom alerted me to, a smallish issue but nevertheless one that needs to be dealt with (it's on the list Tom 🙂)

infuzion ·

malc wrote: I've changed it a bit now so if you follow the same link you'll see the changes I've made. The most important change is that instead of re-showing the cursor on mouse up, it does it when the drag operation is complete.

If you want smaller code, you can remove the MouseLDown; just connect the HideCursor trigger to DragY's BeforeChange output. Seems that BeforeChange activates on focus:

BTW; it's kinda dangerous connecting things to that HideCursor; your cursor might disapear 🙂

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.