dampening or removing transients in 'real time'?
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?
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.
great; thanks for your response; will check it.
i’ve pasted my patch below.
----------begin_max5_patcher---------- 1329.3oc0ZssjiZCD8YOeETT4s33BcCjxa4s7OjZqTXaYFxBno.7Lyls14aO 5Bv.iwFYtsSdAPBgn6i59zcK36Orwcu3Udgqyu67WNa178G1rQ2kpiMUs23l F95gjvB8vbOHRS4YktaM2qj+Zot+yE7bm3rRd9ovCbGw9+genrv4a7jDwK0i 9TdzdyKyam21VG.67b9R0fdJr7viwYQ+ctbFLilEnGDSejXdBZqG4jHqrH9e 4pQCT21zc14z3rDdoVxAu2o3bYcu0CM9nVKjh8uACbaMsYgo5o08OxiCSbU2 3GO7f5vVKQrL9Kxo8B.KQDdbeXVj60Ua.gnTUDwWch.mQ8FzidStgdWcGyLT 9sm3FIzUqANeYDvRoHJJgeKsGBMZOVcB5UerQ62GcPjHxqMnnHBjgUFTTBkB 0WQv.PfeW6qwgNHzUw.oU+3ffqXYTDG8lE3Rf1p.cItzwp.rivH.ZvzLMXiv zPpFYxaOmHSTtP7L+Mm8IgNvggHrm9DMXTNNndQGTOnCX7ny1dtZYbmLbnX. 4yf2Dza07lNFd3MG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4MHbuiEWD zeWfmmG.pRaxrOkxRkIUslrL6asWxJt7qBq6OHgxcx9QM4QA0U7hL+EBcaU+ SfoGnpwpnG36yfnqd.gzV5QcKOyuwlOsN+lIqI34mi.VEG5FKHlMW8cO2IqF 1jlFacYesIf.ZcqiA.rDlFqHIa7iG9Ov3bU.k -----------end_max5_patcher-----------
[grooveduck] is great; however, is it possible to implement an overlap between the two audio plays? i.e. no amplitude drop between plays?
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.
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. :)
Forums > MaxMSP