suggestion : for Mouse Drag module a Bool out 'isDragging'
Archive · 20057 old posts
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
angstrom ·
Hi,
does anyone else ever feel the need for a boolean out from the Drag module?
I have been using additional leftDown and Left up along with trigger to bool conversion, but it seems a little wasteful. Especially the way I do things !
anyway, if I am missing the obvious let me know.
oddson ·
Are you talking about the mouse drag?
The accumulators all have 'after drag' events that could be used. Maybe the same set of trigger events for the mouse drag would be more consistent than a boolean.
EDIT - on second thought, if you start adding all the feature of the XY accumulator to the drag you'll end up with a duplicate module. I say you should use the accumulator when you need to keep track of the coords and mouse state at the same time.
(If I'm missing the point let me know. 😉 )
EDIT 2 - just found out how hard it is to use the XY accumulator to track straight coords. Maybe the idea has merit afterall. 😕 😊
angstrom ·
here's a really flaky thing as an explanation.
DOWNLOAD THE STUPID SKETCHY THING
inside you will see there is a Drag, an lDo and an lUp which are connected to a counter to produce the gate on 'is he drawing or not drawing right now?'
it seems like module overkill when the Drag module just needs a Bool output to eliminate 3 other modules. All the mouse modules you suggest have switches not a bool, so they too would require the same conversion.
Off, on .. it seems really appropriate in the case of the Drag.
malc ·
Hi angstrom,
Etch-a-Sketch is back! 😀
Yes, I think you have a point. It could be an output on the relevant components or it could be a separate component with a mouse input and a bool output.
oddson ·
Angstrom's solution doesn't look too bad to me. It's only firing on mouseDown and mouseUp so a primative isn't going to save many cycles.
malc ·
Yeah, it's a good solution. A new component or boolean outs on the existing ones would probably save negligable amounts of processing and memory. The main benefit would be neatness but then you could make a module that does it.
That said, with the schematic solution you'd need to be careful that the mouse up and down events were always captured by the mouse area so this could be another reason for a separate implementation.
oddson ·
RIGHT! that was what first got me to look at the after drag trigger HERE.
I think (short of a program change) your best off with the XY accumulate and use its triggers as they work outside the defined area.
(You could use LDown and XY accumulator together as the XY doesn't catch the mouseDown only the start of the drag.)
Wrote something here? To have a post removed or your name hidden, write to [email protected].