Readit News logoReadit News
Posted by u/jack_riminton a year ago
Ask HN: 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 · a year ago
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>

adrian_b · a year ago
That is like the beep for continuity testing that is provided by most electronic multimeters, which is very useful because both your hands and your vision are occupied with the tested equipment.
throwanem · a year ago
Most older DMMs. Modern ones synthesize a steady or intermittent tone in response to steady continuity. Older ones just use an instantaneous voltage threshold, which is much better for diagnosing an intermittent connection than the newer style, where the tone generator inadvertently does so much time averaging as to be useless outside steady state.

I keep a 30-year-old Triplett around more or less just for this reason. My Fluke from 2019 is much better at everything else, but...

WalterBright · a year ago
That's the kind of engineer I like to work with!
whalesalad · a year ago
macos has the "say" binary which is fun to play with for stuff like this
nomel · a year ago
I did something similar for finding which outlet a breaker went to. I connected my MacBook to the outlet, airplay to the TV so it was loud, then had it yell if the power was disconnected:

    while ! pmset -g batt | grep 'discharging'; do; echo waiting; sleep 1; done; say disconnected

ryanmcbride · a year ago
a billion years ago I piped say and some various noise files into ffmpeg to make audios that sounded like numbers stations, I don't think it would run anymore but it was a lot of fun :D
layer8 · a year ago
centur · a year ago
Back in windows and powershell days, this was my favorite "security reminder" prank. Everyone who forgot to lock their machine and walked away got this script executed on their machines. TLDR: it schedules a task "Security Reminder" to play "I'm watching you" via voice synth, every 30 mins.

```

$action = New-ScheduledTaskAction -Execute 'Powershell.exe' -Argument '-NoProfile -WindowStyle Hidden -command "& {[System.Reflection.Assembly]::LoadWithPartialName(""System.Speech"") | Out-Null; (New-Object (""System.Speech.Synthesis.SpeechSynthesizer"")).Speak(""I''m watching you"")}"'

$period = New-TimeSpan -Minutes 30;

$trigger = New-ScheduledTaskTrigger -RepetitionInterval (New-TimeSpan -Minutes 30) -RepetitionDuration (New-TimeSpan -Days 1024) -At 9am -Once

Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "Security reminder" -Description "Security Reminder"

```

You can imagine people faces, especially many were sitting in headphones in open space offices. Those were the days...

mrbombastic · a year ago
I often use this when i want some feedback from a script somewhere running on my machine but don’t know where output is going
imperialdrive · a year ago
Love it! I use a similar Powershell script for testing cabling/changes. Laptop left on in middle of office with speakers turned up. So handy.
BtM909 · a year ago
Also reminds me of that old website where people could send text messages to (before Twitter existed).

There was this story of a person who could ping a machine and he knew it was in his house, but for the love of God couldn't find the machine. It's a very short story, but he ends up looking at the pings not knowing where this machine is runnning.

Anon_troll · a year ago
This sounds like https://bash-org-archive.com/?5273 (original website no longer exists).

Deleted Comment

apples_oranges · a year ago
Mac version, courtesy of chatGPT: stdbuf -oL ping news.ycombinator.com | grep --line-buffered -o "[0-9]* bytes" | xargs -I {} say "Ping {}"
n42 · a year ago

  ping -a

salzig · a year ago
to keep it simple: `ping news.ycombinator.com | xargs -I% say ping`
drybjed · a year ago
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.

benjaminoakes · a year ago
Related: Juice is the non-essential visual, audio and haptic effects that enhance the player's experience.

https://garden.bradwoods.io/notes/design/juice

a_crowbar · a year ago
Recently I added sounds to a website that fall into this non-essential but experience enhancing (imo) category. I've had somewhat mixed response to this, from total annoyance to utter delight. I'm really not sure what the best approach is to take with sound on the web.

edit: Sounds are present when opening the console, or dragging a canvas around

https://stripe.dev/

chrisweekly · a year ago
Thank you for this fantastic link! Seriously. Bookmarked and planning to share. :)
colechristensen · a year ago
The old SGI IRIX workstations had sound effects. (the OS is featured in the original Jurassic Park film with the very silly 3D file manager)

It was literally like the hacker movies and predated most of them. Keystrokes, button presses, everything made a little noise. My first boss talked about the horror of the university computer lab full of them before they turned all the sounds off (as well as the absurd cost of outfitting that lab).

drybjed · a year ago
With a daemon approach and clever integration within applications that handle missing fifo correctly, all you need to do to get rid of the sounds is just stop the service. And it's also configurable, so you can set what actions actually do produce sounds.
joombaga · a year ago
Sounds cool. I'm definitely interested.

Were you procrastinating when you wrote this?

drybjed · a year ago
The project is up on GitHub, here's Show HN: https://news.ycombinator.com/item?id=41577391
drybjed · a year ago
Maybe. :-)
breakpointalpha · a year ago
Yes I’m very interested. I had exactly the same idea, but solved it using the “say” command and a random grab from a set of strings.

I’m a Python dev and I’m happy to contribute to a project is you get it started.

drybjed · a year ago
I'll set it up on GitHub in 1-2 days and publish it on Hacker News.
sususu · a year ago
I'd love to try this out, do you have a name for the project so I know how to search in a later date?
drybjed · a year ago
The project is up on GitHub, here's Show HN: https://news.ycombinator.com/item?id=41577391
yowayb · a year ago
I think I could use a sound when I switch modes in Helix. Thank you for looking into this!
mtoohig · a year ago
I am interested to give this a try if you share.
selfhoster11 · a year ago
I’d love to get this for my own machines.
picometer · a year ago
Count me in as interested!
joestrong · a year ago
Definitely interested
jtwaleson · a year ago
I would be very interested, potentially for future commercial purposes.
mattlondon · a year ago
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

tylerc230 · a year ago
Xcode has this functionality. You can attach a system sound to a breakpoint. I used it exactly once when I was trying to determine if two events always happened in the same order and were always equally spaced in time. It worked well but drives you sort of mad after a while.
klausa · a year ago
One interesting way of using this I've heard of; is attaching it to a `-[UIViewController dealloc]`, and being able to "hear" (or rather notice the lack of sound) retain cycles this way.
mrbombastic · a year ago
Xcode has all sorts of cool stuff you can do with breakpoints, one I used more often than sound is logging a value on a breakpoint and continuing execution.
shtack · a year ago
This was my undergraduate "thesis" project. We built a GDB plugin that would generate a puredata audio structure to help with debugging. Eg. it would play snoring during a sleep() call, each breakpoint could be set to a different frequency, etc. It was actually pretty interesting for multi-threaded code, though pausing to play the audio could change the runtime profile.
puzzledobserver · a year ago
I recall seeing the following very neat idea on HackerNews some time ago, but can no longer find it:

The idea, if I remember correctly, was to intercept system calls and play a sound every time one occurred. So you'd get a series of beeps every time the disk was accessed, somewhat similar to the spinning noise from HDDs. It would play a different type of noise every time the network was accessed, memory was allocated or freed, and so on.

They reported that developers got pretty good at diagnosing and debugging their programs, purely from listening to it run.

dennis-tra · a year ago
I had the exact same thought for years but never came around experimenting with it. I also hoped that one could eventually hear that something is off.

I think this can happen by either recognising the "rhythm" in which sounds appear and/or recognising different tones.

As a first step, my idea was to write a logger that plays different beep sounds for different log levels. That way you could mostly identify the “rhythm” because I guess most log messages would have the same severity. However, to a tiny degree also by the pitch of the sound.

Then as a second step I thought of mapping the log message to a scale of sounds by e.g., hashing the message. This obviously would only work if there’s no dynamic content in the message.

knodi123 · a year ago
I definitely chain things like "make; say all done", then crank the volume and go make a snack. But that's probably not what you were referring to.
pilliq · a year ago
A bit late to the party, but I had a similar idea a while back and built a prototype of this here: http://pilliq.com/companion

It's a "runtime" that executes arbitrary JS code while continuously playing a single tone. Every loop iteration increases the tone's frequency, and every recursive function call increases the tone's pitch (when the function returns, the tone's pitch is decreased).

  * There are visual markers to show what is currently being executed
  * You can increase or decrease the speed of playback
  * You write your own code and execute it in the browser.
I included two examples of fibonacci: one that's iterative and one recursive. I think the audio/visual feedback helps you "feel" the difference of why the iterative implementation is faster than the recursive one.

It's a bit of a hack, and you may need to refresh the page after it finishes running through the code once.

netsharc · a year ago
Makes me think of movie/TV computers that beep and bop, e.g. https://www.youtube.com/watch?v=hsP-kWvl1ds

An out of place beep would probably be noticable.

worldsayshi · a year ago
It could be useful but it would probably be very annoying and disharmonious unless it's very well designed. Would be cool and potentially very useful if somebody incorporated it in a good way.
cmpalmer52 · a year ago
The Grep Console plugin for JetBrains IDEs lets you do this.
hiAndrewQuinn · a year ago
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

hi-v-rocknroll · a year ago
Forking each sox command to the background causes samples to play non-deterministically and step over each other. Here's a better way:

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

    case "$layout" in
    Finnish)
      kitty +kitten themes --reload-in=all Apprentice &
      play "|sox -np synth 0.2 sine $A" \
           "|sox -np synth 0.2 sine $C_SHARP" \
           "|sox -np synth 0.2 sine $E" \
           "|sox -np synth 0.2 sine $G_SHARP" \
           vol -30dB 2>&- &
      ;;
    'English (US)')
      kitty +kitten themes --reload-in=all Default &
      play "|sox -np synth 0.2 sine $G_SHARP" \
           "|sox -np synth 0.2 sine $E" \
           "|sox -np synth 0.2 sine $C_SHARP" \
           "|sox -np synth 0.2 sine $A" \
           vol -30dB 2>&- &
      ;;
    *) echo >&2 'Invalid $layout - must be "Finnish" or "English (US)"'; exit 1
    esac

memco · a year ago
Relatedly, I once saw someone realize that the sound they played at the end of their build was running synchronously so they were blocking themselves from a faster feedback loop and reporting unusually long builds in their profiling. Properly backgrounding the sound fixed their issues.
hiAndrewQuinn · a year ago
Stepping over each other was the point! :) But very good to know if I ever want to encode a little melody instead!
Rygian · a year ago
I used the same approach when programming my fridge. If the compressor was required because the temperature in the topmost shelf was too high, the tones would play in rising order. If it was due to the bottom shelf, then the tones would play in descending order.

I ended up disabling the feature because it was always the bottom shelf.

slig · a year ago
Is your fridge on GH? Mine is outdated and I'd like to download a newer one.
ghostpepper · a year ago
When I read that Finnish was a major seventh I was hoping that English would be a minor seventh or something even more subtly different. A minor 7th vs a minor 7 flat 5 etc.

Would be funny to create an elaborate system of notification tones that are only discernible by a trained musician

left-struck · a year ago
> Would be funny to create an elaborate system of notification tones that are only discernible by a trained musician

Oh man, could this concept be turned into an esoteric programming language where to program you use a musical keyboard and all the symbols in your lang are different chords or intervals

Absolutely no visual feedback for extra pain

hiAndrewQuinn · a year ago
Forgive me Mr. Ghost Pepper. I didn't take the ear training seriously enough in AP Music Theory, and now I can scarcely tell my eleventh chords apart when I'm listening to Charles Mingus!
privong · a year ago
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.

privong · a year ago
Correction: there are up to 12 of the 7 meter diameter antennas.
donatj · a year ago
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.

wildzzz · a year ago
I worked at a help desk one summer and every inbox had a different sound effect. We had several different external customers each with a dedicated machine to handle their tickets. The most critical customers (i.e. the biggest fines) got the loudest, most annoying sounds. Everything was an animal sound so the place literally sounded like a zoo on busy days. The manager absolutely hated bringing various big shot tours through our call center because of the ridiculous noise but we also had a perfect record.
boredtofears · a year ago
One of my first experiences with our home PC's was downloading wav files of movie and TV clips off of AngelFire and GeoCities sites and assigning different windows tasks to play them to prank my dad. Error dialog popup? Beavis and Butthead's "Breaking the law, breaking the law". Out of disk space? Johnny Mnemonic "I can carry nearly eighty gigs of data in my head". He thought it was hilarious and would reassign them to his own clips that he found and we continuously tried one-upping each other to find the most annoying possible sound for every windows function.
jurassicfoxy · a year ago
I worked for a woman who had the Microsoft helper (like Clippy) but chose the cat avatar, and it would meow ALL day. It was funny for about 2 hours and unbearable beyond that!
mtrovo · a year ago
Well, that's one way to get rid of open floor layouts.
jasonjayr · a year ago
In my collection of CDROMs, I had one titled "Wired For Sound Pro" -- it was some custom software that could add sound effects to a ton of Windows events, as well as a huge library of sound files to attach to those events. I think products like this were to showcase "Multimedia PCs" that were starting to make it big in the mid 90s...
wormlord · a year ago
This could be kind of fun if done in moderation. Maybe a git hook that lets the creator of the PR select a song to play over the speakers when the merge request goes through. Some people might get pissed off, but I think it would be nice to have a bit more whimsy in software dev. As long as everyone is on the same page, should be fine.
whatnotests2 · a year ago
Yes, this.

Imagine an elevator, gas pump, vending machine, or laundromat emitting sound effects constantly.

Quite the dystopian hellscape.

pavel_lishin · a year ago
> gas pump

Most of them play advertisements while you fuel up. I hate it. The only thing that I like about New Jersey forbidding me from touching a gas pump is that I'm not subjected to ads for diarrhea medication or low-APR loans every time I fuel up.

klausa · a year ago
>Imagine an elevator, gas pump, vending machine, or laundromat emitting sound effects constantly.

This a non-that-inaccurate depiction of how life in Japan is, but thankfully one adapts quite quickly to that.

washadjeffmad · a year ago
Just wait until they integrate the devices with AGI + TTS and either tie it to your ad history or one-click purchasing.

AI Fridge: "We noticed you're almost out of cheese. Would you like to make your dairy extraordinary today with Tillamook Sharp Cheddar? Say OK to order now!"

Enfleshened One: "No. Please self destruct."

AI Fridge: "...Take that back, or I'll wilt all your lettuce."

pawelduda · a year ago
https://github.com/kristiandupont/react-geiger

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

cal85 · a year ago
This one does the same thing but with beeps, with higher pitch for heavier DOM updates. It’s not as nice as the geiger click but I’ve found it more useful for figuring out exactly where the UI is slow.

https://github.com/tomhicks/react-audible-debug

rgbrgb · a year ago
Cool! Found this little video of it in action https://www.youtube.com/watch?v=bM_DrpCK5i0
xandrius · a year ago
I'd love one for React-native, might look into making one if I don't find any :D
pawelduda · a year ago
I think in case of React the core idea is simple. For example I would love something like this for Rails ActiveRecord to help you find n+1's by sound
jascha_eng · a year ago
This is so cool haha
croo · a year ago
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 :)
sumtechguy · a year ago
One place I worked at the success was a golf clap. The fail was crowd going 'awwww' as if someone had just missed a putt. Nice and simple. Since the build took 3-4 hours you did not hear it much.

Before everyone went 'open office' it was semi fun to have sounds on different build actions. Now not so much :(

vundercind · a year ago
There’s… a particular sound pack that had those two sounds. Maybe different ones, sure, but this just unlocked a memory of two very particular sounds from my early Windows days. Might have been built-in, or maybe from Microsoft Plus.
rich_sasha · a year ago
I sat next to someone who had a similar set up, except a robot voice also read out a summary of the failures.

I moved desk within a few hrs.