Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Guitar's notes recognizer

Status
Not open for further replies.

kauedg

New Member
Hi all, this is my first post, I've been reading the forum for a while and I had an idea, wich I'm not sure is possible. It happens that I don't know jack about electronics, but I've been studying a lot.

My idea is a device where you plug in an electric guitar and it recognizes the note or chord being played and the octave wich it belongs and outputs a digital signal. It is not a tuner, wich compares the note being played with the frequency chosen, it must really recognize the frenquency.

I've read about MIDI pickups, USB guitars and so on, but I need sort of a "frequency-to-digital" converter. I think that a MIDI pickup would be perfect for what I need but that would be too much of complicated.

I'm a computer programmer (I know something about digital logic and VHDL) and I intend to make a guitar learning system software that can decide if the student is playing the scores in the right tempo. All I need is a digital-formatted input from the guitar.

Hope I could make myself clear, english is not my first language.
 

flat5

Member
For the first part, I think you are describing a "frequency counter". It will get confused when you input more than one frequency.
 

kauedg

New Member
Flat, you mean when playing or, specially, strumming a chord?

I've read about this difficulty on the Internet but as I don't know much about electronics, I thought it was better to just ask for an overall idea of the possibilty of building the circuit.

You think that the individual reading of the strings with a special pickup is a better approach?
 

Nigel Goodwin

Super Moderator
Most Helpful Member
Google for FFT (Fast Fourier Transform), a complicated way for a computer to analyse an audio waveform - this can separate the individual notes from the composite chord (a spectrum analyser).
 

kauedg

New Member
Thanks Nigel, I will do the research, try to code it and test it with my guitar.

After it's done, would you guys help me building the circuit? I have some soldering and basic circuitry skills but I still can't do the project on my own.

Thanks!
 

blueroomelectronics

Well-Known Member
I'd recommend doing this on your PC via the sound card first. That'll be much easier to tackle than an embedded DSP solution.
If you want to do it the embedded way Microchip sells a DSP starter kit.
MPLAB Starter Kit for dsPIC DSCs
8419-81974-1.png
 

kauedg

New Member
After studying DSP, FFT and so on I've made some prototypes in Java language and realized that this way, with a "raw" input from the guitar, the resulting signal will be confusing when sustaining notes or playing one quickly after another.

So I came up with another solution, a special pickup with individual coils, one per string, just like the existing MIDI pickups. This way I'm able to analyse each string a time, get cleaner frequencies (avoiding very complicated filter algorithms) and get better sustaining data.

There are two approaches I'm thinking about:

1) pickup -> analog-to-USB circuit -> processing on computer to MIDI
2) pickup -> analog-to-processed signal-to-USB circuit -> signal to computer to MIDI

Wich one you guys think I'll get better performance, considering specially low latency (delay)?
 

kauedg

New Member
blueroomelectronics thanks for the reply. I'm aware of the existence of MIDI pickups but I'm intending to build one on my own, simple but functional, for learning purposes (maybe financial later ;) ).

This Roland GK pickup outputs on a 13-pin connector, especial for Roland's equipment. I don't want the project's device to work with MIDI equipment, just want it to output a signal that can be converted to MIDI in the computer. Maybe later I increment the DSP part to output MIDI data.

If I'm bothering with this thread, just say it. I really need some directions so I don't waste too much time with stuff I could get help here.
 

marcbarker

New Member
The Roland MIDI pickup inspired me to think about this.

Maybe you can assign a PLL-based circuit to each string, that locks onto the predominant note and outputs a DC voltage representing pitch.

A suitable PLL I think is a CD4046B, along with a few resistors and capacitors.

There's been quite a lot of professional music equipment been made over the last couple decades that does that. I remember a Ibanez guitar synth of 25 years ago, which decided what note was being played, turned that into a DC voltage, which then became the VCO/VCF/ASD control voltages for a standard 'Moog-type' VCO-based synthesiser.
 

kauedg

New Member
marcbarker thank you for the informations but I didn't understand much of your ideas as I'm a beginner in electronics. If you feel like helping let's keep skype or msn contact? This afternoon I came up with a block diagram:

(1) --> (2) --> (3) --> (4)

(1) Guitar input - The individual coil system for each string inputs the voltage of the note being played
(2) DAC - The converter turns the voltage to a digital signal
(3) Midi Encoder - This turns the note into a MIDI note-on
(4) USB output

What do you think? Will it be necessary 6 of the (2) and (3) parts? I'm concerned about note sustaining data and that the signals mix in the system, resulting in erroneous output.
 

marcbarker

New Member
I'd prefer to keep discussion in open forum so that others can benefit :)

The solution I mentioned is 'the way I'd do it'. Sorry if it just went over your head.

You could probably use standard multi-channel PC sound cards for (2), to produce bit-stream data. I think the job will be much easier splitting it into 6 channels.

I suppose you could get around that problem by restringing the guitar with 6 same-size low E strings like Jad Fair of Half Japanese does! :) YouTube - David Fair - How to Play Guitar

You could maybe do the DSP on the computer itself, including the MIDI. I don't know how you'd NoteON and NoteOFF though.
 
Last edited:

kauedg

New Member
marcbarker I support that we discuss it openly, but I will REALLY need help when it comes to project the circuit. If the project goes ahead I will post about everything I found out, here. I'm open to new ideas for being really newbie in electronics.

I'm concerned about latency that computer analysed signal usually produces, and as far as I know, hardware solutions are much faster. What do you think?

My main goal is to make a stand-alone device, but there's no problem in testing a software version before.
 

kauedg

New Member
I'm studying the two different solutions to the problem until now: one using ADC and other using a PLL that marcbarker suggested. I'm not going to make computer programmed (java) prototypes as it takes too much time and the latency result may be horrible in slower computers. I must not depend on the user's PC power cause it would change the results.

I'm studying the ADC basics (https://www.electro-tech-online.com/custompdfs/2009/08/baad.pdf) and after finishing I will study the PLL solution.


Wich one you guys think will make better results? Any other suggestions?

Seeing the Roland's GK guitar-to-midi device, I've noticed that the pickup is made of parallel "contacts" and not the common magnetic small ones. Any idea of the reason? Would that not be a coil-based pickup?


Just correcting:
(2) DAC - The converter turns the voltage to a digital signal
should be
(2) ADC - The converter turns the voltage to a digital signal
 

gabeNC

Member
I've noticed that the pickup is made of parallel "contacts" and not the common magnetic small ones.


They don't actually touch the string, if it did they would mute, cause buzzing and pretty much remove any sustain from the guitar. Is that what you meant by "contacts"?
 

kauedg

New Member
They don't actually touch the string, if it did they would mute, cause buzzing and pretty much remove any sustain from the guitar. Is that what you meant by "contacts"?

I'm sorry I chose the word badly. I know they don't touch, what I'm asking is:

Why in a regular pickup each "sensor" (the coil) is round but in the Roland GK they are formed by two parallel "sensors". I wanna know if that is just a different coil or something else.

Know what I mean now?
 

gabeNC

Member
I understand what you mean now. sorry, I really don't know how there are made. I have several books on pickup construction and some of the old "stereo" pu's have had a coil for each string instead of the coil wrapped around the entire bobbin.


this site was interesting on the history of different midi interface equipment.
MIDI Guitars: A nearly complete roster - Troubador Tech

Here's a patent description for hexaphonic digital pu's some of it is fluff, some of it is interesting.
Hexaphonic pickup for digital guitar system - US Patent 7166794 Description
 

flat5

Member
About the pickup
My guess is the two coils would form a balanced pickup.
The advantage is it tends to cancel hum and other noise.
(reduces common-mode noise)
Some info that may help to understand.
Balanced Wiring

I'm often wrong though :)
 

kauedg

New Member
gabeNC
Great sites, I will make an in-depth study of the patent's pdf.


flat5
I'm surely going to use this site and the "technique" even if just for testing purposes, thanks very much!


marcbarker
I appreciate, but could you do a quick explanation of what it does?



Well for my studies I did some learning on inductance and eletromagnetism but nothing really appliable to what I'm intending to do.

I've found out that the frequency of the notes on a guitar (based on the 440Hz produced by the 5th string) goes from 329.63 Hz (E string) to 5273.16 Hz (24th fret on e string), with a total of 49 notes.

2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64 <----- 32 < 49 < 64

So, it's required a 6 bits output from the ADC.


Now I'm focused on trying to make a pickup, with independent coils, each one only "listening" to the possible frequencies of it's respective string. So the coil of the E (6th) string will ignore anything under 320Hz and above 1330Hz (considering a 24 fret guitar). Here's where I think the PLL will be usefull.

It passes the frequency ahead to the ADC, wich reconizes it and outputs it's bitcode to the MIDI converter. Then, the last thing to do is send the midi signal through an USB connection.

One thing has been bothering me: the device must have 6 circuits, one for each coil, to recognize the notes? I want it to pass sustaining info to the MIDI encoder and I don't know if it would get mixed with other data...

I'm really considering having electronics classes to stop bothering you guys :p
 

gabeNC

Member
I've found out that the frequency of the notes on a guitar (based on the 440Hz produced by the 5th string) goes from 329.63 Hz (E string) to 5273.16 Hz (24th fret on e string), with a total of 49 notes.

Don't forget about bends, mutes and slides etc. Not sure how that would effect the frequency curve may just be a matter of sampling the note(s)... *shrug*.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top