Previous topicNext topic

question about Peak modifier and the search for expression

Questions, comments, feedback, etc.
Post Reply
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

question about Peak modifier and the search for expression

Post by blackdot »

hi,

as far as I get this, in layman's terms, the Peak modifier transforms an incoming stepped curve (actually not sure about the terms here :) ) that instantly goes from 0 to 1 and then after a while instantly back to 0, into an insta rise to 1, but then linearly slow back to 0, while the modifiers value controls the duration of the descent. what i want is the opposite: a curve that slowly goes up to 1 while the incoming value is 1 and then instantly goes back to 0, when the incoming value is 0.

is there a modifier that already does this or can i use the expression modifier to modify the Peak modifier to do this? i tried coming up with an expression, but i am too stupid :P.

i tried -x+1, which kinda does what i want in terms of rising and descent, but not exactly, because now when the incoming value is 1, the outputted value is 0 and vice versa. i also tried if(x>0, -x+1, 0) to keep the 0 input as a 0 output, but it's not working. i also tried if(x==0, 0, -x+1) to no avail. am i using this wrong? i have the peak modifier first and then the expression modifier. even though the peak seems to send a 0, upon activating the expression modifier, it sends a 1 even though i told it if x==0 do 0, no? :cry:

what i want to do with it is this: press a button on my midi controller, this lets an object scale up slowly, until i release the midi button, which let's the object instantly (or smoothly thanks to the smooth modifier) pop back to it's original size.

i hope this is understandable. thaanks :)
Magic
Site Admin
Posts: 3441
Joined: Wed Apr 09, 2014 9:28 pm

Re: question about Peak modifier and the search for expressi

Post by Magic »

I would use a Smooth modifier to slow the rise, and then an Expression modifier which can be bypassed. Like this:
Screen Shot 2016-05-09 at 9.42.52 AM.png
Screen Shot 2016-05-09 at 9.42.52 AM.png (29.6 KiB) Viewed 5231 times
Notice how I set the Expression value to 0. What I also did is set the Expression's MIDI Bypass to the same setting as the parameter's Source/Feature. So the final value will always be 0, unless you bypass the Expression, in which case it will be the smoothed value.

Try it out and let me know what you think. The only issue is that the smoothing doesn't completely reset if you press your MIDI button again quickly, but it gets you pretty close to what you want hopefully.
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: question about Peak modifier and the search for expressi

Post by blackdot »

yes, this works perfectly, thanks. luckily, i dont need to press the button too quickly again. any idea why my ideas above were fruitless?
Magic
Site Admin
Posts: 3441
Joined: Wed Apr 09, 2014 9:28 pm

Re: question about Peak modifier and the search for expressi

Post by Magic »

Well, I think you were just trying to reverse the direction of the Peak modifier, which would be the correct idea... but using the Expression modifier would only allow you to flip it vertically, not reverse it in time. To reverse it in time, you would need access to the previous history of values, which aren't currently accessible. But I might be able to make them accessible at some point.
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: question about Peak modifier and the search for expressi

Post by blackdot »

even though your workaround works in my case, i'm still wondering about this :).

made a few drawing to illustrate my thoughts :D :

this is what the peak modifier does imo:
what-it-is.jpg
what-it-is.jpg (37.8 KiB) Viewed 5155 times
this is what i would like the curve to look like:
what-i-want.jpg
what-i-want.jpg (34.05 KiB) Viewed 5155 times
this is with -x and then with -x+1 (what i think should happen):
transformation3.jpg
transformation3.jpg (50.76 KiB) Viewed 5155 times
so.. with this transformation, the curve looks actually the way i want, but i'm again in a situation where I would need to invert my midi controller config to send a 0 when toggled and a 1 when not. is there no other way to do this neatly? :?
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: question about Peak modifier and the search for expressi

Post by blackdot »

hmmm. i solved it :shock: .

instead of using the midi as the actual source, i selected (none), and then added:

Offset: 1
Offset: Leran midi param, range -1
Peak: 0.5
Invert
Magic
Site Admin
Posts: 3441
Joined: Wed Apr 09, 2014 9:28 pm

Re: question about Peak modifier and the search for expressi

Post by Magic »

Good! I guess I don't always know everything about my own software :).
Post Reply