Jeph Jacques's comics discussion forums

Fun Stuff => BAND => Topic started by: Akima on 16 Dec 2015, 14:29

Title: Chopping up sound files.
Post by: Akima on 16 Dec 2015, 14:29
I wonder if I could consult the many musically capable people on the forum over a problem I am facing.

I have a need, from time to time, to "chop" sound files into fixed-length slices of n seconds, with as little loss as possible. I have used Time Splitter Audio to do this for years, but it has become orphan-ware and does not work on OS/X releases newer than Lion (10.7), which is no longer supported. It is possible to chop up sound files using Audacity, but it is a fiddly, error-prone and manual process. Can anyone point me towards a solution in an OS/X or possibly *nix environment?
Title: Re: Chopping up sound files.
Post by: Pilchard123 on 16 Dec 2015, 14:43
I don't know for certain, but that sounds like something FFmpeg (https://www.ffmpeg.org/) could help with.

E: Yup, if you have Ruby and FFmpeg. (http://superuser.com/questions/525210/splitting-an-audio-file-into-chunks-of-a-specified-length) I imagine you could do something equivalent with your language of choice. I'll look around a bit more.
Title: Re: Chopping up sound files.
Post by: Pilchard123 on 26 Dec 2015, 11:41
Did you manage to get this sorted out?
Title: Re: Chopping up sound files.
Post by: Tova on 26 Dec 2015, 13:34
Sorry I'm a bit late to this thread.

There is a command line utility called sox that you may want to investigate. I can't give details of the command line to use, but I know someone who uses it regularly, so if you want me to get some more info from her, let me know.
Title: Re: Chopping up sound files.
Post by: Pilchard123 on 27 Dec 2015, 02:27
Plot twist: it's Akima.
Title: Re: Chopping up sound files.
Post by: Akima on 13 Jan 2016, 04:17
Thank you so much, Tova!

I'm sorry I was slow getting onto testing your suggestion, but SoX did the job nicely! The command line to do what I wanted was pretty easy (in this example chopping infile.wav into n sequentially-numbered output files of sixty seconds each):
Code: [Select]
sox infile.wav output.wav trim 0 60 : newfile : restart
Title: Re: Chopping up sound files.
Post by: Tova on 13 Jan 2016, 15:40
No worries, Akima! Happy to help out.