HACKER Q&A
📣 jack_riminton

Does anyone use sound effects in their dev environment?


It occurred to me that we often use colours in our terminals and code editors to highlight test failures, linting errors etc, but we don't typically use sounds. Has anyone integrated sound effects in any way?


  👤 gorkish Accepted Answer ✓
From [1] The story of PING:

  ping goodhost | sed -e 's/.*/ping/' | vocoder
He wired the vocoder's output into his office stereo and turned up the volume as loud as he could stand. The computer sat there shouting "Ping, ping, ping..." once a second, and he wandered through the building wiggling Ethernet connectors until the sound stopped. And that's how he found the intermittent failure.

[1] <https://ftp.arl.army.mil/~mike/ping.html>


👤 drybjed
This sounds like an idea borrowed from games or other media where doing certain actions results in an audible feedback. This is often done for the benefit of the audience, or to enhance the gaming experience, but I had an idea to implement this in my workspace to somehow influence my brain and make it more enticing to write code and somehow beat procrastination.

I wrote a Python daemon which on startup loads small .wav files into memory to make latency as small as possible, and listens for interrupts as well as reads from a fifo. Other programs can send commands to it to play certain chimes on demand. In ~/.vimrc I added autocommands on certain actions - buffer write, enter/exit Insert mode, enter/exit command line, text change, etc. to send commands to my daemon. Now, when I use vim, I get audible feedback of my actions during writing. Since this is all in a separate daemon done in an UNIXy way, adding support for this in other applications should be easy enough if I want to.

If there was interest, I think that I could clean up the project a little and publish it, including a set of free .wav chimes to use.


👤 mattlondon
Something I have often thought about for years but never implemented was "sound logging" where you get specific points of your code to play audio clips or tones instead of/as well as logging to console etc.

The idea being that you can test the app.and hear the sound logs going off as you go. In a tight loop that executes quickly I would hope that you could hear something "being off" in the same way that a mechanic can hear if an engine is "running rough" etc.

Of course... It might just be a totally inscrutable and useless wall of noise too! Won't know until I try it out


👤 hiAndrewQuinn
It isn't exactly what you have in mind, but I use `play` as well as a terminal theme color change to tell me when I'm using one or another language's keyboard layout. If you put & in front of play, you can make chords.

Here's an example:

    # Define notes for major seventh chord starting on A 440
    A=440
    C_SHARP=554.37
    E=659.25
    G_SHARP=830.61

    if [[ "$layout" == "Finnish" ]]; then
      # Play a major seventh chord ascending
      kitty +kitten themes --reload-in=all Apprentice &

      play -n synth 0.2 sine $A vol -30dB &
      play -n synth 0.2 sine $C_SHARP vol -30dB &
      sleep 0.2
      play -n synth 0.2 sine $E vol -30dB &
      play -n synth 0.2 sine $G_SHARP vol -30dB &
    elif [[ "$layout" == "English (US)" ]]; then
      kitty +kitten themes --reload-in=all Default &

      play -n synth 0.2 sine $G_SHARP vol -30dB &
      play -n synth 0.2 sine $E vol -30dB &
      sleep 0.2
      play -n synth 0.2 sine $C_SHARP vol -30dB &
      play -n synth 0.2 sine $A vol -30dB &
    fi

👤 privong
It's not a dev environment, but when I have been observing at large (inter)national telescopes, there are often a variety of sound effects in the control room. These sounds often announce a change in status (e.g., observing script started, observing script finished, script failed, script added to the queue).

One example is the Atacama Large Millimeter Array, that in practice is three separate arrays of telescopes (an array up to 50 dishes that are 12 meter diameter, an array up to 10 that are 7 meter diameter, and another up to 4 dishes that are 12 meters in diameter) that are observing different targets at the same time. Each array has its own kit of sound clips and after a few sessions it becomes second nature to identify which array needs attention by the sounds coming over the speaker. "Uh oh, looks like there's gonna be trouble!" followed by another announcement that the script was terminated. Then the array operator works on recovery while I would see if the script should be re-started or if weather conditions had changed enough to warrant a different choice of observation.

Similarly, optical telescopes often have audible alerts when integrations have finished and the data are being read off of the CCD/sensor.


👤 donatj
In around the year 2000, for career day I went to work with my uncle. He worked in IT for General Mills. Their office was very much a stereotypical poorly lit IT cave in the basement.

All their computers were a constant barrage of custom pop culture sound effects for every action. Minimize a window and a computer would emit like a "Ooh baby" clip for instance. Place had the tone of a morning radio show. Seemingly every action you could attach a sound effect to, they had. It would drive me insane trying to work like that.

Tech culture is very different from what it once was.


👤 pawelduda
https://github.com/kristiandupont/react-geiger

This plays a click when React components rerender, to make you aware of the page performance


👤 croo
One of my friends old office had speakers and every time Jenkins failed with a build it made a short sound. It was different for each project so everyone familiar with the sound would instantly know which project pipeline failed. He liked it and had fun choosing a sound effect fitting for his own project :)

👤 cpach
Sometimes when I wait for slow tasks to complete I do stuff like:

  sleep 900; say "Task X is probably done now"
On Mac this works out of the box, AFAICT Linux has similar commands.

https://ss64.com/mac/say.html

https://manpages.debian.org/bookworm/gnustep-gui-common/say....


👤 ozim
Not sure if more people have that but I hate sounds. I turn off all system sounds on my OS. I turn off all notifications on the phone.

It is not like I get called often but still had bad memories from former work where everyone had the same phone and the same sounds and I was often working 24/7 support. Hated that work and hated my morning wake up alarm that I had to change every couple months because each one I hated more and more the longer I used it.

I love melodic music and also any sounds not aligning to melody or rhythm are super annoying for me especially if I get into the flow.


👤 Kozmik1
The classic audio diagnostic on Linux/Unix is some beeps occurring and kernel debug text on all virtual terminals when something really horrible has gone wrong.

If you want to make a beep in a linux console, try adding this to your shell scripts. It should trigger the default system "beep" sound. I used to include this in my scripts that ran really long tests or cluster jobs to wake me up and check the results.

Sadly, on many laptops and PCs today, there seems to be no action on the PC speaker at all, but you can configure this system beep code to trigger a sound of your choice from your favorite gui console application.

In Python I believe you can trigger the system 'beep' sound with one of the following: print("\a") # cross platform print('\007') # linux only

My gui favorite, Konsole does not make any sound using these standard methods unless you manually configure it to play a file for "Bell in focused session" under Notifications. Of course this plays a wav/ogg file instead of triggering the PC speaker.

It can be really hard to make a little beep these days, when you consider you may have 4 different sound outputs (one for each display and video card, one or two for the motherboard), application specific audio levels that get set to quiet or muted by default arbitrarily, and then application specific opt-ins needed just to support a little sound that was kind of a failsafe notification in earlier times.


👤 RhysU
Peep:...

Abstract

Activities in complex networks are often both too important to ignore and too tedious to watch. We created a network monitoring system, Peep, that replaces visual monitoring with a sonic `ecology' of natural sounds, where each kind of sound represents a specific kind of network event....

https://www.usenix.org/legacy/events/lisa00/gilfix/gilfix_ht...

(not my work; that of a former co-worker)


👤 oefrha
I do. I have a small Swift HTTP notification service running on my dev machine, that uses SimplyCoreAudio to locate a specific speaker (so that notification sounds aren't affected by connecting headphones or speakers) and play a custom NSSound specified by the request. And I have all kinds of scripts calling that notification service on completion/error/specific conditions met from anywhere on LAN. The service also optionally shows a desktop notification dialog (through osascript app.displayDialog()) and/or send a Pushover notification to my mobile devices. Try it, it's a great way to wait for asynchronous tasks.

👤 pseudo_meta
I sometimes use sounds as opposed to print statements when debugging automations or certain UI behavior, e.g. to indicate whether a certain if-condition was triggered or not.

The advantage over normal print debugging is that you get immediate feedback, and do not need to switch to a console. This is also useful when it comes to debugging split second timings (custom window movement scripts).


👤 breakpointalpha
Yes! I wish there were better tools for getting sound out of the terminal.

I got bored waiting for long running scripts to finish one day and wrote this bash one liner.

Now I can run a command and put a pipe and the zzz alias on the end and it will tell me when it’s finished.

> alias zzz='echo "zuhg zuhg\n" "work work\n" "lowk taar\n" "jobs done\n" "sawobu\n" "dabu\n" "i can do that\n" "be happy to\n" "OK\n" "no time for play\n" "my life for the horde\n" "what you want?\n" "master?\n" "dabu\n" "for the horde\n" "okie dokie\n" "hragh\n" "something need doing?\n" "ready to work" | shuf -n 1 | say -vRocko'


👤 FigurativeVoid
If I am running a command that runs long enough such that my attention will drift but short enough such that I can't start something else, I'll append `echo "\a"` or equivalent. It's nice to know when the command completes.

Loosely related, I am almost always running some white noise into my IEMs.


👤 kleiba
The dude in the cubicle next to mine used to use sound effects extensively, but he died a mysterious death a while ago...

👤 gravitronic
In highschool my friend wrote a mIRC script that waited in our city's DALnet channel for someone to announce they were *\f\(our city), and would DM them hello, start a conversation and if they responded the script would announce "babyfaceangel16 is female".

He'd turn it up and go play N64, and occasionally his computer would announce he's in a conversation with a girl so he'd drop the controller and pick up the conversation.


👤 CGamesPlay
Yes! I play a “bonk” sound when a command in my terminal fails. Helps me break out of autopilot up-enter-up-enter loops that I can do accidentally. I wrote a blog post about it a while back: https://cgamesplay.com/post/2020/12/09/iterm-notifications/

👤 rpastuszak
`$ ... && say 'Notice me father, I am complete'`

(something I add to longer scripts when the job gets particularly boring)


👤 girishso
I play different wav files when compile fails or succeeds, so I don’t need to switch to terminal from the editor. This in addition to Anybar(1) red/green icons.

1. https://github.com/tonsky/AnyBar


👤 joeld42
I've heard of using "Geiger counter allocators" -- custom allocators that make a small click whenever an allocation happens to get a sense of when a program is doing lots of allocations, especially lots of small allocs, as it's running.

👤 elric
I once configured a Jenkins instance to play different sound effects when certain builds would fail. Originally these were played out of our big office TV, but its speakers broke at some point. A few years later, a couple of new hires came up to me to tell me they thought their laptops were infected with malware, because it would sometimes make weird noises. Turns out they had Jenkins open in a browser tab, and it would play the sounds when builds broke.

👤 lieks
I used to work at a company where running the full test suite took about 10min on my local machine. I would often run

    ./test.py; beep
where beep is a script I made that plays the Macintosh boot beep[1]. It was pretty useful.

I also did something similar that one time I had to compile LLVM (~4h on my laptop) and that other time I had to compile Firefox (~6h on same laptop).

[1]: https://ieks.cc/articles/mac-beep.html


👤 bubblesnort
Terminals have supported a bell since terminals existed. The moment I hit tab on an interactive shell and it bleeps, I make sure it never does that again or my SO can't sleep.

👤 josefdlange
When I've had longer-running test/lint suites in the past, I've added simple sounds to the ends of their run scripts (birds chirping for success, alarm blare for fail) that help me draw my attention back. I had an issue where I would go off and read the news, or social media, or whatever, when running my tests, then suddenly it would be twenty minutes later and not only would I have wasted fifteen minutes, I'd have forgotten what it was I was even doing...

👤 Doctor-R
Ages ago, before even dumb terminals, we were programming on punched cards, batch compiling, and printing on a line printer. For some reason, this printer supported control G (the bell character) with a buzzer. So someone hacked the compiler to include control G in the beginning of the error messages.

So we could sit back and listen to the line printer. If the buzzer sounded, the programmer would say "Oh &#$!@". Just like Pavlov demonstrated.


👤 jafarlihi
I have made sysm specifically for this: https://github.com/jafarlihi/sysm

> sysm makes your system play custom sounds when any configured system or external event happens


👤 rdimoaejqcqle
I worked in a quantitative trading company, and the traders would use sound effects for every kind of alert. Each time a risk limit gets hit, a disembodied voice would say " limits!" or make a pig oink or something. There was a shared folder of thousands of .wav files.

It reminds me of plane cockpits where the system barks out things like "Terrain! Pull up!" if the pilot needs to react instantly.


👤 bediger4000
Absolutely not. Cubicle farms are noisy enough as they are. The occasional beep from an ASCII Bel character is more than enough.

I also surprise myself regularly by finding that I'm still wearing noise-cancelling headphones long, long after the Zoom or WebEx has ended. When I take the headphones off, I'm surprised again by how noisy the background is, particularly the howling of the ventilation system.


👤 frakt0x90
I used to do this as a data scientist. Sometimes training jobs would take an awkward amount of time like 30 minutes or an hour and I'd get sidetracked doing something else. So I just had it beep when it was done like an oven. Prevented me from having to check back every now and then or missing an email. We didn't have good chat integration back then.

👤 yipbub
I have these that come from history|grep espeak

From a particularly sunny day where I was having too much fun waiting for my builds:

    while ps -49011;do sleep 3;done;espeak "IT'S DONE YOU FUCK. COME WORK.";telegram-send "done"
More regularly:

    gh pr checks 2850 --watch ; while true; do espeak "main done";sleep 5;done

👤 fabrik42
I use a sound effect to notify me about the exit of long running commands

    alias kk
    kk='say "ok! I am ready"'

Usage

    sleep 10 && kk
Not my idea, I found it years ago in some dotfile. But it is kind of handy if you run a long-running task in a terminal in the background.

👤 busterarm
Almost 20 years ago, Ang Cui and I were bullshitting and brainstorming around an idea he had to categorize patterns in network traffic as audio tones so that one could listen to network traffic flow.

He has since gone on to do other, bigger things and I'm still sitting here kicking myself for not at least pursuing the idea a little.


👤 gregalt
Alam Turing used the "hoot" instruction on the Manchester computer in the 1940s to signal different things for debugging https://www.bbc.com/news/magazine-37507707

👤 solardev
95% of my work (web dev) isn't so much waiting for something to happen, where a notification of any sort would be useful. Most builds etc only take a few seconds, so I just wait.

Most of the work is thinking through a problem, then ensuring it's coded correctly. The colors and syntax highlighting and squiggly lines and Typescript warnings etc (in Jetbrains) are all helpful because they are contextual. "Hey, this function isn't written right" or "you mapped this array to an invalid return type" let me know exactly what I did wrong so I can fix it.

I don't think random beeps and dings and pewpews would have the same kind of contextual usefulness, and would probably be annoying and take me out of the zone whenever I'm focused and coding.


👤 inanutshellus
Sure. I've used `say` on macos (spd-say for linux) like so:

    mvn clean install ; say "Done"

It's great for those build times that're awkwardly long. Just long enough that you get bored waiting, too short to accomplish something else in the meantime. So you crank up the volume, load up HN, read an article and "DONE!" OH HOLY SHI--. Back to work.

that said it sucks to set up that flow when you /sometimes/ are around other people. it's pretty jarring if anyone can hear it, so you just wouldn't do it in a tight-collab area.

Usually though they're SUPER annoying so eventually I weeded them out of my workflow.

Would not recommend using sounds in development.


👤 JohnFen
No, I do the opposite. I keep my speakers muted when developing. I don't want sounds. But then, I'm also one of those weirdos who prefers not to use colors as well (they hinder rather than help me), so it may just be a personality thing.

👤 ElFitz
For those interested, Xcode lets you configure sounds to be played when a breakpoint is reached. It can also be set up to conditionally play a sound.

Those breakpoints can also be configured to continue running the app instead of pausing.

It can quickly get out of hands though.


👤 vunderba
I don't personally but then again most of my work is not asynchronous in nature.

A friend of mine has a TSR application that plays sounds to simulate as if they had a mechanical keyboard which they use with their laptop. So that's something.


👤 swah
Same, I was surprised to find out how hard it was to play a sound everytime the word ERROR appeared on my terminal.

I even wanted to run a sound on the "positive case" ie a loop that is processing a few hundred items, could easily benefict from a subtle sound so you could feel when some request got hold...

Like virtually all hardware does ie your vacuum cleaner has something stuck and is not operating at 100% etc.

(I'm planning doing a "toy" terminal using a gamedev environment just to explore this a bit)

edit: If you use Raycast you can just throw confetti from the command line too for extra dopamine:

    open raycast://confetti

👤 bloopernova
Instead of sounds to indicate the end of a long-running task, use a notification:

https://github.com/t413/zsh-background-notify


👤 mellosouls
I use a pomodoro app that pings when time is up and ticks for the duration if sound is on.

One constraint on frequent sound use is you can only really use them in either a solo environment or with headphones without being antisocial; which is probably a contributory reason to it not being a significant presence in modern development.

I suspect it was a more common thing in the beginnings of home computer use (80s onwards) when creating and controlling sound was immediately available from the command line before programming got abstracted away to a secondary level.


👤 tacon
In the depths of the pandemic, James Shore ran a Tuesday TDD Lunch & Learn livestream. He based everything around TDD with an audio addition to the red/green display. Here is an example of the sound:

https://youtu.be/nlGSDUuK7C4?list=PLD-LK0HSm0Hpp-OspFpZ32uY7...

I really like the gentle audio feedback with TDD, so I took the sounds from James' bespoke TDD harness and added it to my jest-audio-reporter.


👤 lowdownbutter
I can't help envisioning such a thing with *Command and Conquer* announcer or *Warcraft 2* peasants.

"Building ..." "Cancelled" "Unable to comply, building in progress" "Construction complete" "Cannot deploy here"

"Job's done"

etc

https://www.youtube.com/watch?v=HW1qfrx_Lg8 https://www.youtube.com/watch?v=PoMhMZZjbGg


👤 imron
> Has anyone integrated sound effects in any way?

Terminal bell rings every time I press escape more than once in vim :-)


👤 picometer
A while back I prototyped (very roughly) an auditory equivalent to “syntax highlighting”, using ambient tones and white noise, rather than discrete beeps/sound effects. [1]

I’m actually revisiting this project right now! I’m reimplementing it in Rust and also exploring different ways to communicate parser state and other contextual information through sound.

[1] http://marycourtland.github.io/AuralJS/


👤 jagged-chisel
VSCode is adding sound as an accessibility feature. I am personally not in need of this feature (yet), so I notice when they surprise me with a new sound for a new event turned on by default.

I think I could find value in adding sound to my dev environment, iff there were a quick and easy way to sample and select from collections of sounds made for this purpose.

As it stands, if I don’t like the sound chosen by the audio accessibility group, I just turn it off because there’s no UI to change it.


👤 Animats
Once, Apple had Sonic Finder.[1] It was kind of cute. Especially the part where the sound for dropping something in a move was deeper for a larger object.

[1] http://sonify.psych.gatech.edu/~ben/references/gaver_the_son...


👤 upg1979
It reminds me of Extreme Feedback Device (XFD) lava lamps, pilot lights, and more.

👤 fimdomeio
My suggestion for anyone wanting to try this is to use small bleeps that don't get annoying over time. I use some retro game sounds by cabled mess[1].

[1] https://freesound.org/search/?q=Retro+Video+Game+sound+effec...


👤 danpalmer
I have `blaze` (bazel) aliased to a command that runs whatever blaze command I'm trying to do and then rings the terminal bell. Any compilation, run, test, etc, all gets a visual and audible notification that it has completed.

This is great for my focus. Even if a build or test is only going to take 10s, I'll still change window to my email or chat. The ping brings me back.


👤 gknoy
I have a shell alias that I use sometimes when running long-running test suites locally, or doing some long task that is blocking my work (building Docker images, installing libraries). It echoes something for the shell, shows a success/failure image in the terminal, and playes an audio clip (loud and annoying ;)) when tests pass. The only way I could make it better would be to play a sad trombone on failure:

    # e.g. pytest tests/test_foo.py && SUCCESS
    alias SUCCESS="echo -e '\n\nSUCCESS' \
               && bash -c 'mpv ${media}/kazoo.mp3 &' \
               && imgcat ~/Pictures/success.png \
               || imgcat ~/Pictures/fail.png"
It's useful because I can hear that the task is done while I'm reviewing a PR, or reading documentation, or loading the dishwasher.

👤 wkoszek
I don't use anything, but each time my eyes hurt, I wonder if I should: with some sense of music and tones, I often wonder if I could develop enough audio feedback to be able to do tasks like opening apps, writing, compiling, and getting feedback. I also often wonder if that is something that the visually impaired already use.

👤 snarfy
I'm overloaded with notifications. I don't want any more.

👤 zulban
Sure. I have scripts to build my unity game on several platforms, the last is Android which then installs on my phone. It plays Ocarina of Time sound effects upon success or failure, since it can take several minutes, or randomly fail before then. In both cases it's nice to hear immediately that I should do something.

👤 frantzmiccoli
I have scripts that run in the background to check for the health status of some systems I am monitoring. I use a program to display results on my wallpaper and I trigger a "say" command if it fails.

I also commonly use a "say" command to just get notified when a long running command is done.


👤 dfansteel
I once used the Xcode feature to play a sound when a breakpoint was hit. My EM had a conversation with me.

👤 maniatico
I configured Visual Studio to play sounds if a compilation succeeded or failed (to wake up if it's taking too long). I also configured it to play a sound if a breakpoint is hit (quite useful if you are debugging a game and some assert you don't care triggers)

👤 BWStearns
Sometimes if I'm running some long running task I'll do `; say finished` afterwards so I get pinged when it wrapped up.

At once point I had a slightly more sophisticated command that would check the output and say completed or failed but it wasn't much more useful.


👤 MrHamdulay
There is React Geiger which makes geiger counter noises on render [1].

Easy to tell when you have messed up and re-rendering tons unexpectedly.

[1] https://github.com/kristiandupont/react-geiger


👤 n3t
At a previous job we had a service that handled around 1 query per second.

I crafted a oneliner that `tail -f`'d the logs and played a note for each response. I believe there were different notes for different HTTP status codes but it was years ago so the details flee me.


👤 chrisguilbeau
Late to the party, but I have a script called zbeep that takes command and args as arguments. Makes a sound before starting execution and has success and fail sounds. It’s great for those 5-10 min processes. For long stuff I have a similar zslack command.

👤 jbarberu
I use a command that'll play a good/bad sound effect based on previous shell command exit code.

Something like:

  function boop() {
      local last="$?"
      if [[ "$last" == '0' ]]; then
          sfx good
      else
          sfx bad
      fi
      $(exit "$last")
  }

I'd then do:

  $ make -j; boop
or

  $ nmap <...>; boop
That way I can focus my attention elsewhere while waiting for stuff that'll take anywhere from 20s-2min without losing track of time.

Lately I've been experimenting with throwing in notify-send in there too, but find it a bit much to both get sound and visual feedback.


👤 stusmall
I remember I was screen sharing while troubleshooting something at a new job. I hadn't really set up my mac, and most everything was still defaults until I got a working build/deploy. One of the founding engineers said "You should turn bells off on your terminal. If [the CTO] sees that, he will give you so much shit." I should have taken that weird but ultimately innocent interaction as a sign that I was walking into an absolutely insane environment.

It's a tangent, but the bell character is a left over from how people used to do what you are asking for. Your question just reminded me of that strange conversation and harsh reaction.


👤 cmpalmer52
I use a plugin called Grep Console in my JetBrains Rider IDE. It lets you auto highlight, color, or play a sound when certain regular expressions are found in the log output. So I set it to play an 8-bit sounding “thump” sound whenever it sees an [ERR] in the log output to hear any handled, but logged, errors. I also set up other sounds for specific things I’m looking for so I know when they’ve occurred (sirens, ahooga horns, sproings). It’s a great help, along with color coding, to find things in a long log file when verbose logging is turned on.

👤 philsnow
It sounds a lot like “auditory icons” as used in Emacspeak [0] and some other environments to improve accessibility for people with vision impairments.

Bill Buxton [1] seems to have a good treatment of the subject but i don’t know what’s autoritative

[0] https://tvraman.github.io/emacspeak/manual/Auditory-Icons.ht...

[1] https://www.billbuxton.com/AudioUI06icons.pdf


👤 john-radio
If you're on a Mac, your terminal has `say` built in. Lots of Mac users don't know about it but I use `say` a lot.

    $ bash long_build_script.sh; say job done

    $ sleep 1; say job done

👤 TZubiri
Yes, here are some of my scripts:

gcc hello_world.c ; beep -f MICROWAVE_DING_FREQUENCY

gcc hello_world.c 2> /dev/snd

./hello_world xargs -I {} curl -X POST "https://api.openai.com/v1/audio/speech" \ -H "Authorization: Bearer sk-Ajs7aNsa8dJa5dr8jS4xManJ6V9xIjk" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "text": {},"voice: "echo"}' > /dev/snd


👤 squigz
It really is interesting that we generally don't utilize sound as much in development as our other senses. One reason many of us don't might be that we listen to music as a way to focus while coding?

Sort of related, but I was monkeying around on MonkeyType the other day and turned on the 'pentatonic scale' key sound effect... and it seems to help me be more consistent with my typing? It's quite interesting and rather unexpected. (If anyone knows how I could recreate that sound effect globally, I'd appreciate it!)


👤 dvh
I use short beep in all my inotify/rsync scripts to make sure that local file I just saved was finished uploading to server so I can refresh the browser.

Another one is espeak that says "keyboard" when my keyboard get disconnected (usually due to me soldering stuff which then kills my keystroke monitoring keylogger which then I need to manually restart because it runs as root)

On Upwork page a custom extension keeps continuously beeping when new message appears in chat.

At 17:00 espeak says "17:00" to remind me it is time to make a soup.


👤 actinium226
There was once a VSCode extension that would make typewriter sounds as you typed, including a nice "ping" when you hit enter. A quick search shows a few extensions like this, but I tried installing one and no joy. But it was really nice to get a little audible feedback.

I do think this is a great idea. I notice that I get super engaged with video games in part because the constant noise meshes well with ADHD, and so I'd love to see a VSCode extension of some sort that can do this.


👤 mayoff
I have Xcode set up to play a sound effect when a build or a test run finishes successfully, and a different sound effect (the Metal Gear alert) when it fails.

👤 criddell
I've used the same sound effects for decades now.

In Windows, open the Sound control panel page (type Alt-R then enter mmsys.cpl is the easiest way to get there) and on the sounds page there's a list you can scroll to see all the program events you can define sounds for.

I use Visual Studio and play a Homer Simpson "Doh!" clip for build failed and a Fred Flintstone "Yabba dabba doo!" clip for build succeeded.


👤 rerdavies
I would really really like a VSCode extension that went "bing" when a build finishes. I think that would seriously boost my productivity.

👤 gnarlouse
I have a completely local dev environment for a cloud based project. It requires me to stand up a few things so I can mock resources like Google Cloud. It can sometimes take a bit to populate all the customer config, depending on the machine I’m using anywhere from 5 sec to 45 sec. I think I’m using systemd to pop a notification at the end of a lengthy start up script For everything.

👤 NotAnOtter
This sounds like hell.

It might be a brainhack positive reinforcement type thing, like "tests passed! Ding!" but for actual functional use ("File passed linter! Ding!" every few seconds) sounds like overstimulation fodder.

I already get annoyed at my machine when it's trying to correct what I'm writing faster than I can write it incorrectly. Let me get the rough draft out first.


👤 amelius
I listen to the sounds of my code loading from my cassette tape drive. And my modem makes sounds too, when I'm doing stuff in the cloud.

👤 serced
In the previous startup I worked at, we set up a PR action that played a celebration thingy after every PR merge. We used https://github.com/leokster/dingdong_sonos to play on the Sonos speakers. Fun little gimmick but not really as a usecase like colors for linting etc.

👤 jdlshore
Yes; my build script plays one sound on success, another when lint fails, and a third when anything else fails. It’s on a watch loop so it runs whenever I save.

I use TDD, so I’m running the build every few minutes. The build (including tests) only takes half a second, so I can hit save, hear a sound, and continue programming without looking at the output. It’s surprisingly nice.


👤 wruza
I buzz in ahk on timeout paths (e.g. dialog failed to show), also signal the end of lora training (half an hour+). Tried to voice over tsc -w errors, but that got old quickly.

I work in automation so sending an IM in case something’s wrong (or finished) is not a rare thing. May count as a sound too. I also shoot videos of everything a visual script does for debug (xvfb, ffmpeg).


👤 xaellison
I worked for a company where the main workflow was to download an entire postgres dump at the start of the day and work off that. It took 25 min. I aliased our download command to play run a profane version of `say "beep beep"` after it finished. Then one time it spoke up during our stand up and everyone heard. It got more polite thereafter.

👤 armchairhacker
I don’t, but I can imagine someone using them for events that may take a while (e.g. build ended, tests ended, deploy ended), or particularly if the event is a failure they have to respond to.

Xcode at least used to have sounds for “build failed” and “build succeeded”, and IntelliJ gives you notifications for build and test failures when the app isn’t focused.


👤 vinay_ys
Hook up different kinds of alerts/notifications to office intercom and announce outages and pages! Gives the feeling of a real sense of urgency and danger! :-) Sev1 alerts, DDOS attacks etc. You can do this for positive things too – like a e-commerce product launch going out of stock in record time, or hitting a sales target etc.

👤 digitalsushi
in the late 90s i used a script someone made that would trigger callbacks on syslog patterns. there's different types of icmp traffic; i had iptables log the type that the ping command uses, and i played a submarine ping for each that my gateway received. i'm on the east coast usa, and i remember that i would get barraged with pings overnight, around 4am, as my ssh port got hammered simultaneously.

its 25 years later and the thought of having a single discoverable element on the net scares me.

i would really like an app that can create ambient music with composition: small songs that can overlay with harmony; if my network is running hot the baseline ramps up. if i have emails waiting, little tweets from a treble track that are fleeting but line up with the beat. there's so many ways i could use that soundtrack. plug it into the ide, errors in the buffer, subtle cues.


👤 digitalsankhara
I do some personal work in MacOS 9 on a MacBook Pismo and use the standard Platinum sounds at a low sound level. I personally find the little click and chirp soundtrack quite useful as audio feedback. Though if I were to do this in the office, for the sake of my personal safety, I think I would wear headphones!

👤 paragraft
I've used it in anger on a project with an unreasonable start time in its test suite. Put an alert sound on VS when breakpoints were reached let me start a test with debugger attached, and then go do something else for the time it would take to start, but not forget what I had been originally doing.

👤 lhamil64
I forget if this is a setting or on by default, but VScode will play a sound when a task is finished running, and it's different based on whether the task succeeded or failed. I use this so that I can leave long running jobs (usually testcases) running and not have to keep checking on the status.

👤 WalterBright
I suppress all the sound effect alerts Windows makes. They're not helpful, just annoying.

But when debugging real time software, where instrumenting the code breaks it, I would have the code run an instruction that toggles the speaker state. By the tone it makes, I can infer what's happening.


👤 daveddevx
https://github.com/daved/shound

Configurable to play a sound for any command you set (including not found). I've been using this or similar for many years and find the terminal to feel empty without it.


👤 huhtenberg
Decades ago I tweaked a toy raytracer I was messing with to make a click for every screen pixel traced. It made zero practical sense, but the result was way cool nonetheless. Added another dimension to the rendering process and made it feel more tangible, if you will.

👤 dgunay
Only a little bit. I have VS Code configured to emit a small sound when a terminal command fails, or when a debugging breakpoint is hit. I also used to add `; say "tests are done"` to my test command so I could go to another screen and know when my tests finished.

👤 JonChesterfield
I'm moderately interested in audio feedback indicating performance behaviour. Maybe memory allocation or syscalls. Page faults. Something to play during unit tests or similar and give some indication of things going wrong. Not interested enough to implement it yet.

👤 RGBCube
HELL YES!

I actually did set my shell to spawn a background task to play the vine boom whenever I entered an invalid command.

Something like

    command_not_found() {
      pw-play /opt/boom.opus &
    }
And it actually improved my command accuracy by a lot. And it was super fun.

👤 Mithriil
A small sound effect I used once. At my last job, I queued a beep in my terminal at the end of the company-needed opening script that took 3 minutes so that I could look away and know when it is ready. (Useless to say that I almost never closed the console.)

👤 b800h
One rather fabulous example I encountered had speakers rigged up to the wallboard that displayed pipeline info, and when someone broke the build, a clip of "Father Jack" from Father Ted profusely swearing was broadcast out across the dev room.

👤 n0n0n4t0r
For long running scripts, I like to finish them With something like `say "wake up lazy bastard`. My previous employer has a wiki full of procedure containing this kind of easter egg. (I knew the founders and it made them laugh, so no issue there)

👤 relwin
Unshielded embedded systems generate RF noise that can be received on AM/FM radios. Some devs figured out which processes generated which noises and could determine what the system was doing, or if a loop was taking too long just by listening.

👤 sc11
Matlab plays a sound on error by default (on some systems through the internal speaker, bypassing volume controls) and I always found it irritating.

The only use case I see for them is something running in the background that takes a while and might get interrupted.


👤 thenthenthen
I integrated this handy squeaky door sound effect for when I open my laptop based on its ambient light sensor [1]

[1]https://youtu.be/pzJwDs6KRXA?feature=shared


👤 CalRobert
Come to think of it, Windows 95, XP, etc. had lots of sounds built in. ICQ played a typewriter sound with every single keystroke. It was a bit annoying, but if I listen to those sounds now it definitely brings back a strong sense of nostalgia.

👤 Gregam3
At one point I had my partner scream "breakpoint" and recorded it, it then played from my ide whenever a breakpoint was hit so I would swap back to that workspace and continue working.

But it got extremely annoying within a few days as you could imagine


👤 qsdf38100
When some repetitive task (rebuilding a program, running tests, …) tend to last more than 30 seconds, I like to make it beep when it’s done so I can do something else and not get carried away and loose some precious time on my #1 priority goal.

👤 janalsncm
Yes, if I have a long running script in Jupyter I run a cell right underneath containing

!say “done”

And turn my speakers up.


👤 ChrisMarshallNY
No. I also don't listen to music.

I do, however, use colors, and the GUI over CLI, whenever possible.


👤 benterix
Yes! I used it a lot with CDK as all the process was usually quite long so I switched to doing other things and a nice sound would tell me the synthesis went fine whereas a "broken glass" sound would mean I need to do better.

👤 anothername12
When I was a kid learning pascal, I used beep() debugging (similar to printf debugging)

👤 aendruk
I’ve set my shell to discreetly play the sound of a mouse button click upon completion of any command that ran for longer than 20 seconds. That choice of sound has the convenient effect that no one else seems to consciously notice it.

👤 wanderingbit
I made a small CLI pomodoro tool that both locks the screen and emits a chime sound when the time limit has been reached.

https://github.com/Melvillian/pom-cli


👤 tuckerpo
For very long local builds, like a full bitbake, I do `&& bell` so I know when to tab back to my build terminal.

i.e. `bitbake bsp-vendor-full-image || beep && beep` so I get a sound when things finish, whether it failed or succeeded.


👤 ijustlovemath
Sometimes I'll add a chime to a long running build, eg `make || aplay fail.wav`

👤 schwartzworld
I sometimes use say to alert me when a long running script completes. https://ss64.com/mac/say.html

> doSomething && say “Finished!”


👤 nicbou
I used them when running some tasks. There's a shortcut for it in my dotfiles.

👤 smrtinsert
Years ago we decided on gradles earlier versions. I added a sound effect to my machine for when it finished. I might have used a video game computer sound so that it sounded real and not super annoying to anyone nearby.

👤 atemerev
When I was writing electronic trading systems, I experimented with audio logging for different types of fills / cancellations / other trading events. It was useful, but somewhat annoying. I disabled it later.

👤 bonestamp2
I used to have an intellij plugin that would make a sound when there was a regix match in the terminal. It was extremely useful, I had it set to make a sound when a build was complete, or there was a compilation error.

👤 sleepybrett
I do

`stupidlylongrunningcommand | say 'stupdily long running command complete'` a lot.


👤 aidenn0
My dad used to work long hours at a startup where the build-times were non-trivial. He setup his build to echo infinite ^G characters (i.e. the terminal bell) when it finished and would nap while it was building.

👤 brbrodude
I've set up https://github.com/whleucka/reverb.nvim after that and finding it really fun

👤 pigcat
Here's my very simple solution

Add this to your ~/.zshrc or ~/.bashrc

alias alertme='printf \\a; sleep 0.1; printf \\a; sleep 0.1; printf \\a; sleep 0.1; printf \\a; sleep 0.1; printf \\a'

I add this after longish tasks - eg:

python longtest.py; alertme

seeddb; alertme


👤 wrp
I suppose the Michael Winslow method doesn't count? (https://www.youtube.com/watch?v=robOb5F3sOk)

👤 shireboy
Visual studio plays a >donk< on test or build failure and a ding on success. I have a habit of switching away to another project or hacker news while tests run, so this is extremely useful for me.

👤 jonathanyc
A friend told that at the trading company he worked at, traders set up distinct sounds for alerts.

I was hoping someone with a more direct source would comment in the thread but a quick Cmd-F doesn’t turn up anything!


👤 shae
I have both sounds and visual for process success or failure from the command line https://github.com/shapr/bloohm

👤 leros
Other than 3 hours where I modified git push to play "Push It" by Salt-N-Pepa before it got annoying, nope.

👤 frereubu
My first thought was some kind of 16-bit sound when you open and complete different brackets, perhaps a different sound for each depth, but I imagine that would become annoying pretty quickly!

👤 qrush
I've set my Slack notifications to the "Hummus" sound instead because it's a lot less stressful and funny. Yes it's on your Slack too. Join me in chickpea silliness.

👤 Jenk
Continuous testing tools would make good use of audio. It's been a minute since I have been in need of such a tool, but I could appreciate differentiating sounds for passed/failed.

👤 gwbas1c
I once had a very boring job with long compile times. I played a sound at the end of the build script, because otherwise I would just start goofing off and not doing anything.

(I quit shortly after that.)


👤 eastbound
Yes. I’ve modified maven so that it says “Success” or “Error” (with the command `say` of macOS). It’s very useful when you have a build of 30-50s that you execute dozens of times a day.

👤 prmoustache
Not in dev environment but syadmin one, we used play sound on the machine which was hosting the nagios monitoring dashboard on a TV screen.

Better to have one sound than 5 individual phones alarms.


👤 z3t4
When making my own editor I found one place where I wanted to have sound: When searching, and the search has reached the end - I added an auidble beep as well as a shaking effect.

👤 calvinmorrison
In Olden Days (but recently enough it was retro) we borrowed a receipt printer from the front desk and printed the motd and jira tickets and fortune statements at random times

👤 iamwil
I sometimes do (on my mac)

`some_long_running_script; say "done with the script"`

and it'll say the line when it's done, whether there's an error or whatever. so I know to check.


👤 analogwzrd
Definitely need to add a womp womp on a compile error

👤 fnord77
I feel like I would get PTSD eventually. The slack new message sound triggers my anxiety, I can only imagine what a compiler error sound would do to me :D

👤 rldjbpin
personally, as mentioned by others, a sound alert can be handy as an idea when a long-running background task finishes. this is especially pertinent for those on ssh sessions to another machine.

my spin for the workaround used to be echoing the "bell" symbol (07) in ASCII after the command finishes. but it would not respect the audio device i use while i tried it. definitely a good usecase for ricing your bash/zsh.


👤 racl101
I use the say command on MacOS for a few things.

That command is a kinda fun. One time I had it read out to the lyrics to "Fitter Happier" using the Fred voice.


👤 marssaxman
No - in fact I habitually leave my speaker muted, to prevent programs like Slack from distracting (and likely irritating) my co-workers in the office.

👤 dpedu
MacOs ships with the `say` command and once in awhile I'll do something like `longRunningProcess ; say its done`, but not beyond that.

👤 zffr
I sometimes use sound to notify me when long running tasks finish. On macOS you can do this by doing "long_command; say done;"

👤 theultdev
Yes, if it's frequent it becomes annoying.

If it's infrequent you forget what it's for.

I blare music when I code too, so that takes precedence.


👤 faizmokh
I configured my Xcode behaviors to play a sound when a build is completed or when the test fails/passes.

👤 kqr
I've long wanted to explore this. There are two ways one can go about it:

- Airliner cockpits use certain audio signals deliberately and sparingly, to draw attention to important events.

- Some systems naturally (or artificially) emit sound as a side effect of what they do, and this sound, while not signaling anything specific, is part of what allows the operator to build mechanical sympathy for the system.

I think these two are completely different ways to use sound, but I imagine both could be viable.


👤 _joel
Yes, the system beep, although that just makes the terminal flash on my setup :)

👤 valbaca
for very long builds, I'll simply add `; say "build done"`

👤 pornel
On macOS, when I run a long script I add at the end:

    say done

👤 hackmiester
I use `ping -a` so that when the host comes up, my terminal will beep.

👤 dghughes
What about smells? Scent is a powerful tool for recalling memories.

👤 jbverschoor
I make them myself

👤 DidYaWipe
I have. You can assign sounds to stuff in IDEs, which I had some fun with in the early days of Visual C++.

I was the tech lead on a project at a Big-6 consulting firm, so my friend and I set the team's machines up to point to wave files on the network for basic compilation events. Success, warning, error. And the Windows startup sound.

This allowed me to change any of these sounds at any time, unbeknownst to the team. At some point, I changed the "build failed" sound to my own voice saying "That's crap!" It was amusing to hear this randomly coming out of this cube or that... especially my own, when I had a build fail and said "That's crap" right before my computer said it in the exact same intonation.

Yeah... easily amused in the days of "Compaq Business Audio!"


👤 mleo
I find default calendar notifications useless. They pop-up 15 minutes before the meeting so they get dismissed, out of site, out of mind. With an integration of Keyboard Maestro, iCalbuddy, Stream Deck and modified shell script I show the upcoming meeting on a Stream Deck key.

Stream deck key shows time of next meeting, how long until that is, with background colors changing as it approaches, and how many meetings remain for the day.

For the sound effect portion, at 1 - 2 minutes prior and at the meeting time, a sound effect is played giving me the heads up that a meeting is starting. Also at 1-2 minutes prior to meeting starting, the Sonos speaker in the office announces the meeting subject.


👤 kjs3
I don't hate my coworkers that much.

👤 lofaszvanitt
Yes, we do... when the system reboots.

👤 liveoneggs
Everyone with a mechanical keyboard

👤 leecarraher
steve gibson of grc apparently uses sound as a second input channel to handle various tasks. as i recall he made an app decades ago called wizmo that allows you to script sounds, and as listeners probably recall, yabba-dabba-doo is one such audio channel input to let him know someone has made a purchase order on his website.

👤 al_borland
Many years ago I had a manager who set a sound on our monitoring system to make a noise every time we got an alert. It went off non-stop and everyone started yelling at him until he turned it off.

👤 Dowwie
it would be hard to hear it over the roar of my mad typing on a mechnical keyboard

👤 ycombinatrix
i change the default windows beep, does that count?

👤 fragmede

    ping -a

👤 kelsey98765431
what is wrong with the top comments in this thread? Fastest way to get me to find an alternative software is to have it start beeping and whistling at me.

👤 webgtx
From my perspective, this is unnecessary overhead.

👤 tdeck
Now that you mention it, OpenSCAD makes a sound when it's done rendering which I find very helpful. Sometimes it takes several minutes and I usually want to queue up a print right when it's done.

👤 nprateem
Yeah I sometimes say like BOOM or NIAAAOOOMM when I get things working

👤 pavel_lishin
Absolutely fucking not. My computer should make no sound that I don't explicitly ask it to make.

👤 witx
yes

> blacklist pcspkr


👤 semiinfinitely
Absolutely not