last touched object as variable

Send us your feedback or ask for features.
Post Reply
fsk
Newbie
Posts:5
Joined:28 Jan 2012 04:31
last touched object as variable

Post by fsk » 28 Jan 2012 04:48

i think it would be super useful if there was a variable that would provide the last object to receive a cursor.

it would be useful in many ways, but here is a simple example.
lets say you have three sliders. two of them send out midi/osc and a third one that would be scripted to control the friction attribute of the last one (of the other two) that was touched.

a more complex example would be to make a step seqencer and then be able to quickly sync to it, any attribute/expression of any other object in the interface, just by touching it.

it would expand the possibilities of the software a lot imho.

brianc
Regular
Posts:87
Joined:10 Jan 2012 02:16

Re: last touched object as variable

Post by brianc » 29 Jan 2012 18:12

If you have a lot of objects, this could be a bit of work, but I like this idea a lot, so I tried this out:

* In the project, I created an expression called "lastobj" and initially set it to nothing.
* I created a couple of sliders. For each, I created a "setobj" script that runs whenever x changes. The only thing it does is "lastobj = getobject();"
* I then made another slider to control whichever slider was last used. It had a script that ran whenever x changed and did "lastobj.x = x;" or "setattribute(lastobj, 'Friction', x);"

Just a simple test case, but using something like that could work for your example at least.

fsk
Newbie
Posts:5
Joined:28 Jan 2012 04:31

Re: last touched object as variable

Post by fsk » 30 Jan 2012 14:22

yeah, thats what i did also.

the problem with this is that the x variable is not appropriate to detect touches:/. i mean, if you were to change the x variable with something else it would still trigger the script and mark the object as touched. z would work but unfortunately not many objects have z. and if they did, as you said, its a bit of work for a lot of objects (especially if you already have an interface laid out). thats why i thought this would be a practical thing to have.

highmountain
Newbie
Posts:21
Joined:13 Dec 2011 05:52

Re: last touched object as variable

Post by highmountain » 31 Jan 2012 04:42

This would be great.

marino_liine
Regular
Posts:121
Joined:26 Apr 2011 09:05

Re: last touched object as variable

Post by marino_liine » 31 Jan 2012 17:04

Hi Guys,

I added it to our wishlist, keep them coming!

Cheers,
Marino.

Post Reply