From: robert bristow-johnson on 28 Jul 2010 00:59 On Jul 28, 12:26 am, "Cirrus" <luigi.rosso(a)n_o_s_p_a_m.gmail.com> wrote: > ..with a yellow fin, maybe. > > Even though I'm likely wasting time, I'll post a little more of what else > I've tried since my first post... > > I tried examining the phase of each peak in the spectrum when letting one > string ring out. I was hoping there was some form of relationship amongst > the phase of the fundamental and that of each harmonic in order to try to > determine whether or not the peak is coming from an overtone or not. There > doesn't seem to be any consistent relationship. However, in the samples > I've recorded so far there does seem to be some form of a relationship > amongst the intensity of the frequency peaks for the fundamental and the > ensuing overtones. I suspect that this will greatly change depending on > the type of strings used and how new/old they are, so I'm not sure how > deterministic and useful this observation really is. listen, i can't say for sure how the PolyTune works. being a little stomp box, i wonder if they put a full-tilt DSP in there, but probably that's what they did. they probably aren't worrying about harmonics. or if they are (like the 3rd and 4th harmonic of the low E string interferes with the B and high E strings and the 3rd harmonic of the A string gets into the high E also) worried about it, they look for harmonics of the higher strings that are not trampled upon by lower strings. or maybe they just look at the 1st harmonic. they could have tuned filters for each string and a zero-crossing pitch detector. or they could have a better pitch detector. they might FFT the whole thing and look at the tuning of the fundamental (1st harmonic) of each string, since they know where to look. there's a lot of things. i wouldn't bother to commit a whole box (stomp or rack) to a single function like this. i would make it a feature of another box that does something more (like great effects). r b-j
From: kevin on 28 Jul 2010 01:06 On Jul 27, 10:29 am, "Cirrus" <luigi.rosso(a)n_o_s_p_a_m.gmail.com> wrote: (snip) Your approach is OK, but you're running into a 'peak merging' or resolution problem in the frequency domain. Your sampling interval (length of time over which you collect your N samples) = N/sample_rate. And the frequency spacing of the FFT output points are: F = k*sample_rate/N, where k = 0 to N - 1 (with the upper parts being negative frequencies). To 'resolve' peaks in the frequency domain, you have to ensure that your frequency spacing is SMALLER than the difference in frequency of your two sinusoids. Equivalently, you have to make your sampling interval in the time domain long enough. For example, to resolve G sharp (412 Hz) and A flat (422 Hz), you have a difference of 422 - 412 = 10 Hz, so your frequency spacing (sample_rate/N) must be LESS than that. Notice, too, that the parameters (sample_rate and N) also dictate how long you must sample in time. Sample_rate and N are choices. And the minimum sample_rate is fixed by the highest frequency in your input. So to maximize resolution in the frequency domain, you want to use the minimum sample_rate, and maximize N. Things can actually be quite a bit more complicated, because resolution also depends on SNR, and you could be dealing with non- stationarity (in music, e.g.: attack/decay characteristics), or multiple overtones, etc. Lots of very complicated things. As for your mentioned tuner, +/- .5% is not very impressive (although the specs on their web page say 'cent' instead of 'per cent', so maybe they mean something else). In your other post, you mentioned phase and frequency intensity. I kind of doubt if the phase of the fundamental will tell you much about the phase of the harmonics. Perhaps for certain instruments, it might - I really don't know. As for intensity, there certainly is a relationship, but it depends on the instrument/set up, etc. Kevin McGee
From: Vladimir Vassilevsky on 28 Jul 2010 10:21 Cirrus wrote: > ...with a yellow fin, maybe. > > Even though I'm likely wasting time, I'll post a little more of what else > I've tried since my first post... Try reading books. Don't be a matlabi or a google university graduate. > I tried examining the phase of each peak in the spectrum when letting one > string ring out. I was hoping there was some form of relationship amongst > the phase of the fundamental and that of each harmonic in order to try to > determine whether or not the peak is coming from an overtone or not. There > doesn't seem to be any consistent relationship. However, in the samples > I've recorded so far there does seem to be some form of a relationship > amongst the intensity of the frequency peaks for the fundamental and the > ensuing overtones. I suspect that this will greatly change depending on > the type of strings used and how new/old they are, so I'm not sure how > deterministic and useful this observation really is. If you want to stick with the frequency domain methods, then the distance between harmonic peaks gives you pitch. You have to find harmonic spacing which makes the best match with your spectrum. And, yea.... where is Terez when you need him? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
From: Ron N. on 28 Jul 2010 11:26 On Jul 26, 4:27 am, "Cirrus" <luigi.rosso(a)n_o_s_p_a_m.gmail.com> wrote: > I'm a software engineer and musician who has always been keen on learning > more about the meshing of these two fields. I've been studying DSP for > personal interest (I've created a couple fun software experiments like > synthesizers, drum machines, tuners). I just recently acquired one of > these cool PolyTune tuners:http://www.tcelectronic.com/polytune.asp > > I've been so impressed by how well it works that I've tried my hand at > figuring out the math to this myself. I tried upgrading a simple FFT tuner > I made to work like this. > > I built a simple little test environment that is by no means robust but > "kind of works". I calculate the frequency spectrum with the FFT every 0.1 > seconds and examine certain ranges of interest for each string. The > biggest problem is that overtones from some of the lower frequencies > collide with the area of interest of other strings. For example, one > overtone from the A string is right between the high E and its closest > sharp semitone (F). This creates two peaks in my area of interest for the > high E string. This makes it difficult to discern which peak is from the > actual E string and which one is from the A string. Furthermore the low E > string has a pretty strong harmonic on the high E string. Am I taking the > wrong approach? What you might be missing is the psychoacoustics of the situation. Perceived musical pitch is not the same as frequency. There are lots of papers on the subject. As Vladimir said, for many stringed instruments, the spacing of the spectral peaks provides a very important clue as to the pitch. You could try something complex, such as a cepstrum, or simply subtract frequencies with large enough magnitudes. And you don't need to "resolve" frequency by using a long FFT, since your experimental model (single guitar string) probably doesn't include closely spaced spectral peaks that need to be cleanly separated. You can interpolate to a fraction of bin spacing using one or more very short FFTs. I have a web page describing a few quick & dirty methods you could try for frequency and/or pitch estimation: http://www.nicholson.com/rhn/dsp.html IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
From: Cirrus on 28 Jul 2010 11:44 Really appreciate all the follow up. Going to read further into what everyone has mentioned and post back as I make progress. >> Even though I'm likely wasting time, I'll post a little more of what else >> I've tried since my first post... > >Try reading books. Don't be a matlabi or a google university graduate. I meant that I was wasting my time based on the replies I'd gotten so far. I'm trying to learn, I know I have a long way to go. I've done all my testing in custom software I've written to try to understand this stuff better piece by piece. I don't have matlab... I do have some books, I've been slowly reading through them and I have a better grasp than I did back when I started but I lack a lot of the fundamentals. I probably dove into this prematurely but I wasn't trying to be cocky, snide, or rude. I posted my question with sincerity to try to learn something that I thought was interesting. I'm not trying to figure out exactly what PolyTune is doing, I'm curious to figure out how to find the pitch of 6 strings from a single signal. They're the first ones to do it (that I know of) and I was impressed by how well it works (try it, it's 10 bucks on an ipod touch/iphone). It's not the most accurate tuner, there are better ones in the same form factor but the multi string tuning sparked my interest. Thanks again for the sincere replies, really like Robert's idea of analyzing overtones (perhaps the higher harmonics) that don't interfere with each other. Going to take a look at that first and work my way down the list.
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: help with LP filter implementation in c Next: For sale: Freescale Symphony Soundbite dsp kit |