|
Welcome to the Piano World Piano Forums Over 3 million posts about pianos, digital pianos, and all types of keyboard instruments. Over 100,000 members from around the world.
Join the World's Largest Community of Piano Lovers
(it's free)
It's Fun to Play the Piano ... Please Pass It On!
|
|
66 members (brennbaer, accordeur, antune, Colin Miles, anotherscott, AndyOnThePiano2, benkeys, 12 invisible),
1,850
guests, and
315
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Joined: Jan 2021
Posts: 173
Full Member
|
OP
Full Member
Joined: Jan 2021
Posts: 173 |
Ed, this is an interesting use case. Would you even need the device to calculate a stretch for you? If not, how should a partial-centered scale look like to suit your needs? Would it simply show the deviation from ET in cents?
|
|
|
|
Joined: Jan 2021
Posts: 173
Full Member
|
OP
Full Member
Joined: Jan 2021
Posts: 173 |
Ron, in build 373 I fixed a regression which might explain why the overpull was a bit too strong for you. The overpull indicator triangles were wrongly aligned, so that their left edge pointed to the tuning target instead of their center.
|
|
|
|
Joined: Jan 2011
Posts: 1,734
1000 Post Club Member
|
1000 Post Club Member
Joined: Jan 2011
Posts: 1,734 |
The measurement techniques I am aware of are: Direct frequency count, Frequency comparison (strobe technique), and Period Average. There's also auto-correlation which is possible but I don't know if any tuning apps use it. To implement it, the raw audio data is scanned by adjacent blocks to test if the blocks are similar. If the block sizes are successively increased in size, and the comparisons are logged in an array, a spectrum is built up. The spectrum, which is sample based not frequency based, will have peaks where any adjacent blocks are similar. For a given audio frequency there will actually be a series of peaks spaced apart by the number of samples corresponding to that frequency. The resolution of the peak spacing is however limit by the sample rate of the audio capture, and is consequently limited to a few hertz in the centre range when the peak spacing is converted to frequency. However, the spectrum could have easily a hundred or so peaks depending on your buffer size and the particular frequency sounding. This property of repeating peaks in the spectrum enables the resolution to be increased about a hundred-fold down to the one tenth or one hundredth of a hertz by, for example, averaging all of the peak spacings. I am sorry that this has been hard to describe, but I have done this with my hobby programming and I have used it to measure frequencies from notes on pianos that I tune in my professional life. I am happy to share any code that I have written that implements this method.
|
|
|
|
Joined: Jan 2021
Posts: 173
Full Member
|
OP
Full Member
Joined: Jan 2021
Posts: 173 |
Chris, what is your experience in using autocorrelation for piano tones? I tried to use the Yin algorithm for mere coarse note detection and it fails miserably for low notes. But I think autocorrelation in principle cannot work reliably with inharmonic signals. Especially not if you need precision.
|
|
|
|
Joined: Jan 2011
Posts: 1,734
1000 Post Club Member
|
1000 Post Club Member
Joined: Jan 2011
Posts: 1,734 |
The method I have described appears to be useless at measuring partials from real piano tones. They can be seen in the spectra but are weak and ephemeral. It is only the fundamental that is strong. Actually, fundamentals appear to be detected well down to quite low frequencies, but of course the periods become very long.
I don't know about the Yin algorithm but it must work differently. I just make up my own from basic principles.
|
|
|
|
Joined: Jan 2021
Posts: 173
Full Member
|
OP
Full Member
Joined: Jan 2021
Posts: 173 |
Interesting. Yin is also using autocorrelation. This is the original paper: http://audition.ens.fr/adc/pdf/2002_JASA_YIN.pdf Most of the guitar/violin tuning apps use it but they deal with harmonic spectra.
Last edited by Frank Illenberger; 03/12/21 07:51 AM.
|
|
|
|
Joined: Dec 2003
Posts: 420
Full Member
|
Full Member
Joined: Dec 2003
Posts: 420 |
There's also auto-correlation which is possible but I don't know if any tuning apps use it. I will second Frank's comment about auto-correlation and inharmonic signals. It does not work. I have another app that uses auto-correlation very successfully. It is called Engine RPM, for both iPhone and Android. It listens to the sound of an engine (lawn mower, airplane, motorcycle) and determines the RPM from the frequency extracted by auto-correlation. Although engine sounds can be really crazy with their high harmonics and lack of a fundamental and noise, they are harmonic. But with piano strings with inharmonicity, the peaks vary, depending on how the partials align on each particular cycle. In fact, there is no clear definition of a cycle because the signal is not cyclic. It does not repeat. It just keeps changing through what looks like "almost periods."
|
|
|
|
Joined: Jan 2014
Posts: 401
Full Member
|
Full Member
Joined: Jan 2014
Posts: 401 |
I've also tried and failed in using auto-correlation to measure the pitch of piano tones. At least in a way that was useful or accurate enough for what I needed. I ran into inharmonicity issues in the bass and resolution issues in the treble.
|
|
|
|
Joined: May 2007
Posts: 3,202
3000 Post Club Member
|
3000 Post Club Member
Joined: May 2007
Posts: 3,202 |
I've added Pianoscope, with link and photo, to the Electronic Tuning page of my website https://www.davidboyce.co.uk/electronic-tuning.php
Last edited by David Boyce; 03/12/21 07:53 PM.
|
|
|
|
Joined: Dec 2012
Posts: 6,714
6000 Post Club Member
|
6000 Post Club Member
Joined: Dec 2012
Posts: 6,714 |
For auto note detection, why not make a "virtual" sweep filter that is triggered by hammer knock and starts low and stops when it first gets an auto-correlation. You don't need to see any piano frequencies below about 200HZ. So that is where you could begin your sweep. There is enough fundamental in the notes of that range of the compass. Then manually "lock" the filter at that pitch to do fine measurement.
In a seemingly infinite universe-infinite human creativity is-seemingly possible. According to NASA, 93% of the earth like planets possible in the known universe have yet to be formed. Contact: toneman1@me.com
|
|
|
|
Joined: Jan 2021
Posts: 173
Full Member
|
OP
Full Member
Joined: Jan 2021
Posts: 173 |
For auto note detection, why not make a "virtual" sweep filter that is triggered by hammer knock and starts low and stops when it first gets an auto-correlation This is mathematically equivalent to finding peaks in a Fourier spectrum. The spectrum additionally has the advantage that one ist getting the full picture and can immediately derive the inharmonicity and partial distribution across the compass which you need anyway to calculate a stretch. And you can apply better heuristics to decide whether a transient is indeed a hammer knock or just a bird chirping or someone coughing in the background. I still remember my frustration when six months ago I was demoing an early version of pianoscope in a piano store in Frankfurt. Before I had only tested it in my quiet home, but there people were talking in the background, coughig, kids voices etc. And my hammer knock attack dection locked on to all of them and the demo did not go well. Then manually "lock" the filter at that pitch to do fine measurement. This is what I am doing.
|
|
|
|
Joined: Jan 2021
Posts: 173
Full Member
|
OP
Full Member
Joined: Jan 2021
Posts: 173 |
|
|
|
|
Joined: Jan 2021
Posts: 173
Full Member
|
OP
Full Member
Joined: Jan 2021
Posts: 173 |
My sincere thanks to you guys! Your feedback so far has been amazing. I will get to work and try to include everything that is possible into the app. I will start with improving the indication of the main tuning target, the zero. Anthony had the idea of permanently using the marker triangles I use for indicating the overpull targets. I perpared a few short video clips showing some variants. They play with permutations of different aspects: Showing or not showing a zero line, showing or not showing the zero number, small and large indicator triangles, more and less contrast for the triangles. If you want, you can vote which approach you think is best. Or maybe you have a completely different idea. 1) No Line / With Zero2) With line, without number3) No Line / No zero4) No Line / Indicator In Front5) More constrast and transparentI already have a favorite. But as a good scientist, I won't say that until after the vote.
|
|
|
|
Joined: Jan 2021
Posts: 173
Full Member
|
OP
Full Member
Joined: Jan 2021
Posts: 173 |
Mmmh, I have now tested all the variants above thoroughly but interactively they do not improve visibility. I think will try a different appoach.
|
|
|
|
Joined: Dec 2012
Posts: 6,714
6000 Post Club Member
|
6000 Post Club Member
Joined: Dec 2012
Posts: 6,714 |
If you understand how all the coincident partials must relate to each other in the significant intervals and their placement across the compass, you only need to be measuring one partial matching range of pitch at a time to compare the tempering. I don't want the tuning instrument to tell ME how to temper a piano. I already know that, and all who seek to attain professional status should understand this as well.
I will never cede authority to a robot about what an in-tune state in a piano is.
I do want to be able to quickly make sure the notes don't drift at a very fine level.
In a seemingly infinite universe-infinite human creativity is-seemingly possible. According to NASA, 93% of the earth like planets possible in the known universe have yet to be formed. Contact: toneman1@me.com
|
|
|
|
Joined: Nov 2010
Posts: 717
500 Post Club Member
|
500 Post Club Member
Joined: Nov 2010
Posts: 717 |
At the moment, the meter displays +/- 100c - the means, once you're getting close to in-tune most of the display is not used for any useful information. How about if you could have selected zooms of say +/- 10c and +/- 3c ? Of course, the strobe is useful once you're under 3c deviation too - but it would be good if the meter itself could be zoomed (and maybe a different level of smoothing as well for the smaller deviation displays that perhaps has the line stop after some short (maybe configurable) period of time at the average reading. When the line is moving around (as it inevitably does) - it's hard to know what the final value really is.
Paul.
|
|
|
|
Joined: Jan 2021
Posts: 173
Full Member
|
OP
Full Member
Joined: Jan 2021
Posts: 173 |
As the scale in pianoscope is non-linear, one does not need a lot of zooming. I played a bit with automatic scale switching but it turned out to be more confusing for the user that useful. But, what I could do is offer a general setting, whether you want the scale to be from -100 to +100 or only from -50 to +50. In the latter case with a non-linear scale you would already have far more precision in the center than you would need for any real world piano.
|
|
|
|
Joined: Jan 2004
Posts: 2,868
2000 Post Club Member
|
2000 Post Club Member
Joined: Jan 2004
Posts: 2,868 |
I tuned a Kawai upright today where the display just had a tough time stabilizing. I've been running side-by-side with Verituner which must use a much stronger smoothing function in the setting I am using; it was much more stable.
I guess that is one of the trade-offs, an accurate display of the pitch over time and possibly partials fighting for dominance, or a potentially artificial stable display?
I'm realizing that it isn't really needed to measure all of the notes - just the bass up to the midrange where the dots get really linear.
Ron Koval
|
|
|
|
Joined: Aug 2013
Posts: 600
500 Post Club Member
|
500 Post Club Member
Joined: Aug 2013
Posts: 600 |
Mmmh, I have now tested all the variants above thoroughly but interactively they do not improve visibility. I think will try a different appoach. There is a technique for learning to accurately cut chiseled notches: Do not mark the notch with a hairline thin pencil line because the learner will spend many efforts to line up the chisel perfectly, starting over and over, and never attaining perfection. Instead, begin with a blunt pencil and make a line wide enough that the learner can usually place the chisel edge within the line with a direct movement. As the learner develops skill, showing smooth, even motions, make the pencil point a little less blunt and see if the learner can attain smooth working to the narrower target. Continue as possible, but realize that good work is not about absolute perfection, it is about attaining good quality through smooth, efficient effort. Having said this, I found that the "hole" in the zero was my "blunt pencil line." I could work smoothly by getting the line in the circle and moving on. Perhaps there could be an effect as if there was a magnifier above the zero, so that as the line approaches the zero, both of them enlarge, but the target hole in the zero is always a little wider than the line. By the way, I appreciate the ability to choose line, strobe or cents deviation. I was surprised that I could use all simultaneously in your display, as I was never able to make friends with the TuneLab display, where each piece of information distracts my focus. This is a very nice program.
Ed Sutton, RPT Just an old retired piano tuner! Durham NC USA
|
|
|
Forums43
Topics223,390
Posts3,349,223
Members111,632
|
Most Online15,252 Mar 21st, 2010
|
|
|
|
|
|