From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Sound in Precise Time

I want to generate sound in precise time. The sound should be played after 100 ms of running the VI and the duration of playing sound should be 50 ms. I tried to use sound card to play the sound but the problem is that the playing time is vary between 60 to 80 ms instead of 50 ms. I used an indicator to find out the number of iterations for the while loop and it shows 5, so the I cannot expect less than 10 ms resolution for my VI. I searched for that and I found out this is related to how many percent of your resources are in use.

I should mention that I prefer to play a .wav file instead of generating sound using basic wave generator.

Is there any alternative solution to generate that sound in precise time using daq instead of sound card?

DAQ: NI-6052e

sound card: digital audio spdif 2-high definition audio device

Download All
0 Kudos
Message 1 of 3
(3,453 Views)

If you configured the DAQ to output voltage in precise time and then hooked it up to a speaker, you could generate sound using the DAQ device. 

0 Kudos
Message 2 of 3
(3,417 Views)

Thank you for your response.

Would you please help me to produce a sound using DAQ card or show some similar examples? I tried to generate wave voltage but it does not work.

0 Kudos
Message 3 of 3
(3,411 Views)