Forums > MaxMSP

reverse stream of floats at any point

December 11, 2012 | 7:38 pm

Trying to reverse a stream of 0. to 1. floats at any point. Seems like I need to split the stream 0. to 0.5 and 0.5 to 1. and treat each half differently?

– Pasted Max Patch, click to expand. –

December 11, 2012 | 11:17 pm

I don’t understand what you mean by "reverse"… I’ve seen your patch but didn’t help me…
Do you want 0 to become 1, 1 to become 0 and 0.5 (the center) to stay the same?
[scale 0. 1. 1. 0.] or [- 0.5] followed by [* -1.]

If you mean to reverse the playback of the function graph, you could change it by connecting a toggle to the 2nd inlet of the counter object…


December 12, 2012 | 12:58 am

Reversing directions on the counter driving function does what I’d like to do to any random/arbitrary stream of floats– if descending it would fold back at that point and rise, if ascending then reverse direction and fall. A section going from 0.2 to 0.1 would instead go 0.2 to 0.3.
It seems the amount to be added/subtracted from a straight inverted stream is like a sine wave– 0 at .5 and near + 1 -1 at each end.


Viewing 3 posts - 1 through 3 (of 3 total)