Jeph Jacques's comics discussion forums

  • 17 Dec 2018, 04:28
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Chopping up sound files.  (Read 1232 times)

Akima

  • Preventing third impact
  • *****
  • Offline Offline
  • Posts: 6,139
  • ** 妇女能顶半边天 **
Chopping up sound files.
« 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?
Logged
"I would rather have questions that can't be answered, than answers that can't be questioned." Richard Feynman

Pilchard123

  • Vulcan 3-D Chess Master
  • *****
  • Offline Offline
  • Posts: 3,792
  • I always name them Bitey.
Re: Chopping up sound files.
« Reply #1 on: 16 Dec 2015, 14:43 »

I don't know for certain, but that sounds like something FFmpeg could help with.

E: Yup, if you have Ruby and FFmpeg. I imagine you could do something equivalent with your language of choice. I'll look around a bit more.
Logged
Piglet wondered how it was that every conversation with Eeyore seemed to go wrong.

Pilchard123

  • Vulcan 3-D Chess Master
  • *****
  • Offline Offline
  • Posts: 3,792
  • I always name them Bitey.
Re: Chopping up sound files.
« Reply #2 on: 26 Dec 2015, 11:41 »

Did you manage to get this sorted out?
Logged
Piglet wondered how it was that every conversation with Eeyore seemed to go wrong.

Tova

  • Older than Moses
  • *****
  • Offline Offline
  • Posts: 4,266
  • Don't read the comments.
Re: Chopping up sound files.
« Reply #3 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.
Logged
"There is no expedient to which a man will not resort to avoid the real labor of thinking." - Sir Joshua Reynolds (paraphrased)

Pilchard123

  • Vulcan 3-D Chess Master
  • *****
  • Offline Offline
  • Posts: 3,792
  • I always name them Bitey.
Re: Chopping up sound files.
« Reply #4 on: 27 Dec 2015, 02:27 »

Plot twist: it's Akima.
Logged
Piglet wondered how it was that every conversation with Eeyore seemed to go wrong.

Akima

  • Preventing third impact
  • *****
  • Offline Offline
  • Posts: 6,139
  • ** 妇女能顶半边天 **
Re: Chopping up sound files.
« Reply #5 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
Logged
"I would rather have questions that can't be answered, than answers that can't be questioned." Richard Feynman

Tova

  • Older than Moses
  • *****
  • Offline Offline
  • Posts: 4,266
  • Don't read the comments.
Re: Chopping up sound files.
« Reply #6 on: 13 Jan 2016, 15:40 »

No worries, Akima! Happy to help out.
Logged
"There is no expedient to which a man will not resort to avoid the real labor of thinking." - Sir Joshua Reynolds (paraphrased)
Pages: [1]   Go Up