Apr 10, 2007 at 11:17pm
I’m making a patch that utilises the ubutton object
Basically I’m using the mousestate object to set the frequency of an oscillator, I’ve chosen to use the area inside the ubutton as the pitch (horizontal value) and amplitude (vertical value) of the oscillator.
When the mouse is clicked down a gate opens passing each value to a few if statements that determine whether the values passed are within the are of the ubutton.
My problem is that as soon as i move the patch all my processing becomes void as the ubuttons horizontal and vertical values have changed.
I’m wondering if there’s any way round this e.g. fixing the values of a window even if its moved around?
Apr 12, 2007 at 1:16am
Quote: Mike S wrote on Tue, 10 April 2007 16:17
> I’m wondering if there’s any way round this e.g. fixing the values of a window even if its moved around?
The ubutton already outputs the X/Y coordinates of a mouse click inside of it via its 3rd outlet. Why not just use that? You can also change whether mousestate’s coordinates are relative to the whole screen or just to the patcher mousestate is in by sending it the messages “mode 0″ and “mode 1″ respectively. Look at the “p coordinates” sub-patch in the help file.
Apr 14, 2007 at 12:18pm
I didn’t know that, thanks alot
You must be logged in to reply to this topic.