Is there an easier way to store and play 127 audio files?
Hi there,
I'm building something that requires 127 audio files and when a number is picked that will play that file. As you can see bellow I spent ages copying 127 audio buffers but there must be an easier way that I have missed. I want the chosen audio file to fade in and then when another is chosen for it to crossfade into the next file.
I look forward to hearing some suggestions! Thank you in advance.
There is nothing to see below ...
to crossfade 2 files, You must use 2 players.
If one player is playing, it must fade out when next player starts (with fade in).
And why buffers ?
use sfplay~
Ahhhh sfplay~ damn that makes so much sense! Sorry I forgot to upload the picture - but it looks so dumb now but here it is.... So if all my 127 files are in a folder named accordingly I can then trigger the right one to play when the number is selected? Also how can I tell one number to play a file in one sfplay and then the next chosen number to trigger the 2nd sfplay? Basically switching between them

I guess that was a lot of work with that many
players, objects etc.But that way one learns ...
Now to the possible solution.
1 You scan Folder with Audio Files into umenu (autopopulate)
2 get 2 sfplayers ready
3 make a gate that on each play message toggles
output with fade in, play file to one player, and fade out and stop to
previous player.
Sounds simpe ...
But it depends on how You really want to use it.
Sending just a single number ?
Than You would be able to just start playback.
If You want to add options to stop, pause , resume etc
thing will get a bit more complicated because You need more logic
to detect state of both players.
Here is extract of one similar player I made some years ago.
I reduced it to what You asked for.
Only on first play, You need to scroll a bit with the numbox
to start playback.
That's because numbox will not output anything
if one just clicks it without changing the number.
if the audio files are short or in best case all of the same lenght, i would copy them all in a single file and would load that into a buffer and play and display the parts it from there with offsets.
however, whenever you have 128 copies of the same thing it it usually worth the effort to put it in a poly~.
Thank you so much for taking the time to help me with that - It makes a lot more sense to what I did - I can defo build what I need now