rerdavies / pipedal

Guitar Effect Pedal for Raspberry Pi, with a web interface designed specifically for phones.
https://rerdavies.github.io/pipedal/
Other
95 stars 7 forks source link

Erratic tuner readings #167

Closed EE1977 closed 1 month ago

EE1977 commented 3 months ago

Hey Robin, just wanted to say a big thank you for all the hard work you put into making Pipedal such a stellar application!

I tried using the Toob tuner for the first time with my violin on stage, but I ran into some issues. The values on the screen were all over the place, and the needle was moving so quickly that I couldn't get a clear reading. It felt like the plugin was overly sensitive and unresponsive. I played with the sensitivity knob for a little but it didn't solve the problem. I've tried other Android tuners in the past, but they didn't behave this way, so there must be something with the way the plugin processes the input signal. Do you think the tuner's range around the target pitch is too narrow, maybe less than 50 cents? Or maybe adding a bit of delay or averaging while sampling could help solve the issue?

Let me know if you have any thoughts on this!

rerdavies commented 3 months ago

To be honest it was designed with guitars in mind where you can definitely get well I don't know maybe three cents tuning accuracy. You might want to try the Guitarix GxTuner, which is admittedly much less twitchy than the tube tuner/

On Tue, Aug 13, 2024, 06:01 Elen Steinhoff @.***> wrote:

Hey Robin, just wanted to say a big thank you for all the hard work you put into making Pipedal such a stellar application!

I tried using the Toob tuner for the first time with my violin on stage, but I ran into some issues. The values on the screen were all over the place, and the needle was moving so quickly that I couldn't get a clear reading. It felt like the plugin was overly sensitive and unresponsive. I played with the sensitivity knob for a little but it didn't solve the problem. I've tried other Android tuners in the past, but they didn't behave this way, so there must be something with the way the plugin processes the input signal. Do you think the tuner's range around the target pitch is too narrow, maybe less than 50 cents? Or maybe adding a bit of delay or averaging while sampling could help solve the issue?

Let me know if you have any thoughts on this!

— Reply to this email directly, view it on GitHub https://github.com/rerdavies/pipedal/issues/167, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXK2DCGA5DUOZFUFOEU5NLZRHKRNAVCNFSM6AAAAABMN5M2EWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3DEOJTGY4DCNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

EE1977 commented 3 months ago

Thank you for the quick response!! I'll give GxTuner a try and I'll report back here.

EE1977 commented 1 month ago

Hi Robin!!

I can confirm that now with 1.3.57 the GxTuner works with my violin. Previous versions of Pipedal gave erratic readings even with gxtuner. Just for the reference, there are still some buggy readings, but only playing upper positions.

However, still no luck with ToobTuner.

EE1977 commented 1 month ago

I'd also like to ask. Why don't other tuners like the x42 or Stomptuner load a graphical interface (e.g. tuning needle) like the Gx and Toob tuners?

rerdavies commented 1 month ago

Most likely because they don't put appropriate declarations in their manifest about the type of the output control for the tuning value.

I have to declare an output control with a type of midi note/

But I'll take a look at them and see what I can do.

On Wed, Oct 16, 2024, 03:59 Elen Steinhoff @.***> wrote:

I'd also like to ask. Why don't other tuners like the x42 or Stomptuner load a graphical interface (e.g. tuning needle) like the Gx and Toob tuners?

— Reply to this email directly, view it on GitHub https://github.com/rerdavies/pipedal/issues/167#issuecomment-2416009850, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXK2DBPO3RWW5BXVHHRJBLZ3YMEPAVCNFSM6AAAAABMN5M2EWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJWGAYDSOBVGA . You are receiving this because you commented.Message ID: @.***>

rerdavies commented 1 month ago

Please try PiPedal v1.3.62. I think you will find that it has substantially addressed the stability issue.

wrt/ using PiPedal as a tuner for violin.... Be advised that TooB Tuner was definitely tweaked for standard guitar/bass pitch ranges. It ignores frequence below 42hz (the lowest note on a bass guitar), and above 1900hz (the very highest note on a guitar with 19 frets). The size of FFTs used was chosen to provide optimum response from 84hz to 1900hz. If you need that range extended to accommodate the highest notes on a violin, let me know. I imagine the bottom end of the range should be fine.

Also, TooB Tuner was tested on various actual guitar tuning notes, and on synthetic signals with varying noise floors. If it doesn't work with violin input signals, let me know, and perhaps we can arrange for you to provide me with recordings of input signals where TooB Tuner went wrong. In theory, TooB Tuner should really like violin input signals (saw-toothy, good harmonic overtone series, no problems with sharp attacks, or exponentially decaying volume). But how it deals with the different harmonic structure of the violin, and different fretboard effects on the signal, and whether it deals gracefully with vibrato or pitch slides on a violin is a complete unknown. And pizzicato inputs provide a unique set of additional challenges. Should be ok, but should be is not the same as "is".

Unit_ testing criteria were that the detected pitch should be +/- 0.25 cents from the true pitch, with the worst case errors found exclusively in the 42hz to 82hz range. If, for some reason, you find that isn't the case, I would definitely be interested in obtaining recordings of cases where TooB Tuner didn't do the right thing. (fwiw, know that GxTuner seems to be about 1.5 cents sharp for low-frequency inputs at the bottom of a guitar's range, and this is probably a pretty common defect among guitar tuners). I would also be interested if there are problems with identifying the correct octave of the input signal on violins (which is challenging for most pitch detection algorithms). If you see the detected octave fluttering back and forth between two different values (for pitches above 82Hz), I'd like to know.

Let me know how things work out, please.

EE1977 commented 1 month ago

Hi Robin!

Yes, the stability issue has been resolved, and now the performance reminds me of the GxTuner. I can easily tune open strings with overall excellent precision. However, octave detection is still a problem (similar to the GxTuner). For example, the violin's lowest note, G3 at 196 Hz, is displayed as G2 and so on. While this isn't a major issue in practice, it is worth noting. Additionally, any pitch above A4 (as said A5) at 880 Hz tends to be quite erratic and likely not usable (Gxtuner similarly reads up to B5@987,77Hz). Pitch bending works well as long as it is done slowly. However, vibrato readings are inconsistent, which I think could need some improvement. Tuning with pizzicato (upper positions) proved to be somewhat challenging. The tuner didn’t seem sensitive enough to accurately detect the pitch. I had to use the -60dB setting to achieve modest results. The tuner responded erratically to the note's attack, and the needle reading quickly vanished from the screen before settling on a pitch. However, pizzicato on open strings was quite good! For sure, I would prefer the needle reading's time to be extended a bit more.I found that I had the best results while bowing the instrument. Last but not least, if of any concern, I had slightly better results using my pickup, rather than my onboard microphone.

rerdavies commented 1 month ago

Ok, bug. TooB Tuner octave numbers are off by one. (196hz was correctly detected, but the octave display is wrong). I'll file a bug to that effect.

TooB Tuner current sub-samples audio in order to get better accuracy for lower pitches (it runs pitch detection using every other sample). It should probably subsample even more for bass guitars, and subsample less for violin. And perhaps do a bit more computing to cover the full range of a violin.

TooB Tuner probably needs an Instrument dropdown (Bass/Guitar/Violin). I'll add a feature request to that effect (medium priority). And close this defect.

rerdavies commented 1 month ago

Out of curiosity, would there be any demand for an Android tuner for violins? Is this a generic issue with guitar tuners? And would using a tuner to detect pitchiness be a part of standard violin practice? I ask, because if violinists only use tuners to tune open strings, a Violin tuner wouldn't be a terribly compelling app.

I ask because I have a (free) Android Guitar Tuner that could be adapted to violin pitch ranges.

rerdavies commented 1 month ago

Marking this as closed, with a follow-on bug (Octaves off by one), and a feature request (Instrument control for TooB Tuner, which would adjust the pitch detector algorithms for full violin pitch range).

EE1977 commented 1 month ago

A dedicated violin tuner could be a great idea. While tuning open strings on loud stages is standard practice, I sometimes find myself using a tuner during performances to verify my pitch, especially when playing alongside instruments that are not in equal temperament and are prone to pitch drift. However, the tuner needs to accommodate the nuances and specific characteristics of the violin, such as its extended range, vibrato, and the need to average pitch detection. I also believe that the tuner’s needle should move at a more relaxed pace, rather than fluctuating quickly.