Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I want to have movie style sound effects in the terminal. You know, when every keystroke and line emits a cool little beep. (Something like this.) I've used KeyClick, but that's only for keyboard typing. I also want effects when characters are read across the screen, etc.

I know this is superflous as hell. And I'll probably get annoyed by it within five minutes. But it will be a glorious five minutes.

share|improve this question
2  
I don't have an answer for you, but your question mad me laugh. Thanks! –  Chris Page Sep 18 '11 at 0:46
3  
This doesn't do audio effects, but: you may find the Cathode terminal emulator's amazing visual effects amusing: secretgeometry.com/apps/cathode Perhaps you could suggest they add audio effects. It would be a good fit. –  Chris Page Sep 18 '11 at 0:54
    
You can play a sound every line with bash's PROMPT_COMMAND, e.g. PROMPT_COMMAND="say 'something silly'" (replace say with command line audio playback of some samples). –  Ingmar Hupp Sep 18 '11 at 1:56
    
Can't believe I've never seen Cathode before. What a wonderfully awesome yet 'useless' app! :) –  canderson Sep 20 '11 at 16:57
add comment

1 Answer 1

up vote 5 down vote accepted
+50

Fun question :)

I'm not sure how you would get sound effects for everything but you could do something like this to get sound effects for a few things:

1) Open open your .profile (or .bashrc or wherever you like to keep your customizations) by opening a terminal window and typing:

open .profile

2) Add the following few lines to the bottom of the file:

function top() { afplay /System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/accessibility/Sticky\ Keys\ ON.aif; command top;}
function ls() { command ls; afplay /System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/accessibility/Slow\ Keys\,\ Key\ Registered.aif; }

3) Try typing 'ls' for a directory listing or 'top' to see the list of running processes & you'll get to hear the results of these commands.

By adding these two lines we are declaring two new functions with the same names as existing bash commands. We override the command itself so that we can play a bit of audio and then run the command itself (or vice versa as shown the 'top' example).

The audio files I am currently using are default audio files (at least on Lion) that are used for accessibility features. I chose these so that you could cut-paste, and see the trick in action but you could use any audio file in place of these.

Here's a site with a bunch of sci-fi sound effects you could use in place of these ones I'm borrowing from the OS:

http://fxhome.com/sounds/

share|improve this answer
1  
On Snow Leopard, the path is /System/Library/Components/CoreAudio.component/Contents/Resources/SystemSounds/‌​accessibility/. Nice find by the way; those are good sounds to use. I like the sound of Mouse Keys ON.aif for printing text to the screen. –  styfle Sep 18 '11 at 6:32
    
Thanks for the info - it doesn't quite extend the sound to when characters are being drawn onto the screen, but that seems like it would require a whole different terminal environment, rather than just modding .profile. –  canderson Sep 20 '11 at 16:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.