Re: [Audacity-devel] Find Zero Crossing bug
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Al D. <bus...@gm...> - 2009-08-30 03:37:02
|
> Hi Al > > FWIW, most users I've ever seen commenting on zero crossings expect it to > simply find the nearest zero crossing. Maybe what we're trying to do is > better, and clearly we're making better decisions than before in many > cases. Still, I picked a small part of a stereo music track at random > (below) and I'm not sure the result is intuitive to (my) naked eye. > I'm not sure that what we're doing is better than simply finding the first ascending zero-crossing... > Here's a region before finding zero crossings, the "nearest" zero crossing > to the end is obviously at about 40.8486: > http://www.gaclrecords.org.uk/zero_crossing_before.png > > But we find the end crossing at 40.84755: > http://www.gaclrecords.org.uk/zero_crossing_after.png > > The 40.8486 crossing has the left channel sample dead on zero, and the > right channel has samples touching zero, above and below. The 40.84755 > crossing has the samples in the left channel above and below zero, and the > right channel has one touching zero (but not dead on it). So just on those > immediate samples, it seems we ought to go to 40.8486. > > Now I know you are doing something a bit different (taking weighted > averages of nearby samples) but I'm not sure this looks convincing. But in > your defence, if I select the left channel only, the end crossing goes to > 40.8486, where the sample clearly is closer to zero than the one at > 40.84755. So am I being over-concerned abut the samples closest in terms of > distance to the crossing, or are we spreading the average across too wide a > field? > > On another topic, I recall several complainants have suggested we should > always reduce the size of the region when finding crossings, the "loss" > being better than including parts that were not asked to be part of the > selection. Just throwing that in the ring. Just to look at Richard's > example, if we select 0.2325 - 0.2625 the region expands (0.232 to 0.2635). > > Or maybe we should simply find the nearest ascending zero-crossing that makes the selection size smaller. I have been working under the assumption that the existing code is as it is for a good reason. But it sure does produce some odd results, even with the patches I've added. At any rate, samples adjacent to a zero-crossing but far enough from zero to pop are likely to pop in their original context anyway, right? I'll try the approach of just finding the nearest zero-crossings that shrink the selection tomorrow. - Al |