output sound every x interval with some randomness
R_Gol
10月 23 2024 | 11:45 午前
I have a counter that runs in 1 sec intervals.
I have a bank of 10 different sound
(this should be changes dynamically because the numbers of sounds will be change from time to time) so it should be a drop folder to select the actual file quantities and names.
I would like that as long the counter is running a sound will be outputted every x intervals with some randomness for each time that is chose between two values.
the sound should be heard for 1 second or 2 at most (choose by user)
for example system is set to output a sound every 5 seconds with a randomness between1 to 2.5 sec
so if counter is running and first sound was generate after 5 seconds, the next sound (as long counter is running) will be generate after time that can be either 4 sec to max of 7.5 sec.
the chosen sound to be generate should be either random (every time a different sound is chose) or in sequence.
I have this starter patch:
how can I add the randomness of output interval?
how can I add to choose either random sound or sound in sequence?
Thanks
TFL
10月 23 2024 | 12:56 午後
I would use a separate delay and add a random value between -1 and 2.5 to the base duration of 5.
What you don't say is if the mean delay between each sound must remain 5 secs or not. Like after 1 minute, should the next bang happen exactly between 1'04" and 1'07"05"? Or would it depend on the accumulations of the randomness of previous bangs?
In my patch I simply retrigger a random delay of 5 sec with a variation of -1 +2.5, and the next delay is triggered immediately after the previous one is done, so the randomness accumulates.
About polyphony, check poly~.
R_Gol
10月 23 2024 | 1:27 午後
How can I fade out the sound before next one starts?
R_Gol
10月 23 2024 | 2:01 午後
This is where I got so far. Seems right to me but a bit messy?
TFL
10月 23 2024 | 2:07 午後
If you consider that you'll never have more than 2 sounds playing together, then you'll need two [sfplay~], and you'll have to load your sound into one, then the other one alternatively, so you can fade out the previous sound while the new one starting.
Source Audio
10月 24 2024 | 10:07 午前
R_Gol
10月 24 2024 | 10:15 午前
How to make the random to have the option for both direction?
so if base is 5000 ms between events -1 and 1 will make next event between 4000 and 6000 ?
another question - how to random the sequence of sound rather each time pkay the next one?
Thanks
Source Audio
10月 24 2024 | 10:26 午前
I am out for the rest of the day.
Maybe in meantime you will find answer by yourself.
Source Audio
10月 24 2024 | 11:30 午前
to toggle between 5000 + (random 1000)
and 5000 - (random 1000)
do you really need help with that ?
2nd question :
You allready had random selection from
the menu in patch you posted.
What is preventing you from using that ?
R_Gol
10月 24 2024 | 1:24 午後
What is preventing you from using that ?
True. I managed both..