[LAU] Creating evenly spaced sample chains?

Clemens Ladisch clemens at ladisch.de
Fri May 3 15:51:25 UTC 2013


Janus wrote:
> I'd like to chain samples into one new sample such that each input
> sample starts at a multiple of a given time value in the output sample
> (basically an evenly spaced concatenation). All input samples share the
> same format but differ in length. If a sample is longer than the given
> time interval it's tail shall be cut off (overwritten by the next one),
> if it's shorter, silence shall be added to it's end.
>
> Do you know of a tool or can you think of a command pipeline that would
> establish this?

sox

> I tried sox so far but it seems that it's not up to the task.

Use "stats" to read the files' lengths, then construct a command line
using the "pad" and "trim" effects.


Regards,
Clemens


More information about the Linux-audio-user mailing list