473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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.)
Mar 26 '06 #1
4 5997
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
Mar 26 '06 #2
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.)
Mar 27 '06 #3
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
Mar 27 '06 #4
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.)
Mar 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
by: Dave Benjamin | last post by:
Guido gave a good, long interview, available at IT Conversations, as was recently announced by Dr. Dobb's Python-URL! The audio clips are available here: ...
4
by: Rajesh Kapur | last post by:
Hello All, We are building an application that will dynamically choose and pre-pend short underwriting messages to the audio streamed over the web. We will use SMIL files. We need to decide if...
8
by: fuliopen | last post by:
I like to create some audio files for my web site. These are all language files to help the visitor learn a foreign language. There is no music. As far as I know, I can create three types of...
2
by: ViperCB | last post by:
Hello from a newbie, I am trying to do some research on an upcoming project that involves reading in audio files of various formats and using the audio signal as a source of noise to generate...
2
by: hzgt9b | last post by:
Using VS2003, VB.NET, BACKGROUND I have a window forms based application that will be distributed and executed directly from CD media. The app contains a TreeView control and a WebBroswer...
13
by: anil.rita | last post by:
When the user chooses an AV file to play, based upon the type of file, I want to use the default installed media player to play it. I am wondering if this is a good way - any alternatives,...
2
by: peteinglastonbury | last post by:
I'd be most grateful if someone would help me. I hope I'm in the right forum (apologies if not) - I'm not sure whether my problem is CGI or Javascript related. I found a script called...
1
Dököll
by: Dököll | last post by:
Greetings, Good buddies! I am for the first time, since I started learning VB, going to build an application I wanted to build for my first son, a language and activities program that will allow...
9
by: TeenaRoz | last post by:
HI, I am new to perl and I am trying to write a perl script which does the following: Can someone help me? Firstly, There are a set of files named yyy.properties present in many folders in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.