Looking for a Linux-based program for playing sounds

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
Alferd Packer
Sith Marauder
Posts: 3706
Joined: 2002-07-19 09:22pm
Location: Slumgullion Pass
Contact:

Looking for a Linux-based program for playing sounds

Post by Alferd Packer »

Ah, but I can't make it that easy, now I can I? :D

Basically, I'm looking for a Linux-based program in which I can assign specific sounds to specifc keys. For example, I could assign an MP3 of some song to play when I hit "a," and so on. Does anyone know if such a program exists?

If not, is there a way I can hack the same functionality from existing programs? If it makes a difference, I'm using Ubuntu Dapper. Your responses, as always, are appreciated and will be reward with plunder and wimminz. Or menz, if that's your preference.
"There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance--that principle is contempt prior to investigation." -Herbert Spencer

"Against stupidity the gods themselves contend in vain." - Schiller, Die Jungfrau von Orleans, III vi.
User avatar
Alferd Packer
Sith Marauder
Posts: 3706
Joined: 2002-07-19 09:22pm
Location: Slumgullion Pass
Contact:

Post by Alferd Packer »

Thanks for the reply. Yes, to clarify, it's the latter; I just want to be able to play a specif file or group of files without having to find it in a playlist.

So, for a shell script, can I get away with using something like 'cat /home/alferd/song.wav > /dev/dsp', or are there command-line programs better-suited for this sort of thing? Similarly, are there any special considerations I need to take for file formats, like MP3 or OGG files?
"There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance--that principle is contempt prior to investigation." -Herbert Spencer

"Against stupidity the gods themselves contend in vain." - Schiller, Die Jungfrau von Orleans, III vi.
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Post by Pu-239 »

I just use mplayer, kind of starts up slow though for random sound files. Plays nearly anything though. There are a few other CLI apps for playing them, search the apt repos.

Catting into /dev/dsp only works if the sound card isn't already in use, and so isn't really ideal.

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
User avatar
Alferd Packer
Sith Marauder
Posts: 3706
Joined: 2002-07-19 09:22pm
Location: Slumgullion Pass
Contact:

Post by Alferd Packer »

As it turns out, Ubuntu does have play, but for some reason, mp3 files sound asstacular when I play them via play, so I just used mpg321 in the scripts.
"There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance--that principle is contempt prior to investigation." -Herbert Spencer

"Against stupidity the gods themselves contend in vain." - Schiller, Die Jungfrau von Orleans, III vi.
Post Reply