Re: [Audacity-quality] bug 309 - Change Pitch effect
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Vaughan J. <va...@au...> - 2013-02-28 03:45:36
|
On 2/26/2013 6:07 PM, Steve the Fiddle wrote: > On 26 February 2013 23:58, Gale Andrews <ga...@au...> wrote: >> >> | From Steve the Fiddle <ste...@gm...> >> | Tue, 26 Feb 2013 21:31:49 +0000 >>> On 26 February 2013 18:46, Gale Andrews <ga...@au...> wrote: >>>> >>>> | From Steve the Fiddle <ste...@gm...> >>>> | Mon, 25 Feb 2013 19:15:15 +0000 >>>>> >>>>> The effect tries to estimate the frequency/pitch of the selected >>>>> audio, but often it will be unable to do so (for example if there are >>>>> multiple notes/frequencies present. Of course. Not enough dominant information. >>>... >>> Audacity is *attempting* to detect the pitch and sets the "Pitch From" >>> and "Frequency From" accordingly. Correct. EffectChangePitch::DeduceFrequencies(), etc. >>> >>> It's not quite as clear cut as "detected based on first samples". Enhancement suggestions are welcome. It's pretty dang good at what it does, in my experience. I think that original choice was a good one, as so much music starts at the tonic. >>>If >>> you have (for example) 0.1 seconds sine wave, amplitude 0.5 at 440Hz >>> (note "A") followed by 1 second sine wave amplitude 1.0 261.626 Hz >>> (middle C), then it is detected as "C", but if the second tone also >>> has an amplitude of 0.5 then it is detected as "A". >> >> Cunning, but if we were really trying to detect tonality in a piece >> of music as most users think, why not take into account the end? >> Far more pieces of tonal music end on the tonic than start on it, >> surely? Probably more, but I doubt it is far more, over all genres of music. And often the final samples are much richer in lots of pitches/overtones. Hmm, lots of arpeggios, so maybe the tonic could be derived from those, figuring out relative pitches in the arpeggio... >> >> >>> I've not looked deeply into the mysterious algorithm that Audacity >>> uses to determine the pitch/frequency, but I think that it is probably >>> sufficient to just say that Audacity attempts to automatically >>> determine the pitch (but that it may not always be possible to do so). Too bad Dominic did not document in the code the name of the algorithm he used. You might be able to find it in the audacity-devel archives -- I think he mentioned it there. As I recall, it was the current academically-proven, reasonably fast method at the time. If there are better methods now, as probably there are, we can certainly upgrade. >>> >>> I rarely use this effect and I don't know how useful others find >>> Audacity's attempt to automatically set the "From" pitch and >>> frequency. >>> >>> With simple generated tones it seems to be accurate, but testing with >>> recordings of my (not very tuneful but "in tune") voice and comparing >>> against Plot Spectrum it is less accurate. >> >> Yes, I've noticed it on occasion to be less accurate than Plot Spectrum >> for single lines, too. Users trying to use Change Pitch to "retune" a >> note quite often point out that pitch detection is wrong. If you have time to compare the algorithms, that might be a start. Certainly reasonable, if the Plot Spectrum computation is more accurate, to encapsulate it and have both features use that. >> >> >>> With polyphonic music it frequently fails because there is often not >>> "one" pitch to detect. Yes. > > I've still not looked to see exactly what the code is trying to do, > but yes, beyond analysing simple periodic waveforms pitch detection > rapidly becomes a very complex task. Certainly. - V |