Mix samples using SoX library

140 views Asked by At

I have some data for mixer like:

[
  {
    "sample": "sample1.mp3",
    "time": 0
  },
  {
    "sample": "sample2.mp3",
    "time": 0.3342
  },
  {
    "sample": "sample3.mp3",
    "time": 0.3342,
    // stop after means interrupt play this sample on this time in time scale
    "stop_after": 0.3442
  },
  {
    "sample": "sample4.mp3",
    "time": 1.22443
  },
  {
    "sample": "sample1.mp3",
    "time": 1.223434,
    "stop_after": 1.224244
  }
]

What is the easiest way to create a single file mp3. I will write a wrapper for this on PHP. I just need to understand the right approach and the algorithm for this.

0

There are 0 answers