07-03-2024 01:00 AM
この作成したLED点滅に合わせて音をつけたいのですがアドバイスお願いいたします。
07-03-2024 01:28 AM - edited 07-03-2024 01:35 AM
Hi poteto,
@poteto wrote:
I would like to add a sound to the blinking LED I created. Any advice would be appreciated?
Use the Sound functions…
Suggestion:
07-05-2024 12:10 AM
Thank you!
What should I do when the sound is intermittent?
07-05-2024 12:48 AM
Hi poteto,
@poteto wrote:
What should I do when the sound is intermittent?
How can it be "intermittent" when you play the same sound every time?
07-05-2024 01:30 AM
I want to make the LED light up and the sound play quickly, but when it's too fast, the sound cuts out. I'm looking for solutions to fix this.
07-05-2024 01:34 AM
Hi poteto,
@poteto wrote:
I want to make the LED light up and the sound play quickly, but when it's too fast, the sound cuts out. I'm looking for solutions to fix this.
I see two options:
In my example I play a simple tone (A, 440Hz) for 50ms. You can adjust both constants as needed…
07-05-2024 01:46 AM
I'm aiming for smooth operation when sound and LED vary based on acquired data. For instance, assuming sounds play about ten times at 250 milliseconds.
07-05-2024 01:55 AM - edited 07-05-2024 01:56 AM
Hi poteto,
@poteto wrote:
I'm aiming for smooth operation when sound and LED vary based on acquired data.
Define "smooth operation"…
@poteto wrote:
For instance, assuming sounds play about ten times at 250 milliseconds.
Should the sound play 10× for 25ms to result in 250ms or should the sound play 10× for 250ms?
Should there be a pause/delay between each sound?
Anyway: when your goal is to reach that 250ms interval then you should set a different wait time in my example loop.
As the Beep function also waits for the sound to be played it should be located in a different loop (producer-consumer scheme!?) so it doesn't block your DAQ loop…
07-05-2024 02:25 AM
Got it. I want each sound to play 10 times for 250 milliseconds each, without needing a pause between each sound.
I don't have any example loop displayed right now.