A R Envelope to remove clicks at beginning/end of file play

johnr's icon

i have an sfplay~ object playing a looped audio file. i am trying to impliment some sort of attack and release envelope for the beginning and end of audio file play, in order to reduce the adible click, or at least reduce its prevelence

Max Patch
Copy patch and select New From Clipboard in Max.

i was thinking of using trapezoid~ with attack and release values, but im not too sure how to hook it up... this is what i have soo far...

assistance would be greatly appreciated

brendan mccloskey's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Hi
here you go, a hack which uses the ms position outlet from [sfplay~]; [groove~] may be better suited to this, as it has an accurate sync outlet whose ramp equals 0. to 1. over the loop duration.

Brendan

roger.carruthers's icon
Max Patch
Copy patch and select New From Clipboard in Max.

If it has to be sfplay~ and trapezoid~ then something like this?
Cheers
Roger

Ha - beat me to it, Brendan!

johnr's icon

thats great. thanks for the replies.

it doesnt have to be sfplay. i could do groove~ for now (until i get into multiple objects, playing large files, then i can migrage back over to sfplay~).

ill check out the groove~ object functionality discussed above.

thanks again

brendan mccloskey's icon

@roger

and because you took a little more time with yours, it is way WAY more elegant

[sfinfo~] doh!

Brendan

johnr's icon

sfplay~ and trapezoid~ made sense to me at the time; so it for sure doesnt have to be these two objects. would there be a more efficent way of doing this? im sure that is a farily openended question considering with max, you can probably go about a million different ways of doing this... im just thinking, if there are any suggestions that i could take that would assist me better, i am very-much-so open to any, and all.. i.e. grove~ over sfplay~ etc.

thanks again.