could a signal from a guitar be used to clock a digital counter?

Thread Starter

Green Bean

Joined Mar 31, 2017
126
It seems like if the signal was distorted/clipped enough it would effectively become like a square wave, maybe feed it through a schmitt trigger and it could then go into a frequency divider. The only problem is that the guitar isn't plugged into the wall, so how exactly do you amplify the signal from it? Is it like a microphone or something?
 

dl324

Joined Mar 30, 2015
13,303
Do the something similar to what musicians do except amplify the sound from the microphone until the amplitude is high enough to be used in a digital circuit.
 

mtripoli3

Joined Mar 1, 2016
35
You've got the right idea, but know, you'll have an analog input stage, which *can* be a bit troublesome, then, depending on what you want to do with the signal, the issues grow. Some "issues" are that the signal from the guitar is not at a constant level, as you know. You can give it as much gain as you'd like, and turn it into a square wave, (simplest through a comparator circuit) but even with lots of hysteresis it's going to "stutter". If you research the matter, this is where all the talk of "tracking" comes from. Then, understand you'll only get the "fundamental" note (the "root") as this has the most energy in the signal.

Again, it'll work the way you suggest, but lot's of weirdness to be expected... If you do play with this, also look into "frequency-to-voltage" converter IC's. These can take the resulting square wave and output an analog voltage. With the correct circuit, this can be used to drive analog synthesizers (CV or control voltage inputs).

Good luck!
 

ian field

Joined Oct 27, 2012
6,539
It seems like if the signal was distorted/clipped enough it would effectively become like a square wave, maybe feed it through a schmitt trigger and it could then go into a frequency divider. The only problem is that the guitar isn't plugged into the wall, so how exactly do you amplify the signal from it? Is it like a microphone or something?
A cheap clipper type fuzz gets you half way there. The output is usually clipped by an inverse parallel pair of diodes - you just need to boost the amplitude from the diode Vf.

You can get more technical than that if you want/need to do so.
 

mtripoli3

Joined Mar 1, 2016
35
A cheap clipper type fuzz gets you half way there. The output is usually clipped by an inverse parallel pair of diodes - you just need to boost the amplitude from the diode Vf.

You can get more technical than that if you want/need to do so.
This type of circuit actually "compresses" the signal more than "clips" it. If you draw up the circuit in LTSpice and run it, you'll see what I mean. If you gain up the input to the circuit it will eventually turn the output into something like a "square wave", but again, as soon as the signal dies, so does the "squareness".

Interestingly enough, someone else was asking a question in another post in which my reply there is pertinent here. Have a look at the following JPEG taken from LTSpice. You can see that the circuit outputs a square wave based on the input signal frequency. Amplitude of the input "trigger" is set through a pot that sets the threshold. This will do as it shows, but will still have the problem that when the signal dies below the threshold, the square wave goes away. You can set the threshold very low, but now you'll start to get false triggering and stuttering...

Circuit image:
https://www.dropbox.com/home/AAC/PIEZO_COMPARATOR?preview=PIEZO_COMPARATOR_00.jpg



LTSpice file to play with:
https://www.dropbox.com/s/f8u1w1btcczn3ih/PIEZO_COMPARATOR_00.asc?dl=0

Mike Tripoli
 
Last edited by a moderator:

danadak

Joined Mar 10, 2018
4,057
Do you want to measure a specific harmonic ? Guitar output has a
spectrum, not just a single tone.

If you want to concentrate on a specific range use a filter then gain.

You can do this digitally (could easily add LCD and buttons to control
freq of interest) and all onchip, analog and digital.

Do you have any experience in embedded work ?


Regards, Dana.
 

wayneh

Joined Sep 9, 2010
17,153
It seems like if the signal was distorted/clipped enough it would effectively become like a square wave, maybe feed it through a schmitt trigger and it could then go into a frequency divider. The only problem is that the guitar isn't plugged into the wall, so how exactly do you amplify the signal from it? Is it like a microphone or something?
Got a smartphone? There are a multitude of free guitar tuner apps that can convert the note you play to a frequency readout. All the hardware and software is all set to go and they work really well.
 

MrAl

Joined Jun 17, 2014
8,502
It seems like if the signal was distorted/clipped enough it would effectively become like a square wave, maybe feed it through a schmitt trigger and it could then go into a frequency divider. The only problem is that the guitar isn't plugged into the wall, so how exactly do you amplify the signal from it? Is it like a microphone or something?
Hi,

Since i played the guitar for years and took jazz lessons and was heavily into electronic systems, i actually tried this back in the early1980's or late 1970's.
I can tell you it works, but what happens is as the string starts to come to a rest the signal used to clock the digital counter eventually dies completely and then the sound just stops dead.
You need to amplify the heck out of the guitar signal as it is only around 5mv or so straight out from a non amplified electric guitar.
The more you amplify it first the longer the sounds lasts, but if the noise is amplified too much then the noise takes over and it will sound very bad. So you find some factor that you are comfortable with and use that.
Results do vary without some real DSP processing, but it is interesting. The sounds that come out are harmonically related to the guitar string frequency and since they are halved with each flip flop in the counter, each output is a full octave LOWER than the previous, so a higher A comes out as a lower A, and the next stage a lower A, etc.

What you might try doing is filtering the amplified signal first so you get a smoother output with less noise. I did not experiment that long with it because i was not satisfied with the sound and did not feel like taking any more time on it, and chords dont sound good. You may however like the effects anyway.

Professionally made systems use special pickups added to the guitar so that they can pick up each string individually. That way each channel (6 channels for a guitar, 4 for most bass guitars) only have to deal with ONE frequency at a time and dont have to deal directly with multi tone chords.

It is interesting to try at least once :)
Today's technology allows using a microcontroller which would have a big advantage over just using logic counters.
 

ScottWang

Joined Aug 23, 2012
7,071
This type of circuit actually "compresses" the signal more than "clips" it. If you draw up the circuit in LTSpice and run it, you'll see what I mean. If you gain up the input to the circuit it will eventually turn the output into something like a "square wave", but again, as soon as the signal dies, so does the "squareness".

Interestingly enough, someone else was asking a question in another post in which my reply there is pertinent here. Have a look at the following JPEG taken from LTSpice. You can see that the circuit outputs a square wave based on the input signal frequency. Amplitude of the input "trigger" is set through a pot that sets the threshold. This will do as it shows, but will still have the problem that when the signal dies below the threshold, the square wave goes away. You can set the threshold very low, but now you'll start to get false triggering and stuttering...

Circuit image:
https://www.dropbox.com/home/AAC/PIEZO_COMPARATOR?preview=PIEZO_COMPARATOR_00.jpg



LTSpice file to play with:
https://www.dropbox.com/s/f8u1w1btcczn3ih/PIEZO_COMPARATOR_00.asc?dl=0

Mike Tripoli
Please upload the files to our forum (the image or circuit should be clear enough too see) otherwise when it lose the links someday then your post will be become useless.
 

ian field

Joined Oct 27, 2012
6,539
This type of circuit actually "compresses" the signal more than "clips" it. If you draw up the circuit in LTSpice and run it, you'll see what I mean. If you gain up the input to the circuit it will eventually turn the output into something like a "square wave", but again, as soon as the signal dies, so does the "squareness".

Interestingly enough, someone else was asking a question in another post in which my reply there is pertinent here. Have a look at the following JPEG taken from LTSpice. You can see that the circuit outputs a square wave based on the input signal frequency. Amplitude of the input "trigger" is set through a pot that sets the threshold. This will do as it shows, but will still have the problem that when the signal dies below the threshold, the square wave goes away. You can set the threshold very low, but now you'll start to get false triggering and stuttering...

Circuit image:
https://www.dropbox.com/home/AAC/PIEZO_COMPARATOR?preview=PIEZO_COMPARATOR_00.jpg



LTSpice file to play with:
https://www.dropbox.com/s/f8u1w1btcczn3ih/PIEZO_COMPARATOR_00.asc?dl=0

Mike Tripoli
The electro-harmonix muff-Fuzz compresses - the diodes are in the nfb loop. most cheap fuzz hard clip at diode Vf. You can of course experiment with different types of diode - even LEDs. Either type can be assymetric by mixing diode types.
 
Top