473,657 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6045
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
1976
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: http://www.itconversations.com/shows/detail545.html http://www.itconversations.com/shows/detail559.html I'd like to comment on a few parts of that interview. One thing Guido mentions in his comparison of ABC (Python's predecessor) and
4
10009
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 the short underwriting messages are better off stored in a the database (BLOB field?) or in a physical file with the references stored in the database. How can we load the audio from a physical file to the database? Is it a good idea to store...
8
2768
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 such files: .wav, .mp3 and .wma. But my knowledge may be too old. Is there any new type? I've seen an indicator for audio files in some language-learning pages. It is a small trumpet. Clicking it would play the sound file. Is this small...
2
2619
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 pretty pictures. (like windows media player visual plugins. I will be developing in C++ and was wondering if there are any packaged libraries out there that I can use to read audio files encoded in different formats and lets me easily access the...
2
7884
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 (AxSHDocVw.AxWebBrowse) control. The TreeView is populated with nodes that when clicked play an audio clip that is stored on the CD and navigate the browser control to a specified web URL (also stored on the CD). All the web URLs are html documents...
13
4869
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, suggestions or improvements? if( wmv file) document.write("<OBJECT id=Player classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 height="354" width="479">
2
2183
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 BatmoAudiopop.js which opens a pop-up browser window with an audio player when a link is clicked. Basically, it sets the right mime-type depending on the operating system and audio file type, then opens a window with the audio file (passed as a parameter) in...
1
2179
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 at one push of a button for colours to be added in squares, circles, and for audio responses to these to sound when for example, red circles, blue squares, or foods, etc are found in text added to multiline textbox. My second son can benefit from...
9
5769
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 a single dir eg: C:\test\perl so i have C:\test\perl\one\yyy.properties C:\test\perl\two\yyy.properties
0
8399
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8312
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8504
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7337
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6169
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.