A Audio and hi-fi forum. AudioBanter

Go Back   Home » AudioBanter forum » rec.audio » Pro Audio
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Concatenating Audio Files in with Perl on a Mac



 
 
Thread Tools Display Modes
  #1  
Old March 26th 06, 02:47 PM posted to rec.audio.pro,alt.perl,comp.sys.mac.programmer,comp.lang.perl
external usenet poster
 
Posts: n/a
Default Concatenating Audio Files in with Perl on a Mac

I need to create a lot of fairly-short audio files from the
concatenation of a lot of even shorter audio files. I'd like to control
that from a Perl script. The audio files would presumably be AIFF or
WAV files, preferable AIFF.

Do any of you know of Perl commands to accomplish this? Specifically,
* A call to create and open a new, empty AIFF or WAV file,
* A call to append onto the end of that open audio file the audio
content of an existing non-empty audio file, and
* A call to close the created concatenation file.

Thanks for the ideas!

--

(Preferably reply to the newsgroup, please. If you reply by Email, I
will sincerely try to receive your message, but it will probably get
buried in spam.)
Ads
  #2  
Old March 26th 06, 03:35 PM posted to rec.audio.pro,alt.perl,comp.sys.mac.programmer,comp.lang.perl
external usenet poster
 
Posts: n/a
Default Concatenating Audio Files in with Perl on a Mac

Gary Morrison wrote:
> I need to create a lot of fairly-short audio files from the
> concatenation of a lot of even shorter audio files. I'd like to control
> that from a Perl script. The audio files would presumably be AIFF or
> WAV files, preferable AIFF.
>
> Do any of you know of Perl commands to accomplish this? Specifically,
> * A call to create and open a new, empty AIFF or WAV file,
> * A call to append onto the end of that open audio file the audio
> content of an existing non-empty audio file, and
> * A call to close the created concatenation file.
>
> Thanks for the ideas!


Try this: http://search.cpan.org/~taiy/Audio-SoundFile-0.15/

Ximinez
--
Our three weapons are fear, surprise, and ruthless efficiency...
and an almost fanatical devotion to the Pope....
http://www.ai.mit.edu/people/paulfitz/spanish/t1.html
  #3  
Old March 27th 06, 03:43 AM posted to rec.audio.pro,alt.perl,comp.sys.mac.programmer,comp.lang.perl
external usenet poster
 
Posts: n/a
Default Concatenating Audio Files in with Perl on a Mac

Chel van Gennip wrote:

> I hope you are using OS X and have some knowledge of the Unix system, as
> it is convenient for scripting.


"Yes" to both. I've done a bit of Perl scripting on my Sun workstation
at work.

> Make a script that, using SOX strips
> headers and if needed convert to the same samplerate, samplewidth, etc.,
> and outputs raw audio data to stdout. Input this raw datastream in SOX
> through stdin to generate a WAF or AIIF file. http://sox.sourceforge.net/


Ya know, thinking back a long time ago (I think it was around the time
when MacOS 7 first came out!), I wrote some code code to dork around
with AIFF files. I may be able to resurrect and adapt that code for
doing the actual opening and writing of the AIFF files themselves. If I
can find it, that is!

--

(Preferably reply to the newsgroup, please. If you reply by Email, I
will sincerely try to receive your message, but it will probably get
buried in spam.)
  #4  
Old March 27th 06, 06:32 AM posted to rec.audio.pro,alt.perl,comp.sys.mac.programmer,comp.lang.perl
external usenet poster
 
Posts: n/a
Default Concatenating Audio Files in with Perl on a Mac

Gary Morrison wrote:
> Chel van Gennip wrote:
>
>> I hope you are using OS X and have some knowledge of the Unix system, as
>> it is convenient for scripting.

>
> "Yes" to both. I've done a bit of Perl scripting on my Sun workstation
> at work.
>
>> Make a script that, using SOX strips
>> headers and if needed convert to the same samplerate, samplewidth, etc.,
>> and outputs raw audio data to stdout. Input this raw datastream in SOX
>> through stdin to generate a WAF or AIIF file. http://sox.sourceforge.net/

>
> Ya know, thinking back a long time ago (I think it was around the time
> when MacOS 7 first came out!), I wrote some code code to dork around
> with AIFF files. I may be able to resurrect and adapt that code for
> doing the actual opening and writing of the AIFF files themselves. If I
> can find it, that is!


Yeah, the sox stuff seems to be able to do almost anything. The syntax
learning curve is a bit steep, though, as I recall from previous
experiments.

Ximinez
--
Our three weapons are fear, surprise, and ruthless efficiency...
and an almost fanatical devotion to the Pope....
http://www.ai.mit.edu/people/paulfitz/spanish/t1.html
  #5  
Old March 28th 06, 01:45 AM posted to rec.audio.pro,alt.perl,comp.sys.mac.programmer,comp.lang.perl
external usenet poster
 
Posts: n/a
Default Concatenating Audio Files in with Perl on a Mac

The Spanish Inquisition wrote:

> Yeah, the sox stuff seems to be able to do almost anything. The syntax
> learning curve is a bit steep, though, as I recall from previous
> experiments.


I'll start with that. Thanks.

--

(Preferably reply to the newsgroup, please. If you reply by Email, I
will sincerely try to receive your message, but it will probably get
buried in spam.)
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
It's amazing what you can find when you look. Audio Opinions 76 December 3rd 05 07:33 AM


All times are GMT +1. The time now is 01:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 AudioBanter.
The comments are property of their posters.