Detecting subtle attacks

Mar 2, 2007 at 8:48pm

Detecting subtle attacks

Dear all knowing list–

I’m trying to detect attacks in beginning of this audio file. It is a clarinet playing the same note over and over:

http://robseward.com/temp/zahler_opening.mp3

I have it going through a compressor and then into fiddle. Fiddle detects about half of the attacks. Some are very subtle. I’ve messed with the fiddle settings without much luck. Does anyone know any way I could detect more of these attacks?

Thanks!

Rob

#30590
Mar 2, 2007 at 9:06pm

Rather than compressing, which reduces the amplitude difference
between ‘notes’ and ‘silence between notes’ you might try a noise
gate (downward expander) which would rather accentuate the amplitude
differences, giving [fiddle~] more to ‘grab ahold of.’

On Mar 2, 2007, at 1:48 PM, Rob wrote:

>
> I’m trying to detect attacks in beginning of this audio file. It
> is a clarinet playing the same note over and over:
>
>
> I have it going through a compressor and then into fiddle. Fiddle
> detects about half of the attacks. Some are very subtle. I’ve
> messed with the fiddle settings without much luck. Does anyone know
> any way I could detect more of these attacks?

—-
Steven M. Miller

Home < http://pubweb.csf.edu/~smill>
SFIFEM <
http://sfifem.csf.edu>
Atrium Sound Space <
http://atrium.csf.edu>
OVOS <
http://pubweb.csf.edu/~smill/ovos.html>

#97993
Mar 2, 2007 at 9:13pm

Could you have fiddle’s sensitivity adapt according to the rms of the
signal? It would still require fine tuning, but you should get better
results.


Owen

Rob wrote:
> Dear all knowing list–
>
> I’m trying to detect attacks in beginning of this audio file. It is
> a clarinet playing the same note over and over:
>
> http://robseward.com/temp/zahler_opening.mp3
>
> I have it going through a compressor and then into fiddle. Fiddle
> detects about half of the attacks. Some are very subtle. I’ve
> messed with the fiddle settings without much luck. Does anyone know
> any way I could detect more of these attacks?
>

#97994
Mar 2, 2007 at 11:42pm

Thanks! I think I have a solution. Basically, when a lot of the notes are the same, I look for fluctuations in the RMS of the signal for the attack. When the notes are different pitches, I use fiddle for the attacks. My RMS patch does what I understand fiddle’s “reattack” parameters do, but those don’t seem to be working.

I’ve uploaded my RMS-based attack-detect patch.

Rob

#97995
Mar 3, 2007 at 8:50am

you should try bonk~, you can train it to detect onsets, it is
designed specifically to perform that task, but used more in
percussion following.

good luck,

Jaime

On 3/2/07, Rob wrote:
> Thanks! I think I have a solution. Basically, when a lot of the notes are the same, I look for fluctuations in the RMS of the signal for the attack. When the notes are different pitches, I use fiddle for the attacks. My RMS patch does what I understand fiddle’s “reattack” parameters do, but those don’t seem to be working.
>
> I’ve uploaded my RMS-based attack-detect patch.
>
>
> Rob
>
>
>
>

#97996
Mar 6, 2007 at 10:53pm

Rob schrieb:
> I’ve uploaded my RMS-based attack-detect patch.

I can’t open it (as never if its not zipped) could you paste the patch
as text simply into the mail body?

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#97997
Mar 7, 2007 at 1:57am

Here ya go!

max v2;
#N vpatcher 541 273 1141 673;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 177 278 109 196617 if $i1 > 100 then bang;
#P newex 177 248 35 196617 timer;
#P outlet 177 321 15 0;
#P button 177 220 15 0;
#P newex 177 182 97 196617 if $i1 > 5 then bang;
#P number 177 145 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 177 101 27 196617 -;
#P number 113 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 261 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P inlet 261 47 15 0;
#P window linecount 5;
#P comment 306 181 100 196617 < -minimum decible change for new attack within meter's temporal resolution;
#P window linecount 3;
#P comment 306 279 175 196617 If two bangs occur in less than this amount of time , then ignore second bang;
#P window linecount 2;
#P comment 306 46 100 196617 rms from levelmeter~;
#P comment 306 101 69 196617 incoming value;
#P comment 23 101 69 196617 previous value;
#P fasten 6 0 7 0 266 130 249 130 249 85 118 85;
#P fasten 6 0 8 0 266 138 243 138 243 90 182 90;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 11 0;
#P connect 11 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 12 0;
#P fasten 7 0 8 1 118 134 224 134 224 95 199 95;
#P connect 11 0 13 1;
#P connect 5 0 6 0;
#P pop;

#97998
Mar 7, 2007 at 5:48am

For detecting subtle attacks where amplitude change may not be
statistically significant, it would be helpful to look at phase. This
could be helpful:

Bello , J.P., Daudet, L., Abdallah, S., Duxbury, C., Davies, M. and
Sandler, M.B. A tutorial on onset detection in music signals. IEEE
Transactions on Speech and Audio Processing. 13(5), Part 2, pages
1035-1047, September, 2005.

On Mar 6, 2007, at 8:57 PM, Rob wrote:

>
> Here ya go!
>
> max v2;
> #N vpatcher 541 273 1141 673;
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P newex 177 278 109 196617 if $i1 > 100 then bang;
> #P newex 177 248 35 196617 timer;
> #P outlet 177 321 15 0;
> #P button 177 220 15 0;
> #P newex 177 182 97 196617 if $i1 > 5 then bang;
> #P number 177 145 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 177 101 27 196617 -;
> #P number 113 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P number 261 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P inlet 261 47 15 0;
> #P window linecount 5;
> #P comment 306 181 100 196617 < -minimum decible change for new attack
> within meter’s temporal resolution;
> #P window linecount 3;
> #P comment 306 279 175 196617 If two bangs occur in less than this
> amount of time , then ignore second bang;
> #P window linecount 2;
> #P comment 306 46 100 196617 rms from levelmeter~;
> #P comment 306 101 69 196617 incoming value;
> #P comment 23 101 69 196617 previous value;
> #P fasten 6 0 7 0 266 130 249 130 249 85 118 85;
> #P fasten 6 0 8 0 266 138 243 138 243 90 182 90;
> #P connect 8 0 9 0;
> #P connect 9 0 10 0;
> #P connect 10 0 11 0;
> #P connect 11 0 13 0;
> #P connect 13 0 14 0;
> #P connect 14 0 12 0;
> #P fasten 7 0 8 1 118 134 224 134 224 95 199 95;
> #P connect 11 0 13 1;
> #P connect 5 0 6 0;
> #P pop;
>
>
>
http://www.petermcculloch.com

#97999
Jun 28, 2008 at 7:16pm

Thanks for this bit.

It does the trick for me!

#98000

You must be logged in to reply to this topic.