reverse a stream of numbers

Jun 4, 2013 at 11:28am

reverse a stream of numbers

if i am using something like my mouse position to control the pitch of an oscillator, how do i reverse the numbers? For example if moving my mouse down is making the pitch go up, how do i make it pitch down instead?

#251681
Jun 4, 2013 at 6:12pm

Use [screensize] to get your screen dimensions, [mousestate] to get the coordinates of your mouse, and [!-] (using the screen height) to flip the mouse y coordinate.

<code>

– Pasted Max Patch, click to expand. –

</code>

#251708
Jun 4, 2013 at 6:24pm

You could also use a [scale] object to map things in reverse.

#251709
Jun 11, 2013 at 7:31am

scale seemed to work great. thank you

#252409

You must be logged in to reply to this topic.