Detection of how hard one strikes a guitar string

MrSalts

Joined Apr 2, 2020
2,767
Ok! Is that easily implemented with software?
Filtering can be implemented with software but I think it is easier with hardware. Also, how will you attach a strain gauge to each string on the neck/body of a guitar and not get a noticeable response from the other five strain gauges when the first string is strummed? Will you add some sort of damping or spring tensioners on each string?
 

shortbus

Joined Sep 30, 2009
10,049
Will you add some sort of damping or spring tensioners on each string?
How will he insulate the vibrations from other strings in the guitar body. Even solid body electric guitars vibrate and add to the sound of the guitar. That is why a Les Paul sound different than a Stratocaster even when they both have the same type pickups installed.
 

drjohsmith

Joined Dec 13, 2021
1,624
Filtering can be implemented with software but I think it is easier with hardware. Also, how will you attach a strain gauge to each string on the neck/body of a guitar and not get a noticeable response from the other five strain gauges when the first string is strummed? Will you add some sort of damping or spring tensioners on each string?
The contact microphone was suggested if the user did not need to tell each string individual
 

MrSalts

Joined Apr 2, 2020
2,767
The contact microphone was suggested if the user did not need to tell each string individual
Yes, but since then, the OP clarified with...
Each string, only how hard the string has been struck and possibly if it's still vibrating
And I limited my comment about strain gauges to... um, strain gauges. As in...
how will you attach a strain gauge to each
So, why are you still bringing up the contact microphone - to confuse the conversation? Or do you have other reasons to add confusion?
 

cmartinez

Joined Jan 17, 2007
8,803
Here's an interesting idea, dunno if it's possible though.

How about using a tiny laser or IR diode on top of each string, and under it an analog output sensor which will pick up the string's vibrations, and feed its output to a preamp and then to an audio amplifier?
 

k1ng 1337

Joined Sep 11, 2020
1,038
Since your going for 50/50, how about a rotating arm and spring coupled to the string? Consider a seismic detection device that moves a lever on paper as the ground shakes plotted as amplitude. You could then couple this lever to an input device that reads a voltage (a servo reversed?) and use a peak detector circuit to determine how hard the string was struck referenced to a baseline. Assuming the response time of the mechanical system (spring returning to zero potential) and the microcontroller are faster than you striking the strings in succession, I can see working pretty cool.
 

shortbus

Joined Sep 30, 2009
10,049
Personally I can't see how this whole thing, no matter how it's implemented will ever be musical. And it already exists in many forms by many makers, it's called a "midi for guitar" pickup. but again they aren't really musical on their own, they make synthesized noise.

Wow, I channeled my inner AG!
 

Thread Starter

Ephex

Joined Jul 4, 2021
83
Here's an interesting idea, dunno if it's possible though.

How about using a tiny laser or IR diode on top of each string, and under it an analog output sensor which will pick up the string's vibrations, and feed its output to a preamp and then to an audio amplifier?
Interesting. I will keep this in mind.

Since your going for 50/50, how about a rotating arm and spring coupled to the string? Consider a seismic detection device that moves a lever on paper as the ground shakes plotted as amplitude. You could then couple this lever to an input device that reads a voltage (a servo reversed?) and use a peak detector circuit to determine how hard the string was struck referenced to a baseline. Assuming the response time of the mechanical system (spring returning to zero potential) and the microcontroller are faster than you striking the strings in succession, I can see working pretty cool.
The usage of a peak detector circuit is precisely what I'm looking for. After that, I assume it can be read from an ADC (either built in on a microcontroller or external(?) ) to then later be used as a number in the code. THAT's what I want to achieve with this part of the project; getting a value for how loud (or even how distorted?) to play a note of a specific frequency!

How much does a peak detector circuit affect the signal it is reading? How does one know how to assign values to the components needed (or is it just to buy a small chip that does everything for you?)?
 

Thread Starter

Ephex

Joined Jul 4, 2021
83
Personally I can't see how this whole thing, no matter how it's implemented will ever be musical. And it already exists in many forms by many makers, it's called a "midi for guitar" pickup. but again they aren't really musical on their own, they make synthesized noise.

Wow, I channeled my inner AG!
The plan is not to make something that sounds better than preexisting solutions for electric guitars, absolutely not. I'm aiming for a gimmick, something that's just fun to play on and a platform for me to learn more about how signals and sound can be measured and made with the use of both analogue components as well as microcontrollers. I totally get your point, it won't be something studio-worthy, but it wasn't meant to be :)
 

MrSalts

Joined Apr 2, 2020
2,767
how about using clear nylon strings, firing red or IR down each like a fiber optic. Then connect a time-of-flight sensor to the other end to read the time it takes to get to the other end. The string is stretched when plucked (and stretched more when plucked harder) so the time will be a bit longer for the light to get to the other end as the string is plucked harder and harder.
https://www.st.com/en/imaging-and-photonics-solutions/time-of-flight-sensors.html
...since you are looking for a gimmick.
 

k1ng 1337

Joined Sep 11, 2020
1,038
Interesting. I will keep this in mind.



The usage of a peak detector circuit is precisely what I'm looking for. After that, I assume it can be read from an ADC (either built in on a microcontroller or external(?) ) to then later be used as a number in the code. THAT's what I want to achieve with this part of the project; getting a value for how loud (or even how distorted?) to play a note of a specific frequency!

How much does a peak detector circuit affect the signal it is reading? How does one know how to assign values to the components needed (or is it just to buy a small chip that does everything for you?)?
Build a peak detector on the breadboard to get an idea of the widespread uses. I don't know the particulars but I doubt it will affect the input much given the finite capacitance and diode. A buffer would be ideal. I think the hard part would be the lever mechanism.. I got the idea from a piano damping mechanism which is a very intricate device relative to the strings. I can't say for certain but a peak detector would likely filter out vibrations from other strings because only the string stuck at that time has the greatest amplitude, I think you would also have to account for the increasing tensions of the strings from low to high E. Regardless of what you decide to do you have inspired me to make an analog / digital instrument myself which makes use of a synthesizer. Back in the day I had a guitar which broke two strings. I decided to try random things and detuned the remaining strings to C G C G and wrote some very cool music. I learnt then one doesn't need to stick to classical music conventions.
 

MrSalts

Joined Apr 2, 2020
2,767
I think you would also have to account for the increasing tensions of the strings from low to high E.
I think you missed the part where is is only sensing is
- which string is strummed
- when it is strummed
- and how hard the string is strummed.
He doesn't care what sound it makes since all audio will be synthesized electronically. All strings can be the same with little or no tension.
 

Thread Starter

Ephex

Joined Jul 4, 2021
83
Regardless of what you decide to do you have inspired me to make an analog / digital instrument myself which makes use of a synthesizer.
Nice!

I think the lever mechanism is a possible solution, but the tip of using a peak detector circuit really helped!
 

Thread Starter

Ephex

Joined Jul 4, 2021
83
I quickly sketched something down. This is my current perspective of the whole ordeal. Pick it apart as much as you can!

sketch.jpg

What is important with D_1? Low threshold voltage, or dependent on a rough estimate of the signal voltage?

I scribbled down some questions, I hope you can read it lol
 

k1ng 1337

Joined Sep 11, 2020
1,038
I quickly sketched something down. This is my current perspective of the whole ordeal. Pick it apart as much as you can!

View attachment 262547

What is important with D_1? Low threshold voltage, or dependent on a rough estimate of the signal voltage?

I scribbled down some questions, I hope you can read it lol
Looks reasonable. What vibration sensor jumps out at you? I think someone suggested it.. a laser and target setup could work. The max deflection of the laser would correspond to amplitude. Seems like any setup that deflects from a baseline would do. I can think of many ways it could work despite the naysayers. Then again I don't have years of experience!
 

Audioguru again

Joined Oct 21, 2019
6,826
A piezo detector has a high output impedance that needs the high impedance input of a non-inverting opamp and a couple of diodes to clamp a high voltage. Your inverting opamp has a low input impedance.
Many opamps have inputs that do not work if their voltage is anywhere near the negative supply voltage (your ground?) of the opamp. Therefore the opamp needs an additional negative supply.

A peak detector has an attack time and a release time determined by the R and C values and the resistance it drives.
 

Thread Starter

Ephex

Joined Jul 4, 2021
83
What vibration sensor jumps out at you?
I managed to find one on Mouser: MINISENSE 100
Me being the worst at understanding data sheets can't figure out if it measures frequencies, amplitude or both. I might order one to test things out, and if it doesn't work I can probably use it in a future project.

The flat piece that sticks out has a weight attached to it. You're supposed to get an analogue output when it shakes. It might be possible to attach the string to the piece that's supposed to vibrate, and then the other end screwed down 15-20 cm away in the guitar. Mounting it in such a way that when a string is struck "down" (to the right if you look from the bottom up the neck of the guitar), the sensor's flat piece moves across the body "horizontally" and not closer towards the body, might make it work.
 

Thread Starter

Ephex

Joined Jul 4, 2021
83
A piezo detector has a high output impedance that needs the high impedance input of a non-inverting opamp and a couple of diodes to clamp a high voltage. Your inverting opamp has a low input impedance.
Many opamps have inputs that do not work if their voltage is anywhere near the negative supply voltage (your ground?) of the opamp. Therefore the opamp needs an additional negative supply.

A peak detector has an attack time and a release time determined by the R and C values and the resistance it drives.
Hmm ok, is this something specific for piezo elements, or vibration sensors in general?
 
Top