You are not logged in.

#1 2008-09-26 02:06:10

fflarex
Member
Registered: 2007-09-15
Posts: 466

creating a blank audio file...

How would I go about creating a 10 second audio file which is just completely silent? I plan on using it in an mpd script that fades out instead of doing a hard stop. MP3 format preferred, but Vorbis would be fine too.

Offline

#2 2008-09-26 02:12:21

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: creating a blank audio file...

Definately overkill, but you could use audacity to create one.  I guarentee there is a much simpler way.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#3 2008-09-26 02:13:00

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: creating a blank audio file...

Use audacity (in the "extra" repo). In the menu, select "generate", then "silence", then set the duration. You can then save it in a variety of formats.

EDIT:

rson451 wrote:

Definately overkill, but you could use audacity to create one.  I guarentee there is a much simpler way.

Damn, beat me by 31 seconds!

I also thought that there should be an easier way, but I have no idea how.

Last edited by Xyne (2008-09-26 02:14:15)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2008-09-26 02:25:31

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: creating a blank audio file...

big_smile nah nah nah nah

Last edited by rson451 (2008-09-26 02:28:10)


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#5 2008-09-26 02:36:24

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: creating a blank audio file...

rson451 wrote:

big_smile nah nah nah nah

One day, when you least expect it, you'll post an answer to a question, but when you go to view that post, you will see my post above it. Sweet vengeance shall be mine.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2008-09-26 02:37:05

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: creating a blank audio file...

Thanks for the quick response guys, worked perfectly. Except I just discovered that it's not going to work for my script, and there's a much easier way to accomplish this that I somehow had not thought about... (slowly turning the volume down - wow do I feel stupid for not think of it).

Who knows though, it may still be useful for something else though. And I did learn how to do something new.

Offline

#7 2008-09-27 09:25:20

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: creating a blank audio file...

kiss, guys!

arecord -d 10 </dev/zero >silence.wav

Offline

#8 2008-09-27 15:18:23

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: creating a blank audio file...

Well, I did think there would be an easier way but, still being a Linux noob, just didn't know what.

Very nice solution, ezzetabi.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#9 2008-09-27 15:37:22

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: creating a blank audio file...

Thanks smile

Actually I was expecting someone flaming me because I didn't make a .mp3 file, but a .wav file...

arecord -d 10 </dev/zero | lame - -b 32 -h silence.mp3

Offline

Board footer

Powered by FluxBB