THESE FORUMS NOW CLOSED (read only)

  • 28 Mar 2024, 13:18
  • 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 12652 times)

Akima

  • WoW gold miner on break
  • *****
  • Offline Offline
  • Posts: 6,523
  • ** 妇女能顶半边天 **
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

  • Older than Moses
  • *****
  • Offline Offline
  • Posts: 4,131
  • 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

  • Older than Moses
  • *****
  • Offline Offline
  • Posts: 4,131
  • 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

  • coprophage
  • *****
  • Offline Offline
  • Posts: 7,725
  • Defender of the Terrible Denizens of QC
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
Yet the lies of Melkor, the mighty and the accursed, Morgoth Bauglir, the Power of Terror and of Hate, sowed in the hearts of Elves and Men are a seed that does not die and cannot be destroyed; and ever and anon it sprouts anew, and will bear dark fruit even unto the latest days. (Silmarillion 255)

Pilchard123

  • Older than Moses
  • *****
  • Offline Offline
  • Posts: 4,131
  • 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

  • WoW gold miner on break
  • *****
  • Offline Offline
  • Posts: 6,523
  • ** 妇女能顶半边天 **
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

  • coprophage
  • *****
  • Offline Offline
  • Posts: 7,725
  • Defender of the Terrible Denizens of QC
Re: Chopping up sound files.
« Reply #6 on: 13 Jan 2016, 15:40 »

No worries, Akima! Happy to help out.
Logged
Yet the lies of Melkor, the mighty and the accursed, Morgoth Bauglir, the Power of Terror and of Hate, sowed in the hearts of Elves and Men are a seed that does not die and cannot be destroyed; and ever and anon it sprouts anew, and will bear dark fruit even unto the latest days. (Silmarillion 255)
Pages: [1]   Go Up