LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Reading a wave file then doing a frequency shift and playing it tia sal22

Help Reading a wave file then doing a frequency shift and playing it tia sal22

Greetings All

I'm trying to read a wave file then do a frequency shift on that file
then play it but I'm having trouble with changing the x axis to show time and
not samples. I would like to see both signals before and after
so I can see the frequency shift.
 How can I convert the x axis to show time?

I've attached the 10 second 1hz sample signal wave file called 1hz R-L wav.zip (just delete the .zip extension), but the wave files
will not be a simple sin wave.  I just used a simple sin wave to test
the VI.

The logic I'm following is to:
1) load wave file
2) Place wave file into array
3) compute the new waveform frequency shift for array
4) View both before and after shifted waveforms on same graph
5) play new waveform from array after frequency shift

Is this the correct logic? or is their an easier way to do this?

tia sal22
0 Kudos
Message 1 of 7
(3,351 Views)

Good Afternoon tia sal22,

 

Right-click the x-axis and select Properties.  Then use the Display Format tab to choose Absolute or Relative Time as the x-axis Type.

 

I see a Fourier Transform and an Inverse Fourier Transform, one after the other.  Do you normally have some processing between the two of them that you removed for clarity on the forum?

 

What kind of shift are you expecting to see on the graph?  The way it is currently programmed, you are not changing anything in the frequency domain, you are simply changing the spacing between the points.

 

I think your steps 1-5 are correct, but question the implementation of #3.  If you want to perform a change in the frequency domain, may frequency be a more appropriate x-axis than time?

0 Kudos
Message 2 of 7
(3,311 Views)

I'm open to all suggestions I just could not find an example for doing a frequency shift/pitch shift with labview 8.5  So I was trying

to piece different things that I found online.  If you have an example of doing pitch shift/frequency shift using labview 8.5 please let me know.

 

tia sal22

0 Kudos
Message 3 of 7
(3,308 Views)

This is where I got an example for the frequency shift but I guess it doesn't work the way I need it too.

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=379272&query.id=710943#M379272

0 Kudos
Message 4 of 7
(3,305 Views)

Hi tia sal22,

 

The link you pasted above is the usual way to shift the frequency. If it doesn't work the way you need it to, you may want to pitch shift the signal. Here is an article describing using labview to do the real time pitch shifting: http://zone.ni.com/devzone/cda/epd/p/id/6219

 

Since the code is written in LV 8.6.1, if it is what you want, I can make it LV 8.5.

 

Let me know if this is the right solution or not.

 

Mac

 

0 Kudos
Message 5 of 7
(3,284 Views)

Thanks that might help.....but I think it also requires LabVIEW Advanced Signal Processing Toolkit

 

tia sal22

0 Kudos
Message 6 of 7
(3,276 Views)

That's right. The Advanced Signal Processing Toolkit is required in this case.

 

Mac

0 Kudos
Message 7 of 7
(3,266 Views)