Forums > MaxMSP

dampening or removing transients in 'real time'?

October 4, 2012 | 12:06 am

hi

I have a [groove~] object with a loaded sound file. I have a random # generator driving the [groove~] start and end selection attributes to play different parts of the loaded sound file (essentially splicing the file randomly). Sometimes when it jumps to a location I get audible pops and clicks (or transients i believe). I believe this is occurring because the amplitude of the two file locations are not close to the ’0 crossing point’. Being that i am randomly playing back audio, I am assuming that the act of what i am doing would be some form of online processing (or realtime). This may be technically inaccurate but I’m trying to understand my own problem with what knowledge of digital audio that i have.

Can i create some sort of patch downstream of my [groove~] object, that will dampen the transients to a point where they may be close to inaudible? or even fully disappear?


October 4, 2012 | 1:35 am

Post-processing won’t really help much. A more direct fix would be to implement some very basic enveloping of your sound at the splice points – i.e., a quick fade out (very fast, but not instantaneous) and a quick fade in at the appropriate point in the splice. Have a look at the ‘grooveduck’ patcher in the examples folder for an idea of how to do it. Depending on the sound itself this may greatly diminish, if not entirely eradicate, the pops & clicks at the points of discontinuity.


October 4, 2012 | 1:39 am

great; thanks for your response; will check it.

i’ve pasted my patch below.

– Pasted Max Patch, click to expand. –

October 4, 2012 | 2:06 am

[grooveduck] is great; however, is it possible to implement an overlap between the two audio plays? i.e. no amplitude drop between plays?


October 4, 2012 | 3:03 am

Yes, cross-fade looping is possible. You’d need to modify your patch with the idea in mind that the randomly-chosen edit point is the center of the crossfade, with the fade-out ending later and the fade-in starting earlier. You might also play with logarithmic (equal power) fades rather than linear ones.


October 4, 2012 | 4:33 am

imo to just filter out the high frequencies is definitely better than fading the volume in and out.

the most minimalistic solution for reducing clicks at known positions would be to use [slide~] as lowpassfilter with a quick in and out time of about 10-2 ms around the loop point.

how deep it goes could be given as parameter to the user; ears work best here to find the right filter setting for the material in question.

where a few samples latency dont matter a 4 or 8-frame fft should also work great as filter.

just dont use biquad´n stuff as it would be overkill.

crossfading is another approach which can also solve the click problem. :)

-110


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