Reply by Steve Underwood April 8, 20082008-04-08
Ron N. wrote:
> On Apr 8, 2:43 pm, Jerry Avins <j...@ieee.org> wrote: >> Richard Owlett wrote: >>> Andor wrote: >>>> [ *MAJOR* snip ] >>>>> In perfect Western equally tempered tuning, the harmonics are >>>>> at slightly different frequencies, perhaps beyond the time >>>>> frequency resolution of a sub-note length STFT. And real >>>>> instruments may not be tuned this precisely. So even if >>>>> you could use some sort of pattern recognition to factor >>>>> each harmonic into fractional portions, you would need a >>>>> filter that could slice those harmonics very thinly. >>>> Agreed. But it is doable. One would have to also consider that for >>>> example piano notes don't necessarily have integer multiple harmonics >>>> of the fundamental. Don't know how relevant that effect is, but it >>>> could be taken into account (simply guess at what frequency the >>>> harmonic should lie, based on the fundamental, then measure the exact >>>> harmonic frequency). >>> Considering "piano notes": >>> What would the effect of a "single" piano note being produced by *3* >>> somewhat isolated strings. *IF* I understand piano tuning/voicing >>> correctly, might not each string be tuned slightly differently. >> The strings are deliberately tuned a bit off, but not so far off that >> the bridge doesn't force them into synchrony. The result of this tuning >> is a longer sustain. > > However, for the low notes on a piano, the "harmonics" are > often not exact integer multiples of fundamental frequency. > You can see this as a "creep" in the waveform shape of a > piano note as it evolves over time, or on a synchronous > strobe tuner after a bandpass filter which can select out > individual overtones. This effect is due to the non-zero > diameter and stiffness of the strings, which are usually > abstracted out of common 2nd order differential equation > models. I've also seen this effect from guitars and string > bass. It's worse for the cheapest kid-sized guitars and > spinet pianos, which might be part of why they sound so bad. > > Not sure if this inharmonicity occurs with any non-stringed > musical instruments... anyone know?
A lot of the character of instruments comes from the weird frequencies they produce. Most wind instruments warble at the start of the note, as the air flow builds up, and the resonance locks in. That seems to be a very characteristic part of their sound. Very little music is actually produced by an instrument putting out a precise tone and its precise harmonics. Steve
Reply by Steve Underwood April 8, 20082008-04-08
Andor wrote:
> On 8 Apr., 19:00, Steve Underwood <ste...@dis.org> wrote: >> Andor wrote: >>> On 8 Apr., 10:01, Steve Underwood <ste...@dis.org> wrote: >>>> Al Clark wrote: >>>>> "VelociChicken" <b...@yahoob.com> wrote in >>>>> news:0GmJj.25$Wf3.4@newsfe16.ams2: >>>>>>>>> Hi, >>>>>>>>> I've always been interested in DSP methods to decompose a piece of >>>>>>>>> music into discrete instruments. I came across this new tool that's >>>>>>>>> pretty fascinating: >>>>>>>>> http://www.celemony.com/cms/index.php?id=dna&L=0 >>>>>>>>> How do you think something like this works? Considering an acoustic >>>>>>>>> guitar chord and all its intermixed, varying and slightly non-integer >>>>>>>>> harmonics, how would one go about separating such a signal into >>>>>>>>> individual >>>>>>>>> notes that actually sound pretty clean? >>>>>>>> of course i don't know exactly how they did it. i doubt that they are >>>>>>>> assuming any non-integer harmonics. if it were non-real-time, i could >>>>>>>> imaging processing the audio with a set of cascaded, adjustable comb- >>>>>>>> filters (where the notches are at the harmonic frequencies) until they >>>>>>>> get something that is residual. dealing with the attacks is another >>>>>>>> problem. dealing with harmonics of two different notes that land on >>>>>>>> top of each other is another problem. >>>>>>>> lot'sa problems. dunno how they dealt with them all. but, from what >>>>>>>> i have seen in Electronic Musician, i think this is no bogus product. >>>>>>>> i think it's real. i'm looking forward to finding their booth at the >>>>>>>> AES show in October (they better the hell be there). >>>>>>> I'd agree with your assessment of "lot'sa problems" if I hadn't heard >>>>>>> the short talk by the guy behind it. He makes it sound like something >>>>>>> clicked in his mind, and made him realise that something which was not >>>>>>> rigorous was going to fail with sufficient rarity for it to useful. He >>>>>>> makes it sound like the magic trick was one key insight. >>>>>> Well, you've got to start somewhere. I've been looking at Continuous >>>>>> Wavelet's, and as the data is pre-processed I guess you could do a lot >>>>>> in the analysis stage. How about a CWT at note resolution pitches? It >>>>>> would give you the fundamentals, and a nice hi-res spectrum. >>>>>> If it's designed mainly for one instrument, it could use different >>>>>> number of notes played at once to figure out the harmonics of each >>>>>> through-out the piece. But like someone above said, there's a lot of >>>>>> potential breakages, and it completely depends on the source material. >>>>>> VC >>>>> I have never tried to solve this problem, but it seems to me a cepstrum >>>>> approach might be useful. >>>>> A cepstrum (spectrum spelled sideways), is a forward FFT of an FFT power >>>>> spectrum. The bins represents harmonics of the original FFT. >>>>> It's been a long time since I looked at cepstrum, but I know that they have >>>>> been used to help isolate components in mechanical systems like gear boxes. >>>>> I think their might be some old Bruel & Kjaer application notes on this >>>>> idea. >>>> Cepstrums are widely used in speech analysis for isolating components, >>>> too. Thats not a million kilometres away from music analysis, so >>>> cepstral analysis might well be involved. >>> If I were to tackle this problem, I would start off with an STFT >>> decomposition (spectrogram) of the signal (alternatively, use wavlet >>> decomposition). >>> Assume that the signal consists of a piano (or guitar) chord, possibly >>> with delayed starting points of each separate note. Then each note >>> generates multiple "stripes" of harmonics in the spectrogram, spaced >>> by the fundamental frequency of that note. Group the "stripes" into >>> notes (starting positions might help). For a given fundamental >>> "stripe", only stripes that lie on multiples of the fundamental >>> frequency belong to that note. >>> Once the harmonics are grouped notes, filter out the harmonics of the >>> signal. To do this, programm a bunch of linear-phase FIR bandpass >>> filters, one filter for each detected harmonic. The bandpass frequency >>> is given by the offset of the stripe. The filters are time-varying, >>> switching on at the beginning of the stripe and switching off at the >>> end of the stripe. >>> There already exists a plug-in that does exactly what I described in >>> the second paragraph (http://www.algorithmix.com/en/renovator.htm), so >>> the novelty lies in grouping the harmonics into notes. That doesn't >>> look like too hard a problem. >>> Once the notes are seperated, use existing pitch-shifting and time- >>> stretching algorithms on the single notes. >>> Easy. >>> :-) >> The renovator tool is trying to remove an uncorrelated disturbance from >> a piece of music. > > I don't think correlation has anything to do with it. Using that > tool, > you simply draw a box in the spectrogram around the section that you > want to remove from the signal. The removal is done with an > appropriate time-varying filter. > >> The tool we are talking about has to separate the >> notes of a chord, when those notes have intertwined sets of harmonics - >> they wouldn't form a chord if they didn't. Identify the dominate pitches >> seems like the easy part. Untangling the harmonic content of each sounds >> like the hard part. > > Of course, detangling the harmonics is the interesting part of the > problem. I just don't see a reason why theoretically it shouldn't be > possible (as is claimed in the video).
Surely those two issues are related. The lack of correlation in the kind of disturbance renovator is designed to remove means you don't have a mass of entangled harmonics in most cases. I think the problem is hard because the harmonics from each note in the chord are doing different things, in the general case. It may be highly relevant that the demo from celemony uses a nylon guitar playing unarpegiated chords. It makes an impressive demo when the unarpegiated chords are split up. However, a nylon guitar doesn't produce a lot of sound from the part of the string you don't pluck (unlike some Asian instruments, like a Chinese Zheng, where both the struck and unstruck sections of a string sit over the sound box, and can be clearly heard). Also, the character of the sound from each string is reasonably similar, and composed of one string's vibration. There isn't a lot of the individual player's feeling in strummed unarpegiated chords. It is actually a fairly simple sound. It would be interesting to compare the performance with a 12 string guitar playing the same thing, where the pairs of strings add more complexity to the sound. Steve
Reply by Ron N. April 8, 20082008-04-08
On Apr 8, 4:46 pm, Nils <n.pipenbri...@cubic.org> wrote:
> Ron N. schrieb: > > > However, for the low notes on a piano, the "harmonics" are > > often not exact integer multiples of fundamental frequency. > > You can see this as a "creep" in the waveform shape of a > > piano note as it evolves over time, or on a synchronous > > strobe tuner after a bandpass filter which can select out > > individual overtones. This effect is due to the non-zero > > diameter and stiffness of the strings, which are usually > > abstracted out of common 2nd order differential equation > > models. I've also seen this effect from guitars and string > > bass. It's worse for the cheapest kid-sized guitars and > > spinet pianos, which might be part of why they sound so bad. > > There is even more going on: > > A guitar string is often played fretted. This divides the string into > two parts. One vibrating over the resonant body or pickup, and one > resonating on the fretboard. This contributes frequencies that are not > related to the fundamental. > > Little bends and kinks from picking and fretting create unrelated > partials as well. > > Each of this side-effects alone does not make much of a difference, but > add all of these imperfections up and it becomes a important part of the > liveliness, sparke, charm. > > > Not sure if this inharmonicity occurs with any non-stringed > > musical instruments... anyone know? > > I think gongs, bells, xylophones, vibraphones and all the like create > partials that are all over the place.
It would be interesting to see what this celemony app does with chords playing on multiple of the above instruments...
Reply by Jerry Avins April 8, 20082008-04-08
Ron N. wrote:
> On Apr 8, 2:43 pm, Jerry Avins <j...@ieee.org> wrote: >> Richard Owlett wrote: >>> Andor wrote: >>>> [ *MAJOR* snip ] >>>>> In perfect Western equally tempered tuning, the harmonics are >>>>> at slightly different frequencies, perhaps beyond the time >>>>> frequency resolution of a sub-note length STFT. And real >>>>> instruments may not be tuned this precisely. So even if >>>>> you could use some sort of pattern recognition to factor >>>>> each harmonic into fractional portions, you would need a >>>>> filter that could slice those harmonics very thinly. >>>> Agreed. But it is doable. One would have to also consider that for >>>> example piano notes don't necessarily have integer multiple harmonics >>>> of the fundamental. Don't know how relevant that effect is, but it >>>> could be taken into account (simply guess at what frequency the >>>> harmonic should lie, based on the fundamental, then measure the exact >>>> harmonic frequency). >>> Considering "piano notes": >>> What would the effect of a "single" piano note being produced by *3* >>> somewhat isolated strings. *IF* I understand piano tuning/voicing >>> correctly, might not each string be tuned slightly differently. >> The strings are deliberately tuned a bit off, but not so far off that >> the bridge doesn't force them into synchrony. The result of this tuning >> is a longer sustain. > > However, for the low notes on a piano, the "harmonics" are > often not exact integer multiples of fundamental frequency. > You can see this as a "creep" in the waveform shape of a > piano note as it evolves over time, or on a synchronous > strobe tuner after a bandpass filter which can select out > individual overtones. This effect is due to the non-zero > diameter and stiffness of the strings, which are usually > abstracted out of common 2nd order differential equation > models. I've also seen this effect from guitars and string > bass. It's worse for the cheapest kid-sized guitars and > spinet pianos, which might be part of why they sound so bad. > > Not sure if this inharmonicity occurs with any non-stringed > musical instruments... anyone know?
The very low notes are produced by single strings. The middle register has two strings and the upper register, three. Yes, the strings are inharmonic, but that is unrelated to the stagger tuning (to steal a term from IF strips). Strings are inharmonic primarily because of stiffness. With the ideal strings of mathematical treatment, all the restoring force is assumed to arise from tension. Real strings don't behave that way, but wound strings approach it more closely than solid ones. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Nils April 8, 20082008-04-08
Ron N. schrieb:

> However, for the low notes on a piano, the "harmonics" are > often not exact integer multiples of fundamental frequency. > You can see this as a "creep" in the waveform shape of a > piano note as it evolves over time, or on a synchronous > strobe tuner after a bandpass filter which can select out > individual overtones. This effect is due to the non-zero > diameter and stiffness of the strings, which are usually > abstracted out of common 2nd order differential equation > models. I've also seen this effect from guitars and string > bass. It's worse for the cheapest kid-sized guitars and > spinet pianos, which might be part of why they sound so bad.
There is even more going on: A guitar string is often played fretted. This divides the string into two parts. One vibrating over the resonant body or pickup, and one resonating on the fretboard. This contributes frequencies that are not related to the fundamental. Little bends and kinks from picking and fretting create unrelated partials as well. Each of this side-effects alone does not make much of a difference, but add all of these imperfections up and it becomes a important part of the liveliness, sparke, charm.
> Not sure if this inharmonicity occurs with any non-stringed > musical instruments... anyone know?
I think gongs, bells, xylophones, vibraphones and all the like create partials that are all over the place. Nils
Reply by Ron N. April 8, 20082008-04-08
On Apr 8, 2:43 pm, Jerry Avins <j...@ieee.org> wrote:
> Richard Owlett wrote: > > Andor wrote: > >> [ *MAJOR* snip ] > >>> In perfect Western equally tempered tuning, the harmonics are > >>> at slightly different frequencies, perhaps beyond the time > >>> frequency resolution of a sub-note length STFT. And real > >>> instruments may not be tuned this precisely. So even if > >>> you could use some sort of pattern recognition to factor > >>> each harmonic into fractional portions, you would need a > >>> filter that could slice those harmonics very thinly. > > >> Agreed. But it is doable. One would have to also consider that for > >> example piano notes don't necessarily have integer multiple harmonics > >> of the fundamental. Don't know how relevant that effect is, but it > >> could be taken into account (simply guess at what frequency the > >> harmonic should lie, based on the fundamental, then measure the exact > >> harmonic frequency). > > > Considering "piano notes": > > What would the effect of a "single" piano note being produced by *3* > > somewhat isolated strings. *IF* I understand piano tuning/voicing > > correctly, might not each string be tuned slightly differently. > > The strings are deliberately tuned a bit off, but not so far off that > the bridge doesn't force them into synchrony. The result of this tuning > is a longer sustain.
However, for the low notes on a piano, the "harmonics" are often not exact integer multiples of fundamental frequency. You can see this as a "creep" in the waveform shape of a piano note as it evolves over time, or on a synchronous strobe tuner after a bandpass filter which can select out individual overtones. This effect is due to the non-zero diameter and stiffness of the strings, which are usually abstracted out of common 2nd order differential equation models. I've also seen this effect from guitars and string bass. It's worse for the cheapest kid-sized guitars and spinet pianos, which might be part of why they sound so bad. Not sure if this inharmonicity occurs with any non-stringed musical instruments... anyone know? IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M http://www.nicholson.com/rhn/dsp.html
Reply by Jerry Avins April 8, 20082008-04-08
Richard Owlett wrote:
> Andor wrote: >> [ *MAJOR* snip ] >>> In perfect Western equally tempered tuning, the harmonics are >>> at slightly different frequencies, perhaps beyond the time >>> frequency resolution of a sub-note length STFT. And real >>> instruments may not be tuned this precisely. So even if >>> you could use some sort of pattern recognition to factor >>> each harmonic into fractional portions, you would need a >>> filter that could slice those harmonics very thinly. >> >> >> Agreed. But it is doable. One would have to also consider that for >> example piano notes don't necessarily have integer multiple harmonics >> of the fundamental. Don't know how relevant that effect is, but it >> could be taken into account (simply guess at what frequency the >> harmonic should lie, based on the fundamental, then measure the exact >> harmonic frequency). >> > > Considering "piano notes": > What would the effect of a "single" piano note being produced by *3* > somewhat isolated strings. *IF* I understand piano tuning/voicing > correctly, might not each string be tuned slightly differently.
The strings are deliberately tuned a bit off, but not so far off that the bridge doesn't force them into synchrony. The result of this tuning is a longer sustain.
> > If you really want to go out into "La La" land, "What problems would > there be with a tractor action pipe organ?"
Organ harmonics are exact because of the coupling at the whistle. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Ron N. April 8, 20082008-04-08
On Apr 8, 12:52 pm, Andor <andor.bari...@gmail.com> wrote:
> Ron N. wrote: > > On Apr 8, 7:43 am, Andor wrote: > > > > On 8 Apr., 10:01, Steve Underwood <ste...@dis.org> wrote: > > > > > Al Clark wrote: > > > > > "VelociChicken" <b...@yahoob.com> wrote in > > > > >news:0GmJj.25$Wf3.4@newsfe16.ams2: > > > > > >>>>> Hi, > > > > > >>>>> I've always been interested in DSP methods to decompose a piece of > > > > >>>>> music into discrete instruments. I came across this new tool that's > > > > >>>>> pretty fascinating: > > > > > >>>>>http://www.celemony.com/cms/index.php?id=dna&L=0 > > > > > >>>>> How do you think something like this works? Considering an acoustic > > > > >>>>> guitar chord and all its intermixed, varying and slightly non-integer > > > > >>>>> harmonics, how would one go about separating such a signal into > > > > >>>>> individual > > > > >>>>> notes that actually sound pretty clean? > > > > >>>> of course i don't know exactly how they did it. i doubt that they are > > > > >>>> assuming any non-integer harmonics. if it were non-real-time, i could > > > > >>>> imaging processing the audio with a set of cascaded, adjustable comb- > > > > >>>> filters (where the notches are at the harmonic frequencies) until they > > > > >>>> get something that is residual. dealing with the attacks is another > > > > >>>> problem. dealing with harmonics of two different notes that land on > > > > >>>> top of each other is another problem. > > > > > >>>> lot'sa problems. dunno how they dealt with them all. but, from what > > > > >>>> i have seen in Electronic Musician, i think this is no bogus product. > > > > >>>> i think it's real. i'm looking forward to finding their booth at the > > > > >>>> AES show in October (they better the hell be there). > > > > >>> I'd agree with your assessment of "lot'sa problems" if I hadn't heard > > > > >>> the short talk by the guy behind it. He makes it sound like something > > > > >>> clicked in his mind, and made him realise that something which was not > > > > >>> rigorous was going to fail with sufficient rarity for it to useful. He > > > > >>> makes it sound like the magic trick was one key insight. > > > > >> Well, you've got to start somewhere. I've been looking at Continuous > > > > >> Wavelet's, and as the data is pre-processed I guess you could do a lot > > > > >> in the analysis stage. How about a CWT at note resolution pitches? It > > > > >> would give you the fundamentals, and a nice hi-res spectrum. > > > > >> If it's designed mainly for one instrument, it could use different > > > > >> number of notes played at once to figure out the harmonics of each > > > > >> through-out the piece. But like someone above said, there's a lot of > > > > >> potential breakages, and it completely depends on the source material. > > > > >> VC > > > > > > I have never tried to solve this problem, but it seems to me a cepstrum > > > > > approach might be useful. > > > > > > A cepstrum (spectrum spelled sideways), is a forward FFT of an FFT power > > > > > spectrum. The bins represents harmonics of the original FFT. > > > > > > It's been a long time since I looked at cepstrum, but I know that they have > > > > > been used to help isolate components in mechanical systems like gear boxes. > > > > > I think their might be some old Bruel & Kjaer application notes on this > > > > > idea. > > > > > Cepstrums are widely used in speech analysis for isolating components, > > > > too. Thats not a million kilometres away from music analysis, so > > > > cepstral analysis might well be involved. > > > > If I were to tackle this problem, I would start off with an STFT > > > decomposition (spectrogram) of the signal (alternatively, use wavlet > > > decomposition). > > > > Assume that the signal consists of a piano (or guitar) chord, possibly > > > with delayed starting points of each separate note. Then each note > > > generates multiple "stripes" of harmonics in the spectrogram, spaced > > > by the fundamental frequency of that note. Group the "stripes" into > > > notes (starting positions might help). For a given fundamental > > > "stripe", only stripes that lie on multiples of the fundamental > > > frequency belong to that note. > > > > Once the harmonics are grouped notes, filter out the harmonics of the > > > signal. To do this, programm a bunch of linear-phase FIR bandpass > > > filters, one filter for each detected harmonic. The bandpass frequency > > > is given by the offset of the stripe. The filters are time-varying, > > > switching on at the beginning of the stripe and switching off at the > > > end of the stripe. > > > > There already exists a plug-in that does exactly what I described in > > > the second paragraph (http://www.algorithmix.com/en/renovator.htm), so > > > the novelty lies in grouping the harmonics into notes. That doesn't > > > look like too hard a problem. > > > > Once the notes are seperated, use existing pitch-shifting and time- > > > stretching algorithms on the single notes. > > > > Easy. > > > > :-) > > > In Western music, one property of the most common chords is > > that the harmonics of several notes in these chords overlap. > > If you group a harmonic into one note, then you will "hollow > > out" the sound of one or more other notes which include that > > same harmonic. To avoid this, your scheme might have to also > > potentially factor each harmonic into fractions apportioned > > among different groups. > > That should be possible. One can interpolate the appropriate amplitude > from the neighbouring harmonics.
Assuming that you have un-mixed these neighboring harmonics first, or at the same time, and that you have a model of the harmonic envelope (or formant) which may be varying with time as well as several other parameters (which instrument, which string, dynamics, & etc.). Where do you get these models?
> > In perfect Western equally tempered tuning, the harmonics are > > at slightly different frequencies, perhaps beyond the time > > frequency resolution of a sub-note length STFT. And real > > instruments may not be tuned this precisely. So even if > > you could use some sort of pattern recognition to factor > > each harmonic into fractional portions, you would need a > > filter that could slice those harmonics very thinly. > > Agreed. But it is doable. One would have to also consider that for > example piano notes don't necessarily have integer multiple harmonics > of the fundamental. Don't know how relevant that effect is, but it > could be taken into account (simply guess at what frequency the > harmonic should lie, based on the fundamental, then measure the exact > harmonic frequency).
The problem is more that the algorithm may need to measure and then separate an extremely narrowband mix of several harmonics (one for each note in a chord) that may differ by only a small fraction of a percent in frequency (a few cents), if at all. Not sure what would happen if you put the wrong harmonic (at almost the right frequency) with a given note. If the note has vibrato, or a bend, this would certain cause weird artifacts.
> > For some instruments, you might be able to filter out some > > fractional harmonic content by phase locking a quadrature > > filter to the fundamental; but for other instruments (piano, > > for instance), the relationship of a note to its harmonics > > may not be an exact integer ratio. An interesting problem. > > Indeed, an interesting problem. > > Regards, > Andor
IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Reply by Richard Owlett April 8, 20082008-04-08
Andor wrote:
> [ *MAJOR* snip ] >>In perfect Western equally tempered tuning, the harmonics are >>at slightly different frequencies, perhaps beyond the time >>frequency resolution of a sub-note length STFT. And real >>instruments may not be tuned this precisely. So even if >>you could use some sort of pattern recognition to factor >>each harmonic into fractional portions, you would need a >>filter that could slice those harmonics very thinly. > > > Agreed. But it is doable. One would have to also consider that for > example piano notes don't necessarily have integer multiple harmonics > of the fundamental. Don't know how relevant that effect is, but it > could be taken into account (simply guess at what frequency the > harmonic should lie, based on the fundamental, then measure the exact > harmonic frequency). >
Considering "piano notes": What would the effect of a "single" piano note being produced by *3* somewhat isolated strings. *IF* I understand piano tuning/voicing correctly, might not each string be tuned slightly differently. If you really want to go out into "La La" land, "What problems would there be with a tractor action pipe organ?"
Reply by Andor April 8, 20082008-04-08
Ron N. wrote:
> On Apr 8, 7:43 am, Andor wrote: > > > > > > > On 8 Apr., 10:01, Steve Underwood <ste...@dis.org> wrote: > > > > Al Clark wrote: > > > > "VelociChicken" <b...@yahoob.com> wrote in > > > >news:0GmJj.25$Wf3.4@newsfe16.ams2: > > > > >>>>> Hi, > > > > >>>>> I've always been interested in DSP methods to decompose a piece of > > > >>>>> music into discrete instruments. &#4294967295;I came across this new tool that's > > > >>>>> pretty fascinating: > > > > >>>>>http://www.celemony.com/cms/index.php?id=dna&L=0 > > > > >>>>> How do you think something like this works? &#4294967295;Considering an acoustic > > > >>>>> guitar chord and all its intermixed, varying and slightly non-integer > > > >>>>> harmonics, how would one go about separating such a signal into > > > >>>>> individual > > > >>>>> notes that actually sound pretty clean? > > > >>>> of course i don't know exactly how they did it. &#4294967295;i doubt that they are > > > >>>> assuming any non-integer harmonics. &#4294967295;if it were non-real-time, i could > > > >>>> imaging processing the audio with a set of cascaded, adjustable comb- > > > >>>> filters (where the notches are at the harmonic frequencies) until they > > > >>>> get something that is residual. &#4294967295;dealing with the attacks is another > > > >>>> problem. &#4294967295;dealing with harmonics of two different notes that land on > > > >>>> top of each other is another problem. > > > > >>>> lot'sa problems. &#4294967295;dunno how they dealt with them all. &#4294967295;but, from what > > > >>>> i have seen in Electronic Musician, i think this is no bogus product. > > > >>>> i think it's real. &#4294967295;i'm looking forward to finding their booth at the > > > >>>> AES show in October (they better the hell be there). > > > >>> I'd agree with your assessment of "lot'sa problems" if I hadn't heard > > > >>> the short talk by the guy behind it. He makes it sound like something > > > >>> clicked in his mind, and made him realise that something which was not > > > >>> rigorous was going to fail with sufficient rarity for it to useful. He > > > >>> makes it sound like the magic trick was one key insight. > > > >> Well, you've got to start somewhere. I've been looking at Continuous > > > >> Wavelet's, and as the data is pre-processed I guess you could do a lot > > > >> in the analysis stage. How about a CWT at note resolution pitches? It > > > >> would give you the fundamentals, and a nice hi-res spectrum. > > > >> If it's designed mainly for one instrument, it could use different > > > >> number of notes played at once to figure out the harmonics of each > > > >> through-out the piece. But like someone above said, there's a lot of > > > >> potential breakages, and it completely depends on the source material. > > > >> VC > > > > > I have never tried to solve this problem, but it seems to me a cepstrum > > > > approach might be useful. > > > > > A cepstrum (spectrum spelled sideways), is a forward FFT of an FFT power > > > > spectrum. The bins represents harmonics of the original FFT. > > > > > It's been a long time since I looked at cepstrum, but I know that they have > > > > been used to help isolate components in mechanical systems like gear boxes. > > > > I think their might be some old Bruel & Kjaer application notes on this > > > > idea. > > > > Cepstrums are widely used in speech analysis for isolating components, > > > too. Thats not a million kilometres away from music analysis, so > > > cepstral analysis might well be involved. > > > If I were to tackle this problem, I would start off with an STFT > > decomposition (spectrogram) of the signal (alternatively, use wavlet > > decomposition). > > > Assume that the signal consists of a piano (or guitar) chord, possibly > > with delayed starting points of each separate note. Then each note > > generates multiple "stripes" of harmonics in the spectrogram, spaced > > by the fundamental frequency of that note. Group the "stripes" into > > notes (starting positions might help). For a given fundamental > > "stripe", only stripes that lie on multiples of the fundamental > > frequency belong to that note. > > > Once the harmonics are grouped notes, filter out the harmonics of the > > signal. To do this, programm a bunch of linear-phase FIR bandpass > > filters, one filter for each detected harmonic. The bandpass frequency > > is given by the offset of the stripe. The filters are time-varying, > > switching on at the beginning of the stripe and switching off at the > > end of the stripe. > > > There already exists a plug-in that does exactly what I described in > > the second paragraph (http://www.algorithmix.com/en/renovator.htm), so > > the novelty lies in grouping the harmonics into notes. That doesn't > > look like too hard a problem. > > > Once the notes are seperated, use existing pitch-shifting and time- > > stretching algorithms on the single notes. > > > Easy. > > > :-) > > In Western music, one property of the most common chords is > that the harmonics of several notes in these chords overlap. > If you group a harmonic into one note, then you will "hollow > out" the sound of one or more other notes which include that > same harmonic. &#4294967295;To avoid this, your scheme might have to also > potentially factor each harmonic into fractions apportioned > among different groups.
That should be possible. One can interpolate the appropriate amplitude from the neighbouring harmonics.
> In perfect Western equally tempered tuning, the harmonics are > at slightly different frequencies, perhaps beyond the time > frequency resolution of a sub-note length STFT. &#4294967295;And real > instruments may not be tuned this precisely. &#4294967295;So even if > you could use some sort of pattern recognition to factor > each harmonic into fractional portions, you would need a > filter that could slice those harmonics very thinly.
Agreed. But it is doable. One would have to also consider that for example piano notes don't necessarily have integer multiple harmonics of the fundamental. Don't know how relevant that effect is, but it could be taken into account (simply guess at what frequency the harmonic should lie, based on the fundamental, then measure the exact harmonic frequency).
> For some instruments, you might be able to filter out some > fractional harmonic content by phase locking a quadrature > filter to the fundamental; but for other instruments (piano, > for instance), the relationship of a note to its harmonics > may not be an exact integer ratio. &#4294967295;An interesting problem.
Indeed, an interesting problem. Regards, Andor