06-02-2020 02:46 PM
@danthecoffeecan wrote:
you would have a for loop (controlled by user input) that calls a function for each instance of the for loop. In this example, if you input "3," the loop will call the function three times with the frequency as an argument which correlates to the base frequency and iterations of the loop.
I just don't know how I could "call" the reentrant subVI at different amounts set by the user.
LabVIEW has For loops too. You just put your function inside the loop, and voila, it's called multiple times. It doesn't even have to be reentrant. For this use-case, only one thing can output to your sound card at a time, so you will have to pre-generate the sound you want, then play it.
If you have LV Full you can also use the Multitone VI's to generate multiple-tone frequencies all in one VI:
06-02-2020 04:29 PM - edited 06-02-2020 05:42 PM
Or all in one loop, of course:
(even easier would be to place the addition into a i!=0 case. There are many alternatives)
06-03-2020 07:33 AM
Ah I see, thank you! This helps.