Cabbage Logo
Back to Cabbage Site

How can i load multiple audiofiles in a buffer

Hi, I just need to know how can i load multiple audiofiles in a buffer or a polybuffer (if it does exist) and can choose one of them to play after that.

I’m creating a 3D Audio plugin, so i need to load a bank of HRTFs that i already have. Then i need to convolve them with an audiofile. I already know how to convolve them, but i need to load multiple .wav files in a buffer and call them. How can i do that?

1 Like

One way to do this is using the ftsamplebank opcode which I wrote to load filess from a directory into a set of function tables. You can then read back the function tables as you wish. You could can get away with reading files from disk you can use diskin2 and the directory opcode. Both options should be valid.

Check out this instrument for ideas:
https://github.com/rorywalsh/cabbage/blob/master/Examples/Instructional/SampleLoadAndPlayback.csd