The positions of sounds

Glass smash with liquidGNOME bug 616743 includes a patch which, if you have stereo speakers, will make the system bell move horizontally depending on which window it happened in. For example, if you’re editing a file in a terminal on the left of the screen, and the terminal bleeps, the sound will come from the left. If your mutt terminal is on the right of the screen, you will hear a bleep on the right when you receive new mail.

Sounds other than the system bell won’t be affected by this change. For example, music played by a music player will not be affected by the position of the window.

(The patch also appears to set the vertical position of the system bell according to the y-coordinate of the window.  Your chronicler is having difficulty imagining the sound system where this would be distinguishable, but perhaps is not experienced enough in these matters.)

We are rarely minded to accept enhancement patches, since every new line of code is a line of code we have to maintain for ever.  However, this one isn’t complicated, and appears to have a positively useful result.

What are your thoughts on the matter, gentle reader?

Photo © whisperwolf, cc-by-nc.

Published by

Thomas Thurman

Mostly themes, triaging, and patch review.

11 thoughts on “The positions of sounds”

  1. Sounds like a useful feature, particularly for those using multi-head setups.

  2. I remember Mac OS 9 used to do this with all its system sounds – window dragging, button pressing, menu furling and unfurling. Mac OS had so many such sounds that it got overwhelming and I turned it off pretty quick, but that was just the quantity of sounds — I rather liked the polish of having stereo-correct noises.

    I say, commit it!

  3. Is this 100% of the sound to a single side or higher on one side and lower on the other? I think the latter would make a better effect but maybe it’s harder to code and process at runtime. Anyway I hope there’s an option to turn it of in case it doesn’t work very well (I’m still very intrigued by the feature though).

  4. @Dextro
    Just setting the loudness according to the distance from the center ought to be good enough. It’s not like you’ll detect where the person in question is in relation to the screen(s) anyway.

  5. The nice thing, in terms of feature overhead, is that PulseAudio or libCanberra (I don’t actually know which) deal with the tricky part; we just state where the sound comes from (in the same place we already add hints for the bell sound) and the rest happens somewhere else!

    GTK’s widget sound effects and Empathy’s notifications also use libCanberra’s sound_for_widget function for positional sounds, to the same effect.

    @Dextro: This does proper positional sounds; gradually higher and lower on each side based on the position of the sound.

    @Të: Indeed, it can’t be quite as clever as you describe (though I wouldn’t put it past Lennart :b) but we can trust the speakers to be on either side of the screen, so the sound seems to be pretty well connected to its source on the display. Works best with big screens, for sure.

    I’ve been eating my own dogfood on this for a while and I’ve been pretty happy with it. It wouldn’t be hard to push the widget position hints into a conditional controlled by a gconf key, but I would much rather see that option in PulseAudio itself; Metacity is just passing along some data it has handy. It really has no knowledge, itself, that that data has anything to do with positional sounds :)

  6. Sounds like the kind of feature you didn’t know you would like to have. I suggest you to apply the patch and ask users to provide feedback during the beta phase, and then revert if it’s annoying. No options, please, except maybe for a gsetting for distributions.

  7. Good use of sound is a much-overlooked accessibility feature, and this sounds like it would be a useful addition. (For much more on this topic, google for ‘earcons’.)

Leave a Reply

Your email address will not be published. Required fields are marked *

Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported.