Forums > MaxMSP

Different Fade Out / In curves


dnz
May 23, 2010 | 6:55 am

Hi there,

I would like to implement fade in and out curves. What i what to achieve is a simple knob control. I’m trying samples with sfplay and the idea is when i’m holding on to a button, (midi controller) the files in a selected folder will play one after another. When i let go of the button, it will automatically bang a line out value which i can set with the knob. (2 knobs for fade in and out). The idea is when the knob is in the middle it will trigger a simple linear function with a fixed line. when the knob is turned to the left, it will trigger a convex log curve and to the right concave log curve. the value of how far left or right will determine the duration of the fade in/out time.

I’ve been looking at the hann function and others, but i’m confused on how to implement this. Can someone advise me on how to implement this with an expr?

best
d


May 23, 2010 | 12:44 pm

[cycle~] phase inlet; [rand~]; [curve~]; [trapezoid~] any use to ya?


May 23, 2010 | 6:04 pm

i would not do it with windowing function, only with (less complex) functions
which could be done in realtime.

a hann window seems useless for gain, panorama, crossfade and these things.
try things like log or square distortion first, it will fit all your needs.


May 23, 2010 | 6:04 pm

i would not do it with windowing function, only with (less complex) functions
which could be done in realtime.

a hann window seems useless for gain, panorama, crossfade and these things.
try things like log or square distortion first, it will fit all your needs.



dnz
May 24, 2010 | 5:45 pm

hi

brendan- hey thanks. the curve object looks like it can help me. the parameters value produces the curves that i need between -1. and 1. great. i’ll look into in tonight.

how do you implement what you wrote? i don’t get it. could you post a patch?

roman- thanks. i’ll look into it to see how much i understand and write later.

thanks for the direction!


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