Page 1 of 1

Looking for a Linux-based program for playing sounds

Posted: 2006-12-19 09:23am
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.

Posted: 2006-12-19 12:57pm
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?

Posted: 2006-12-19 03:11pm
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.

Posted: 2006-12-21 09:08am
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.