Live data from Hacker News

Guitar tuner that uses phone accelerometer

tautme.github.io

91–100 of 105 posts

Re: Guitar tuner that uses phone accelerometer

#91

Earlier quoted context omitted.

Not really. 12 TET (the tuning intervals used in almost all situations where you want equal ability to play in any key, from a Western music perspective) requires a slight amount of beating, even in those "perfect fourth" intervals between most adjacent guitar strings, and especially in the "major third" interval between one pair of adjacent guitar strings, but not in the "2 octave" interval between the lowest and hi…

Perfect fourth could be achieved via natural harmonics at 5th and 7th frets, double octave is just the 5th fret and voila you can get the standard tuning. Inapplicable for necks without a precise position of frets, good luck compensating height differences from nut and gauges with intonation tuners.

Oh yeah, I should've mentioned fretting the lower strings for a unison (1:1) to the higher adjacent open string. No beating in this unison yields equal temperament, due to frets scaled accordingly, so it avoids the problem I mentioned... but introduces likelihood of intonation issues (or simply bending the pitch) as you say.

I had been thinking about listening for beating in the 5:4 and 4:3 intervals using open strings, which does present the just temperament problem, and harmonics on open strings to make a unison unfortunately shares this problem 100%.

Re: Guitar tuner that uses phone accelerometer

#92
post #89

Can an accelerometer determine when a car is having issues? Can it do the same for a human user's body?

i remember hearing Porsche was doing some machine learning with vibration analysis to find car trouble. https://www.porsche.digital/en

Yes, predictive maintenance on motors and turbines using vibration is quite common.

Re: Guitar tuner that uses phone accelerometer

#93

Earlier quoted context omitted.

Wouldn't you need to rewire the headphones? Headphones use a 3-pin TRS whereas a 4-pin TRRS plug is used when you add a microphone. Regardless if the 4-pin is CTIA or OMTP, it's generally only going to get shorted to ground if a 3-pin TRS plug is plugged into a 4-pin TRRS socket, or if a 4-pin TRRS plug is plugged into a 3-pin TRS socket. Diagram: https://i.sstatic.net/8rSD2.jpg

"Wouldn't you need to rewire the headphones?" This is basic physics controlling the effect here, not electrical routing. Speakers are microphones by their very design. To make them work as a microphone, you merely speak into them with them plugged into an input jack that provides at minimum a line level electrical signal to be modified by wiggling the speaker cone/diaphragm back and forth.

Yes, but the computer doesn't have the firmware to "record" that signal from the speaker output pins. Thus, to record from the speakers acting like microphones, would require rewiring the headphone cable, for the vast majority of computing devices.

If you click "record" on your computer, there's no way to tell it to record signal from the speaker output channels, even if you write a custom low-level application directly making OS calls. The OS can't even do it, because it's not supported by the firmware.

Re: Guitar tuner that uses phone accelerometer

#94
post #50

Earlier quoted context omitted.

I think the tuner is off by an octave - it has a lot of harmonics and sounded like a G on a bass guitar.

It seems odd that it would be an octave too low. If it detected any harmonics it would be too high. Unless it didn't function like a string at all, then the harmonics would be all wrong.

> If it detected any harmonics it would be too high.

I think it's not that simple. A tuner is "hearing" the fundamental and all of the harmonic overtones combined. It has to guess at which frequency is the fundamental, even if the overtones are actually stronger than it amplitude-wise, and it does that by looking at the nature of the repeating overtone pattern and extrapolating back to the fundamental.

I think you can end up an octave too low (half the actual frequency) if the waveform repeats in a way that implies a different overtone repetition pattern, for example if there's an every-other-cycle artifact to the waveform.

Re: Guitar tuner that uses phone accelerometer

#95

This sounds neat, but I think I owned a tuner for about 6 weeks before I could do it by ear... EADGBe isn't that hard.

So what do you do when the lead singer is engaging in some stage banter and you need to tune between songs? IEMs? With what reference pitch?

>IEMs

Absolutely. In orchestral band back in my high school days, between songs I would ask my friend on the tuba to give me a note for reference so I could tune the timpani. If you are in a band you should be able to manage to take a one second note and hold that by humming or something and tune up. I can't even read real music (I was a "percussionist" ie incompetent except at rhythms) and even I could do that. Better trained musicians than I could expand from there to the other notes you need.

You just need a single reference pitch. You can literally just play a sine wave into your headphones for a second on stage, or have your audio engineering guy feed you one. Or you have one of those dirt cheap tuners that clips to the fretboard to get you started.

The lead singer is engaging in stage banter partially to give you the time and space to do this. If your ensemble includes a pianist or a synth, you just have them slap a note for a reference.

Re: Guitar tuner that uses phone accelerometer

#96

Earlier quoted context omitted.

"Wouldn't you need to rewire the headphones?" This is basic physics controlling the effect here, not electrical routing. Speakers are microphones by their very design. To make them work as a microphone, you merely speak into them with them plugged into an input jack that provides at minimum a line level electrical signal to be modified by wiggling the speaker cone/diaphragm back and forth.

Yes, but the computer doesn't have the firmware to "record" that signal from the speaker output pins. Thus, to record from the speakers acting like microphones, would require rewiring the headphone cable, for the vast majority of computing devices. If you click "record" on your computer, there's no way to tell it to record signal from the speaker output channels, even if you write a custom low-level application direc…

"Yes, but the computer doesn't have the firmware to "record" that signal from the speaker output pins."

No, you plug directly into the microphone jack, that is what is providing your line level reference signal that gets changed by motion in the diaphragm. Zero rewiring required.

Re: Guitar tuner that uses phone accelerometer

#97
post #60

Earlier quoted context omitted.

Sounds like you've got a great idea for a proof of concept for DefCon next year...

Probably worth reviewing prior art for inspiration: 0) https://www.usenix.org/conference/usenixsecurity14/technical... 1) https://infocondb.org/con/black-hat/black-hat-europe-2014/gy...

Sounds salty. https://people.csail.mit.edu/mrub/papers/VisualMic_SIGGRAPH2... use a potato chip bag as a microphone

Re: Guitar tuner that uses phone accelerometer

#98
post #24

This has some very interesting privacy and security risks. If the tech can do more complex frequency analysis, then couldn't it essentially be used as a microphone for a device that doesn't need permission.

This is why grapheneos creates 'sensors' as a permission. On android all apps can spy on you this way.

Re: Guitar tuner that uses phone accelerometer

#99

Earlier quoted context omitted.

A good chunk of us are in tune (pun intended) with our instruments to the point that we can simply feel the vibrations and know where we are with regards to tuning. I haven't touched a tuner in about half a decade.

That sounds like a very useful skill for a working player. But it seems to come with a couple of significant conditions. I can believe this is possible. But I don't think this is a reasonable thing as a baseline expectation for a player with 6 weeks of experience, which was the original comment in this thread. I don't know the details, but I imagine you're feeling beats transmitted through the neck or something. But…

depends on the instrument. with acoustic instruments the resonance chamber is often tuned so that you can feel the body itself vibrating more when you're in tune

Re: Guitar tuner that uses phone accelerometer

#100
post #42

Earlier quoted context omitted.

It's a pretty well-known exploit that the CIA is capable of turning a lot of electronics with speakers into microphones. I imagine there is an entire classified backlog of things they can turn into microphones without the target's knowledge.

The CIA…plug a set of regular headphones into a microphone jack, open a recording application and speak into the headphone speaker, you don’t need a 3 letter agency for that physics open secret.

I got this clone Apple lightning to 3.5mm headphone jack adaptor for iPhone, my mind was kinda blown when I found out it just uses the lightning for power and inside the plug is a tiny bluetooth device that stream music over the 3.5mm jack. The original adaptor doesnt work like this as far as i have considered.
Post reply on HN