LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Audio Input

Solved!
Go to solution

Hello everyone,

 

I'm working on a school subject and actually what I have to do is (look example). First of all I need to transfer music with a cable from my phone to labview, I want to select a music file and when I press play, the song will play but it will also transfer into Hz, so actually kinda a speaker with leds, and when the bass becomes higher. The leds go higher and when the leds are low, the leds go lower.

 

Example: https://www.youtube.com/watch?v=cU_mXKno5Ak

0 Kudos
Message 1 of 12
(3,428 Views)

You will need to break your project down into smaller tasks.

 

1.  How to get music from your phone to your computer into LabVIEW.

2.  How to play the song.

3.  How to display it as an equalizer.  (probably need to do an FFT)

4.  How modify the frequency before you play it.

 

The trickiest part will be #1.  Do you know how to get the music off your phone?

0 Kudos
Message 2 of 12
(3,409 Views)

@RavensFan wrote:

You will need to break your project down into smaller tasks.

 

1.  How to get music from your phone to your computer into LabVIEW.

2.  How to play the song.

3.  How to display it as an equalizer.  (probably need to do an FFT)

4.  How modify the frequency before you play it.

 

The trickiest part will be #1.  Do you know how to get the music off your phone?


My teacher told me this: 

Receive music analogue (via a sound cable) from for example, your Mobile Phone in LabVIEW. This will then have to be done via the sound card.

 

#1.  Do you know how to get the music off your phone: Euhm i thought with a aux cable?

 

5. I also need to use a "power spectrum", don't really know how this works.

0 Kudos
Message 3 of 12
(3,402 Views)
Solution
Accepted by topic author Brxwnii

That is an important detail to add in this message that gives some actual direction.  When I read your first message, I was thinking you were going to use the USB cable to connect the phone to the PC.

 

Yes, use a stereo cable between your phone's headphone jack and the auxiliary input of your sound card.  Look in LabVIEW's Example Finder for examples on how to acquire sounds from the sound card.  Look in the Graphics & Sound palette on the block diagram.

 

A power spectrum is an FFT.  Fast Fourier Transform.  Search LabVIEW help for that.  Look in the Signal Processing palette.

Message 4 of 12
(3,383 Views)

@RavensFan wrote:

That is an important detail to add in this message that gives some actual direction.  When I read your first message, I was thinking you were going to use the USB cable to connect the phone to the PC.

 

Yes, use a stereo cable between your phone's headphone jack and the auxiliary input of your sound card.  Look in LabVIEW's Example Finder for examples on how to acquire sounds from the sound card.  Look in the Graphics & Sound palette on the block diagram.

 

A power spectrum is an FFT.  Fast Fourier Transform.  Search LabVIEW help for that.  Look in the Signal Processing palette.


Could you help me via Discord? Please 🙏🏽 Send me

0 Kudos
Message 5 of 12
(3,375 Views)
Solution
Accepted by topic author Brxwnii

If your phone actually has a headphone jack (many don't these days) or you have an adapter cable then you should be able to plug right in to your PC sound card.  Headphones signals are amplified so I would try the Line In rather than the Microphone input if you have a choice (my HP work PC has only Mic In).

Then open the sound settings and hopefully you will have some kind of "Test Microphone" or even a sound mixer to see if you are connected right.

 

Once you're sure you have the input into your sound card open the LabVIEW example called Continuous Sound Input (use the defaults) and you should have a waveform display.

 

The same signal that goes to the graph can be plugged into the Waveform Measurements VIs (assuming they're in your student version) so start playing around!

 

As RavensFan mentioned an FFT will be interesting and the Extract Tones VIs might be useful for you as well.

 

One hint:  Set the sound format option to 1 channel and avoid dealing with stereo signals until you get the basics down.

 

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 6 of 12
(3,363 Views)

@Brxwnii wrote:


Could you help me via Discord? Please 🙏🏽 Send me


What does that mean?

0 Kudos
Message 7 of 12
(3,341 Views)

@RavensFan wrote:

@Brxwnii wrote:


Could you help me via Discord? Please 🙏🏽 Send me


What does that mean?


Discord is an instant messaging and VOIP app sort of like skype but for groups.

0 Kudos
Message 8 of 12
(3,326 Views)

@Viper wrote:

@RavensFan wrote:

@Brxwnii wrote:


Could you help me via Discord? Please 🙏🏽 Send me


What does that mean?


Discord is an instant messaging and VOIP app sort of like skype but for groups.


Never heard of it.  No reason to ever need to use it.

 

" ... like skype but for groups"?   Skype does group messaging as well.

0 Kudos
Message 9 of 12
(3,310 Views)

@RavensFan wrote:

@Brxwnii wrote:


Could you help me via Discord? Please 🙏🏽 Send me


What does that mean?


Assignment is due tomorrow. Smiley Wink

 

mcduff

0 Kudos
Message 10 of 12
(3,295 Views)