Mouse Drag float outputs

Discuss suspected defects before submitting a bug report

Moderator: electrogear

Mouse Drag float outputs

Postby tor on Wed Mar 30, 2011 2:14 am

I found a bug in the Mouse Drag prims. Seems like they produce 2 ticks pr float change in the outputs. Workaround: Insert a Float Changed module right after all mouse drag prims to reduce all green calculations with prox 50%.

Mail sendt to support
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 469
Joined: Wed Apr 14, 2010 8:52 pm

Re: Mouse Drag float outputs

Postby infuzion on Wed Mar 30, 2011 3:24 am

Might be that there are 2 values generated, but they don't output differently due to 32bit rounding?
Need help? First search the forum & WiKi, then post in the help forum with a clear topic, request, & OSM. Then please WiKi the correct solution. If you want my personal assistance, I charge by the hour or for an exchange of services.
infuzion
smstar
smstar
 
Posts: 6169
Joined: Wed May 04, 2005 8:02 pm
Location: Earth, USA, CO, Denver

Re: Mouse Drag float outputs

Postby tor on Wed Mar 30, 2011 3:35 am

Could be.. but then it's strange that it happens for every second output.
Anyway, the Float Change or an equal function should be implemented into the Mouse Drag prims to reduce triggers and extra work.
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 469
Joined: Wed Apr 14, 2010 8:52 pm

Re: Mouse Drag float outputs

Postby Mo on Wed Mar 30, 2011 4:38 am

Actually it's not two ticks per float change but ticks from all mouse activation, including mouse click up/down. If you count the triggers from float changed and add the triggers from the "dragging" output you should see the same amount triggers when dragging between the min. and max. value. BTW a "float change" module should be standard on all knobs and sliders as it also blocks the triggers after min/max are reached.
User avatar
Mo
essemilian
 
Posts: 439
Joined: Thu Jan 24, 2008 2:00 pm
Location: Copenhagen

Re: Mouse Drag float outputs

Postby aliasant on Wed Mar 30, 2011 8:56 am

This is not a bug but a feature.

Not sure if this is documented in the manuals though. Never read em..
It's never to late to be late.....
http://martinrodensjo.smugmug.com/
User avatar
aliasant
smunatic
 
Posts: 2388
Joined: Sat Dec 30, 2006 5:49 pm
Location: Sweden

Re: Mouse Drag float outputs

Postby tor on Wed Mar 30, 2011 3:25 pm

Well, I concider it a bug cause it is a unwanted, unnecessary and cpu increasing behaviour. Many small rivers turn into a ocean.
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 469
Joined: Wed Apr 14, 2010 8:52 pm

Re: Mouse Drag float outputs

Postby trogluddite on Wed Mar 30, 2011 6:03 pm

I'm with Tor on this one. We have separate Mouse button, Mouse over etc. primitives - I would prefer to add primitives for the other events explicitly when they are needed, instead of having to suppress the 'extra' triggers that come out of the Drag accumulators.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3033
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Mouse Drag float outputs

Postby tor on Wed Mar 30, 2011 8:02 pm

Mo wrote:Actually it's not two ticks per float change but ticks from all mouse activation, including mouse click up/down. If you count the triggers from float changed and add the triggers from the "dragging" output you should see the same amount triggers when dragging between the min. and max. value. BTW a "float change" module should be standard on all knobs and sliders as it also blocks the triggers after min/max are reached.


At the Min/Max was where i got aware of this behaviour. I did some research and after adding the Float Changed right after the Mouse Drag prim the number of ticks at Min/Max is the same whether or not I have a Float Changed after it.
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 469
Joined: Wed Apr 14, 2010 8:52 pm

Re: Mouse Drag float outputs

Postby tor on Wed Mar 30, 2011 8:21 pm

Now I just realized that the Float Changed prim after the Mouse Drag stops triggers from the Ctrl Click/reset funktion in the knob. So it alone is not a good workaround anyway.

Sorry :(
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 469
Joined: Wed Apr 14, 2010 8:52 pm

Re: Mouse Drag float outputs

Postby tor on Wed Mar 30, 2011 8:37 pm

Solved... hopefully.

Also remove the float select connected to the float output in the control module (same as you find the mose drag in)

Can anyone confirm that this solution does not create any further problems?
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 469
Joined: Wed Apr 14, 2010 8:52 pm

Re: Mouse Drag float outputs

Postby tor on Wed Mar 30, 2011 8:54 pm

Edit: Here was a example.
Last edited by tor on Thu Mar 31, 2011 3:05 am, edited 2 times in total.
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 469
Joined: Wed Apr 14, 2010 8:52 pm

Re: Mouse Drag float outputs

Postby tor on Wed Mar 30, 2011 9:41 pm

Nah.. it is not good. Still working on it ;)
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 469
Joined: Wed Apr 14, 2010 8:52 pm

Re: Mouse Drag float outputs

Postby trogluddite on Wed Mar 30, 2011 9:48 pm

I think the float select is there to limit the triggers when the knob is moved by the MIDI CC or VST automation - so it may be worth seeing what happens when you send data into the knob from those two places.

There is also a further ReDraw optimisation that you can do...
The 'Areas' module has an integer 'Cell' input to choose the animation frame - you can put an 'Integer Changed' leading into that input, so that the Areas are only calculated if a new frame is needed (the trigger blocker also has to be moved). Then, also take the ReDraw trigger from the Integer changed - that will stop it from ReDrawing the same frame if the mouse movement is very small.
Less Knob Drawing.png
Less Knob Drawing.png (56.55 KiB) Viewed 3428 times
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3033
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Mouse Drag float outputs

Postby tor on Thu Mar 31, 2011 12:52 am

He he.. I sort of ended up redesign almost the whole knob. Thanks for your tips trog ;)
Think I have it all sorted out now.

EDIT: Fixed input source to Set on Drag Prim. Now it function correct.

Here it is:
Knob.osm
(35.63 KiB) Downloaded 286 times
Last edited by tor on Thu Mar 31, 2011 1:42 pm, edited 1 time in total.
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke, "Profiles of The Future", 1961 (Clarke's third law)

http://www.audioteknikk.net
User avatar
tor
essemilian
 
Posts: 469
Joined: Wed Apr 14, 2010 8:52 pm

Re: Mouse Drag float outputs

Postby infuzion on Thu Mar 31, 2011 5:36 am

tor wrote:He he.. I sort of ended up redesign almost the whole knob... Think I have it all sorted out now.
Looks clean, thanks!
Need help? First search the forum & WiKi, then post in the help forum with a clear topic, request, & OSM. Then please WiKi the correct solution. If you want my personal assistance, I charge by the hour or for an exchange of services.
infuzion
smstar
smstar
 
Posts: 6169
Joined: Wed May 04, 2005 8:02 pm
Location: Earth, USA, CO, Denver

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 2 guests