LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to merge to frequencies together and play it? I have a program that outputs two numbers everytime and those numbers in Hz. I want to merge those two different frequencies and play the sound.

Hi there

 

I have a program that reads from a table done in excel and finds two numbers from the table(they're different all the time). Those numbers are represented in Hz. What I want now is how to merge those two numbers as frequencies and output them and hear them from the speaker as audio. I also have the part of hearing them done but I can't figure out a way to have it connected so that it doesn't matter which numbers come up, it'll update it accordinaly. I appreciate any helpers.

 

Thanks a lot

0 Kudos
Message 1 of 16
(3,995 Views)

What do you mean 'merge'?

Do you want to add the frequencies?

Or
Do you want to output both frequencies?

Cory K
0 Kudos
Message 2 of 16
(3,993 Views)

Well, your code doesn't find extract any values from the table - this part looks unfinished. The Simulate Signal Express VIs will, I assume, be fed the frequency from your search. Presumably this search will return two different values. As for the adding, you're already doing this, so I don't understand what your question is regarding this. If anything you can simplify the adding by simply using the ... Add primitive:

 

0 Kudos
Message 5 of 16
(3,976 Views)
its not working though. I have frequency 1 and frequency 2 and when I connected each of those to simulate signal 1 and simulate signal 2 and added them it doesn't work. You could preset simlulate signal to a certain frequency but you can't have it recieve frequency from some other source. I hope i explained it a little bit this time. Thanks
0 Kudos
Message 6 of 16
(3,968 Views)

Then I'm not sure what you're doing, or what your definition of "add" is. Here is the example I posted, with Signal 1 at 250 Hz and Signal 2 at 500 Hz:

 

Message Edited by smercurio_fc on 01-15-2009 03:46 PM
Download All
Message 7 of 16
(3,948 Views)
thnxs again for replying. I understand that now. that works but if you look at my program, how do you add the 'search 1D array'vi to the simulate signal so it could update everytime it gets a different value for frequency
0 Kudos
Message 8 of 16
(3,945 Views)
Your original code is unfinished. I have no idea what data you are reading, or what you're searching for. You don't "add" the Search 1D Array output to anything. It will return to you the index of where something was found in an array. You feed that to an Index Array function to get the actual value from the array. But, as I said, and as altenbach alluded to, it's really unclear what you're searching for. Perhaps posting the actual data you're reading with an example (in words) of what you want to find and extract from this array would be more helpful.
0 Kudos
Message 9 of 16
(3,942 Views)
this is the data i'm extracting. The second and third column are the frequencies that I'm using. I need to add those two frequencies together and play it
0 Kudos
Message 10 of 16
(3,939 Views)