Live data from Hacker News

Show HN: I built an HTML 5 Guitar Tuner

freetuner.co

1–10 of 55 posts

Re: Show HN: I built an HTML 5 Guitar Tuner

#4
post #2

I don't have a guitar but I can tap on my desk, and that seems to result in random notes. Maybe there's a way to improve the detection so it knows it's a guitar note?

Stand alone electric tuners can also confuse ambient sound for notes. I suspect if guitar detection were desirable and easy to implement, someone would have done it already.

Re: Show HN: I built an HTML 5 Guitar Tuner

#8
post #2

I don't have a guitar but I can tap on my desk, and that seems to result in random notes. Maybe there's a way to improve the detection so it knows it's a guitar note?

You can sing "do, re, mi, fa, so, la, di", you've probably heard it before somewhere. If you do it right, every word you sing should result in the letter changing up the alphabet more or less. Doesn't matter if you're notes aren't very true, or that you don't start at the right frequency, I guarantee that you will get the relative distances close to right, and the tuner will have you believe it ;)

Re: Show HN: I built an HTML 5 Guitar Tuner

#9
post #2

I don't have a guitar but I can tap on my desk, and that seems to result in random notes. Maybe there's a way to improve the detection so it knows it's a guitar note?

A whistle or clean guitar string pluck would have one strong tone, and a random banging noise would have many tones overlapping. Typically a digital guitar tuner is just doing a discrete Fourier transform of a sound sample and checking the frequency of the most dominant tone in that sound. Sure it's possible check the signal for tone clarity, such as count how many discrete Fourier components are in the sound sample and their relative strength, where fewer strong components is a cleaner tone.

... but is it really worth it in this case? No, because guitar tuner apps are cheap and plentiful, and electric guitar players use an inline tuner rather than a tuner with a microphone. And for tuners with microphones I get annoyed when the tuner doesn't respond so I prefer a tuner that doesn't try to be too smart and filter out too much.

This is really just a cool example of audio signal processing in javascript (or I suppose we call it "HTML5" nowadays)

Re: Show HN: I built an HTML 5 Guitar Tuner

#10
Good work, thank you. I have been looking for a free guitar tuner and I have had varying experiences with the ones I've used.

I mostly use a linux native app called lingot. It does the job but has small annoying bugs (settings file is not parsed properly, my ALSA device CARD:foo,bar=baz fails because of the colon character, I'll write a patch one of these days).

This guitar tuner works, I tuned my guitar succesfully with it but it was a bit painful. I'm on Firefox 27.0 on Linux, using Alsa, no PulseAudio. I am using a Microsoft LifeChat headphone + microphone laid on the table before me that is good enough to tune my guitar with Lingot. I would have tried Chromium for comparison but it seems I have a version that is too old.

There was a very bad latency, around 1 second from playing a note to seeing feedback on the display. The information I got back was decent and good enough to get my guitar in tune. Overall the quality of this was somewhat comparable to a cheap guitar tuner from the 1990s with an internal microphone. But I think the culprit here is the platform (ie. browser + audio frameworks) rather than the quality of the app itself.

What platform(s) have you used with tuner and how did it work out? What browser, OS and audio system did you use?

If you want me to help out testing this app, please reply and tell me what to test and I will.

Post reply on HN