LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Varying the speed of the loops in which sound plays

Greetings All
I'm trying to vary the speed of the loops in which the sound plays. 
For some reason I can't get it to increase it's playing/loop speed by very much
I've tried a while loop and a for loop with different times changing the sample mode
from Continuous to finite.

Note: I only put in three sound loops but in the end there will be 8

 


I did use the wait function but that only speeds up the blinking leds without
the sound.

 

Any suggestions?
tia sal22

0 Kudos
Message 1 of 6
(2,872 Views)
How fast were you looking to make the loop speed? On a Window's machine you're not going to be able to go faster than something in the millisecond range.
0 Kudos
Message 2 of 6
(2,837 Views)
I was hoping to have the loop repeat it self about a 100 times a second
0 Kudos
Message 3 of 6
(2,828 Views)

You should really look into subVIs.

You are essentially repeating the exact same code 8 times, just chaning the input/output parameters.

This is a perfect application for subVIs, it will also ensure that your block diagram doesnt require a 10 foot monitor to see all the code.

Cory K
0 Kudos
Message 4 of 6
(2,822 Views)
I plan on putting the repeating code in sub vi's once this problem is solved
0 Kudos
Message 5 of 6
(2,818 Views)

Hi,

 

I noticed that you're creating and clearing the sound task every time you go through the loop. This takes up processing power (and thus time) which can limit how long it takes the loop to finish. Instead, try configuring and clearing the sound tasks OUTSIDE of the main loop (this also applies any functions that you only want to have done once at the beginning or end). Then use the Sound Output Start and Sound Output Stop VIs to control the sound output.

0 Kudos
Message 6 of 6
(2,800 Views)