Lua API: Concatenate samples

Question:

I've seen getSubsample() but no opposite union method.
Is there a way of combining multiple samples into one single sample?

Background:

I want to record multiple samples of audio and then cut/move them to produce my final audio clip. Eventually, I'd like to save that entire audio clip to one single audio file. (Preferably to a format that can be read back in and re-edited.)

  • I know how to record my audio.
  • I don't know yet how to create a sequence of audio from the recorded snippets, but I guess I could have one sample player and just swap out my sampled recordings to play them in sequence after another.
  • I did't see Lua methods to access the sample buffer (which I would need to e.g. create visual components like waveforms. I think this is a separate feature request.)
  • I didn't find a Lua method to merge multiple samples into a new sample

We don't currently have anything in the public API for merging samples, but I'll note it as a feature request. Thanks for the suggestion!

1 Like