Re: [music-dsp] Implementation of Large/Kolen beat tracking perceptual model
fwiw, there is a short description of adaptive oscillators (incl. large/kolen) and some code in robert rowe's 'machine musicianship'. cheers, volker. On 01.02.2011, at 17:27, Dan Stowell wrote: Hi - I'm looking for an implementation of Edward Large's beat tracking perceptual model, as described in: Large (1996), Modeling Beat Perception with a Nonlinear Oscillator. Large Kolen (1994). Resonance and the perception of musical meter. A colleague pointed me to this page of Doug Eck's: http://www.iro.umontreal.ca/~eckdoug/vibe/ This looks useful because it's a published implementation, but it's also a little offputting because the website says things like It used to work fine, honest [...] expect some minor bugs [...] It will almost certainly be a pain to work with ;-). Can anyone vouch for this code, or know any other implementations of Large's model? Thanks Dan -- Dan Stowell Postdoctoral Research Assistant Centre for Digital Music Queen Mary, University of London Mile End Road, London E1 4NS http://www.elec.qmul.ac.uk/digitalmusic/people/dans.htm http://www.mcld.co.uk/ -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] compensating for LPF phase delay in damped karplus strong/comb filter
On 23.07.2012, at 10:52, Oli Larkin wrote: Can anyone here advise me how I can precisely compensate for pitch dependant detuning when my damping filter is active in a tuned comb filter? I'm trying to implement a damping control that doesn't alter the fundamental frequency of the comb filter. I'm not concerned with modelling the exact behaviour of a string - I just want to have precisely tuned resonances with adjustable damping. So far I have implemented tuning compensation by adding an offset to the comb frequency, however I have just worked out an approximate fudge-factor which is scaled based on the value of the damping control and the fundamental frequency. I have thought about using a linear phase FIR as the damping filter, but I think it would be too CPU heavy and hard to modulate the damping. At the moment I use basic linear interpolation for the comb filter with a 1P LPF in the feedback loop. Here is the code for the filter: lpfOutM1 = lpfOutM1 + clip(lpfcoeff, 0., 1.) * (input - lpfOutM1); So my problem is how to mathematically calculate the phase delay of this LPF at the comb filter's fundamental, in order to adjust the delay length accordingly. hi oli calculating the phase response of a one-pole filter is fortunately quite easy. look here e.g. http://www.dsprelated.com/dspbooks/filters/One_Pole.html from this you can get the phase delay (should be somewhere on the JOS site, too, if you're unsure how to) and tune your comb filter correctly. as the one-pole is non-linear, your partials are slightly out of tune - i'm not entirely sure, how this will effect the pitch perception though. hth, volker. -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] meassuring the difference
On 07.03.2013, at 16:27, Thomas Young wrote: Your mean square error procedure is slightly incorrect. You should take the final signals from both processes, say A[1..n] and B[1..n], subtract them to get your error signal E[1..n], then the mean square error is the sum of the squared error over n. Sum( E[1..n]^2 ) / n that's what i'm doing, no? This (MSE) is a statistical approach though and isn't necessarily a great way of measuring perceived acoustical differences. yes, this is what i'm suspecting. It depends on the nature of your signal but you may want to check the error in the frequency domain (weighted to specific frequency band if appropriate) rather than the time domain. thanks. will have to think a little bit about it. volker -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
Re: [music-dsp] meassuring the difference
On 07.03.2013, at 16:32, robert bristow-johnson wrote: now i'm looking for something to quantify the error signal. from statistics i know there is something like the mean squared error. so i'm squaring the error signal and take the (running) average. mostly i'm getting some numbers very close to zero wow! what are the equivalent but not identical processes? except for maybe differences in methods of rounding and quantization, or for simple filter, different structures or forms (like Direct Form 1 vs. State-Variable vs. Gold-Rader vs. Lattice/Ladder) i would not expect an error signal (i presume this is the difference of outputs) to be very close to zero. is this what your process is? i s'pose you could have a compressor with identical compression curve and where the delays are lined up very well and where the differences are in how compression levels are computed. even then, when the equivalent but not identical compressors pump, i would expect significant amplitude in the difference signal. i am curious what the equivalent but not identical processes are. fair enough. i see that my question was probably too vage in this respect. right now i'm doing simple stuff, yes, i'm comparing filter structures. i'm talking about differences that you hardly hear or might even not hear at all. and i'm interested if this i don't hear a difference maybe correleates to a measured error function. or put differently: how big can the error/difference be, without being perceivable (concerning a specific algorithm)? and a gut feeling tells me i want to see those on a dB scale. so i'm taking the logarithm and multiply by 10, as i have already squared the values before. if it's the base-10 logarithm, that gets you dB. what makes 0 dB depends on how the signal is scaled before the log. yes. (as far as i can see, this is equivalent to a RMS meassurement). how are you doing the M? i'm summing the samples and divide by the number. as my first attemps where in realtime, i was using a sliding window. is there a correct/better/preferred way of doing this? all depends on the alg. next to a listening test, in the end i want to have a simple meassure of the difference of the two processes which is close to our perception of the difference. does that make sense? it does, but a general analytic method that is close to our perception of the difference is a sorta holy grail for equivalent but not identical processes that are more sophisticated than just a filter or tapped delay or similar. yes, it's all about the holy grail! but i would be satisfied to find it for simple algos (right now). thanks for you comments. volker. -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp