LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Guitar tuner

Ok I'm a college student and I have been give an assignment in an honors class  to build a program using sound waves. The assignment is pretty mush open to anything, I though what better thing to do then a guitar tuner!! ( because I play guitar). Then I started messing around with labview realized ' wow this might not be doable'. So my question is this : I have a computer with labeview 8 and a external mic, can I use this mic to pickup sound frequencies and throw them into labview? With that, create a program that can display the frequency ( as a number and in a graph). I guess I would have to program the exact freq for each string and when it meets that freq a light flash. And do this 6 times for each string? IM just getting frustrated because there are so many functions and it is very unclear what most of them do. So any help would be AMAZING!!! Thanks!

 

0 Kudos
Message 1 of 13
(8,954 Views)

thebrakshow wrote:

Ok I'm a college student and I have been give an assignment in an honors class  to build a program using sound waves. The assignment is pretty mush open to anything, I though what better thing to do then a guitar tuner!! ( because I play guitar). Then I started messing around with labview realized ' wow this might not be doable'. So my question is this : I have a computer with labeview 8 and a external mic, can I use this mic to pickup sound frequencies and throw them into labview? With that, create a program that can display the frequency ( as a number and in a graph). I guess I would have to program the exact freq for each string and when it meets that freq a light flash. And do this 6 times for each string? IM just getting frustrated because there are so many functions and it is very unclear what most of them do. So any help would be AMAZING!!! Thanks!

 


Hi,

it's definitely doable! I wrote one years ago for my son...

A good point to get started is the example VIs dealing with sound input. One of these examples is a doing a Fourier analysis.

 

If I find my old VI after these years, I'll post it here...

 

Cheers

 

Franz

Message Edited by ahlers01 on 11-04-2008 01:19 PM
0 Kudos
Message 2 of 13
(8,944 Views)
Sounds like a fun project. Maybe I can help you get started...Yes, there is a set of sound VIs that can you can use to input sound from a mic into LabVIEW. Look in the Programming/Graphics & Sounds/Sound/Input folder of the palette. To get the frequency of the signal you will need to perform an FFT (http://en.wikipedia.org/wiki/Fft) on the signal. Look in the Programming/Waveform/Analog Waveform/Waveform Measurements folder of the palette. Good Luck Brian
0 Kudos
Message 3 of 13
(8,930 Views)

ok lets start from the begining. how do i get labview to reconize the mic?

0 Kudos
Message 4 of 13
(8,902 Views)
LabVIEW will not recognize the mic. It will recognize the sound card it is connected to. If you are using an NI DAQ board, LabVIEW will recognize that and you would connect the mic to the DAQ board.
0 Kudos
Message 5 of 13
(8,892 Views)

Go to your control panel.

Open "Sounds and Audio Devices"
Go to "Audio" and where it says "sound recording"

select your device and set it to default.

 


Go back to LabVIEW.

In your functions palette

Programming >>  Graphics and Sound >>  Sound >> Input >> Configure.VI

If you wire ' 0 ' to device number, it should read your default sound input device (which is now your mic)

 

 

 

* Note, I do not have a mic to test this with. This is my educated guess 😉 

Message Edited by Cory K on 11-04-2008 05:05 PM
Cory K
Message 6 of 13
(8,889 Views)

Hi thebrakshow,

 

I happen to be doing exactly the same thing right now!  It's not only possible, but also fairly simple!  I wont just post what I have, since this is a class assignment, but I will point you to what I have used.

 

First, the examples.  In LabVIEW go to Help>>Find Examples...  The following are the two examples I have used:

  • Continuous Sound Input  (very simple demonstration of sound input in LabVIEW)
  • Power Spectrum Measurement.vi  (Demonstrates getting a spectral measurement.  This one is particularly good because you can experiment with averaging and windowing to suit your tuning.)


Next, check out the VI posted here if you want to return the actual name/index of your Windows PC's audio device.  You can just guess 0 (and be pretty confident) but I prefer this.

 

Really all you have to do is combine those two examples, then find a tone near what you are tuning to.  This can be done in a number of ways.  You could also look at the Tone Measurements Express VI if you want to make things even simpler.

 

Hope this helps! 

Brian A.
National Instruments
Applications Engineer
Message 7 of 13
(8,842 Views)
OK guys i got this tuner finished!! thanks so much for the advice! here is a picture of the front panel guitar tuner
0 Kudos
Message 8 of 13
(8,732 Views)
Photobucket
Message 9 of 13
(8,731 Views)
Your picture was missing
0 Kudos
Message 10 of 13
(8,709 Views)