sound plays at random time points with a button

Hello,

I plan to use a WAV Trigger to realize two functions would you mind sharing your opinions about whether they are doable with WAV Trigger alone or with a WAV Trigger and an Arduino?

The first function is that I want a speaker to play a song at a random time within 4 hours and play 20 times in total. My plan is to use an “event” variable in Arduino to count total numbers and something like random(46060)==1 with sleep() to realize the randomness but I am not sure whether such command can be passed to Wav Trigger. I only found serial control on the website and there are limited commands I can use. I am not confident such randomness I want to do is possible and hope you can give me some assurance or some other ways.

The second function is to incorporate a trigger in the first function. I want there is a certain possibility that a song will be played after a button is triggered and also with a total event count (20 times in total).

I think the main question is how much I can do with a WAV trigger with an Arduino. I really hope to hear your advice.

Best,

Jiang

That would work https://github.com/robertsonics/WAV-Tri … vanced.ino has an example of code to interface with serially, and this guide https://robertsonics.com/wav-trigger-on … /#chapter5 outlines how the functions are used -what you have described should work