billthefarmer / tuner

Android accordion tuner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add octave 8 to octave filter

malberts opened this issue · comments

This issue applies to the filter branch: https://github.com/billthefarmer/tuner/tree/filter/

I originally only went up to octave 7 based on the range for a piano accordion as per Wikipedia:
https://en.wikipedia.org/wiki/Piano_accordion

But it turns out that CBA's can actually go up to octave 8:
https://en.wikipedia.org/wiki/Chromatic_button_accordion

We will need to add octave 8 to the list of available octaves, unless there is a technical reason for the app not being able to detect frequencies that high.

Issue source: https://accordionists.co.uk/viewtopic.php?f=3&t=5561#p55917

I shall do that, it might just about work. The sample rate is 11025, so it can reliably work up to nearly half that, which should be high enough for c#8. On other platforms the app has to negotiate for a working sample rate, so it might not.

Correction: It actually goes up to c8 - 23 cents - 4130Hz.

In other news, completely off topic, the Carbon version builds and works fine on High Sierra, the latest OSX version, despite what the docs say. I do love old stuff that still works just like new. I've got a digital alarm clock I built from a kit in about 1973. It's been working fine continuously for 45 years now. And my Hohner Liliput which was build before 1935.

I've increased the range, it now goes up d8 + 45 cents - 4822Hz.

That change is very simple, in the linux version you just need to change one enum item here to

 RANGE = SAMPLES * 7 / 16,

I tested this briefly in my Linux version, but more extensively in the latest Android code.

I tried a signal generator on my laptop to generate C8, C#8 and D8. Then I tested it with a real accordion. Turns out my Morino VI goes up to C8. I tested that note by itself, and along with 2 additional octaves using the LMH register. In both cases the C8 values move around within 0.5c of each other when comparing single note and multi note + filter mode. This scenario is probably pushing it a bit, but that's very consistent as far as I'm concerned. The C8 sometimes fall away and an additional nonsense C7 might show up, but it usually hangs around long enough to be readable.

Here's an example of what I get on pull:
pull

And on push:
push

(These high reeds can do with a bit of spot tuning, but that's a whole different story.)

I'm working on a little 12 bass Geraldo right now (which is what prompted these filters). It's most likely from the 1930's too - well past its age, but it's a fun little practice project.

I notice you weren't using the display lock feature in those screenshots. It's a three hand job, you need two to play the instrument, and the third to touch the display to lock it, but it does mean you can lock the display and examine it at leisure.

In other news the updated production version is now published here and on F-Droid.

Not having three hands is one of the reasons I didn't use the lock. The other reason is I prefer letting it play for a few seconds so that I can make sure that the note is actually stable (and in case I need to do a little mental calculation on how the note oscillates and/or averages). I'm worried that if I lock it at the wrong point then I might go off on a wild goose chase. This is perhaps more of an issue on the bass side where the frequency is usually unstable at first.