Looking for a simple transient detection method
Howdy,
I'm trying to do real time transient detection on my guitar. I've tried using fiddle but there seems to be a delay of about 60 ms even with audio interrupt on. A window size smaller than 1024 seems to cause the transient detection to get considerably worse.
I'd like to do detect transients as quickly as possible. The basic goal is to remove the attack from my guitar. This involves a delayed version of the signal (by as much time as the transient detection takes) being turned down when the transient is detected in the non-delayed signal and then finally faded in.
This works fine with fiddle and a 60ms delay but I'd like to keep the delay as short as possible, preferably less than 10ms and even less if possible.
Here's what I've tried:
The rms is computed for a window of time at two different points in time. They are divided to get the ratio between their amplitudes. If this ratio is greater than some number then edge~ outputs a bang.
Its working quite well as long as there is no previous note sustaining to any significant degree.
I've also tried lowpass filtering the pre attack (delayed) signal and boosting the highs in the other to increase the contrast. No luck getting it reliable enough though.
What do you guys use?
I've not tried this with a guitar (too lazy to get it out and all...) but it should work:
beside the analysis object or code there is also the hardware latency.
see that your audio driver has a buffer setting of 16-64 for playthrough applications.
Yeah I realise that, I'm just trying to get the transient detection to be as quick as possible for various reasons besides affecting the overall latency.
Thanks tim, its not as good as the results I'm getting with my own patch. I realise this depends very much on the material played though.
It would be great if someone wrote a classifier to set transient detection parameters for specific audio (where the transients have been manually classified beforehand).
This isn't bad:
I'm looking to have max sample live, at either start a recording with transients og make markers with transients.
I've made this one. Very simple, but it looks like it works. Haven't tried it for real yet :)