-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't detect E string on bass #24
Comments
I suppose this is because bass is tuned an octave lower than guitar? So I assume the math was set up for guitar specifically. I want to use it for guitar and bass, so I'll probably implement a switch to select the instrument. |
I didn't specifically set any thresholds for guitar or any other instrument. However, it's totally possible that the algorithms break down at low enough frequencies. Can you verify that the error occurs for all of the different algorithms? |
I actually couldn't get the ones other than YIN to work. I forked https://github.com/qiuxiang/react-native-tuner, and was playing around with modifying it. What I did discover was removing line 46 It functionally shouldn't do anything but widen the margin of pitches on the lower end, though tbh doubling was a bit unnecessary, it shouldn't have needed to be increased by that much since it picked up that F note. It made the buffer length go from 512 to 1024. I do not know what would happen if I hit much lower notes, can only go so low on my instrument. ETA - I'm sure they work, I just couldn't get it figured out. Trying to figure out how the whole thing is pieced together without breaking too much as I go haha. |
If you want to help, one thing you could do would be to make some more example data from real-world sources (as opposed to digital tones) that I could add to the test suite? |
I.e. You want recorded samples of an instrument? |
Yeah, something that reproduces your problem |
Best I can do at the moment is send you a sound recording of me plucking that E string using my phone, though that is what I was using to pick up the sound in the first place with that tuner app, so I'd imagine it should hit the test case. Do you happen to have the YIN paper? I followed the link at the top of the file and the PDF link for the YIN paper was a dead link. |
I don't, sorry :/ I wrote this module awhile ago and haven't done any significant work on it in some time. |
Yup, same on mine, usually even around 150hz I have issues. I can do a push request at some point if this fix mentioned works and run it against the tests if you like? |
81Hz is best I can get from it on an iPhone via vocals but that may be down to how vocal tones are interpreted by the device |
Seems to be an issue with Yin type. I'm using I imagine this should be fairly straightforward to translate into this library? @peterkhayes Happy for me to do a PR at some point to implement the McLeod method? |
The Macleod method already exists I think - does it have issues? https://github.com/peterkhayes/pitchfinder/blob/master/src/detectors/macleod.ts |
Ah! I assumed it wasn't there as the readme didn't say so! I'd recommend this for the lower frequency issues people have mentioned |
Oh good call that it's not included in the readme! I think someone else added it awhile back but probably only did the code? |
It seems that this stops at 40hz, it detects the F1 note on Bass just fine.
I'll be trying to dive in and see if I can figure out where this minimum threshold is coming from, but figured I'd post the issue to see if it's been spotted / you can give some advice on where to look.
Thanks for the tool!
The text was updated successfully, but these errors were encountered: