OddThinking

A blog for odd things and odd thoughts.

Sound Levels Hierarchy – A Half Baked Idea

At its heart it’s a simple concept. Every type of sound that your computer makes is mapped onto a tree; an inheritance hierarchy, which carries enough information to the computer to explain how the sound is to be played.

Each program looks up the sound in the hierarchy. For example:

  • Soundtrack.Background.iTunes.SleepTimePlayList
  • Soundtrack.Movie.RealMedia
  • Alert.Summoning.SoftPhone.IncomingCall.ExternalCall
  • Alert.Reminder.Office.TaskReminder
  • Effect.StartUp.WindowsXP.LogIn
  • Effect.Game.Reward.Small.Pacman.GhostSwallow 

The attributes of each node mainly represent the volume (absolute, or relative to the parent), but that’s not all. It also represents which sound-card and speakers should be used, the balance, the equalizer settings, etc.

If an entry isn’t present, it just inherits from the parent entry. Each one entry can be tweaked individually, or in a group, to an optimal level for your environment.

Perhaps an overlay is required to allow all PacMan sounds to be muted in one operation, or perhaps profiles to allow you to mute all Soundtracks while on a call.

Perhaps then, I won’t need to spend all my time adjusting the volume as I swap between programs, or annoying the next-door neighbours when the Windows startup sound blasts out of my rebooting home PC shortly after listening to a poor-quality podcast.

Perhaps then I could have my office PC summon me through the speakers to attend an important meeting, but push iTunes only through the headphones, so my neighbours don’t need to listen to my taste in music.


Comments

  1. As far as I can tell, this structure would need to be a graph, if you want all sounds from pacman to be controlled from one option. This would mean links like Effect.Game.Reward.Small.Pacman.GhostSwallow and App.Game.Pacman.Effect.Reward.Small.GhostSwallow would link to the same effect. You could disable all effects for all games (but not music) by setting Effect.Game to mute, while you could disable all sound (effects and music) from Pacman by setting App.Game.Pacman to mute.

    Allowing different sounds out of different audio-out connectors will require a lot of cooperation of the sound cards (and drivers) too. I know on my pc, plugging a speaker into the front sound port disables sound out of the rear. Similarly, some speakers disable their own sound when a headset is plugged into them. Without a (lets face it, greatly complex) sound system like the one described built in to the OS, hardware support for it is unlikely to arrive.

    Still, I want one! Just don’t make me listen to your outlook and PDA chiming away while you’re not at your desk 🙂

  2. Interesting idea, but it does need more time in the furnace. I’ve got two sound cards, and although I only use one of them, some people might be able to use them to control different sets of speakers, or speakers & headphones.

    Richard: The problem with a Graph as opposed to a Tree (I think) is that each node then needs to be unique. For example, if I had a pacman theme for winamp, I couldn’t go App.Winamp.Pacman.Effect, I think.

    The one problem I see with this method is how to control the (now large number) of volumes. Say you want to increase the volume of everything, or you’re playing pacman and want to increase the sound of everything in that game, but the game has various leaf-nodes with separate volumes. I see only 3 ways to have a single volume control everything in the game:

    1) Adjusting the parent automatically adjusts the children to the new level (effectively deleting the children from the tree). If you want children to have different volumes again you have to set them again. It’s destructive but is more predictable (if you’ve muted a child, for example, it becomes unmuted, and stops you from wondering where in the hierarchy some sound has been muted).

    2) Adjusting the parent leaves the child volumes alone (as a float between 0 & 1), but to arrive at the volume for a particular sound you multiply through by the parents.

    3) Adjusting the parent leaves the child volumes alone, and the child volumes are relative, so you can have values > 1 (“this value is twice as loud as the parent”).

    I think 3 effectively covers 2, and you can mix the behaviours of 1 & 3 (have a little “delete children” checkbox on any volume knob). It’s confusing, but I don’t really mind the idea. Obviously, sane policies need to be chosen for each attribute (what to do with the balance?).

    I think alsa and arts can almost do this.

  3. Far too complicated. Simply allow associating audio settings with particular applications.

  4. Richard,

    I’d have to use some brain-power to consider the graph-versus-tree issue. Isn’t it sufficient to just brush it away with the word “overlay”? What if I said I would use XML to fix it? 🙂

    Allowing different sounds out of different audio-out connectors will require a lot of cooperation of the sound cards (and drivers) too.

    I have two or three old, unused sound-cards sitting in a box. They are worth almost nothing. I could have one soundcard for my headphones and another for my speakers. I’d do it now, but very few programs will give you control over which sound cards they use.

    My point is you don’t need one piece of multi-channel hardware (although that could come later). You could do it with multiple pieces of cheap hardware.

    (I have used multi-sound card PCs before, a handful of years ago. They often didn’t work, unless the drivers behave themselves, like they were supposed to!)

  5. Aristotle,

    Per-Application volume control would be a great start.

    This reminds me of using an old Speech Synthesizer (SAM). If you typed in some text using the correct mark-up syntax it would reward you by saying it aloud. If you used the wrong syntax, it would emit a horrid noise; it sounded like you had got a question wrong in a bad TV quiz show. The noise was truly horrid,.

    The trouble was that you needed the volume up high to hear the speech…

    I have similar objections to many media-players; the error noises should not be as loud as the soundtrack volume.

    So, while I agree that per-application volume control would be simpler, I would like to have more control too.

    (My next request is that browsers not be permitted to blare noise out just because some lame web-designer thinks their home page would be better with some background music… while retaining the ability for good web-designers to reinforce messages with appropriate audio feedback. This may be trickier to implement!)

  6. The “Sounds and Audio Devices Properties” control panel (catchy name!) already allows applications to register their different noises in the list, so that users can select different sounds for each. (Going into this panel is a “day-one” task after a Windows XP reinstall to turn off the bloody annoying windows logon sound). I guess this could be extended to allow setting the volume as well.

    However, before they add more volume control sliders to Windows, I’d suggest removing a few first. Clicking around the SaADP control panel I count no fewer than eight different volume controls. Nine if you count the physical volume knob on the speakers themselves. They can’t all be necessary, surely?

  7. I think you just reinvented the semantic web on your sound card.

    That said, there’s plenty of directions to go from here. Categorised sounds could also be used by IM applications in much the same way as fonts are used today. Also, you should be able to rate every sound with 1-5 stars. And the computer should be able to hear using its microphone and use fuzzy logic to adjust the volume dependent on the environment, the application and previous use patterns. The computer’s inbuilt camera (many laptops now ship with them) could be used to monitor the analog volume control. It could also be used to guess the user profile (e.g looks like hippie, then switch to “Soothing Sounds” theme, but looks like a punk rocker then crank the volume and sound like fifty tons of railway sleepers being dropped each time the user clicks the mouse etc etc) The camera could also watch out for people in the background waving their arms and appearing to shout, “Turn that bloody thing down”. Plus the microphone should also detect boss-footsteps and auto-switch to MS Outlook.

    If you delete this comment quickly, you could probably get a patent on some of those ideas. 🙂

  8. Well, I do not think hierarchical volume levels would be easy-to-understand for average users. I was evaluating such possibility when implementing my program, IndieVolume, that does per-application volume control in Windows XP. I prefer multi-select volume changes, so user can select several applications (ICQ-MSN-Yahoo IMs) and change volume at batch for them.

    Please review IndieVolume at http://www.indievolume.com. Try the convenience of per-application volume, playback device control, along with the possibility to apply different DirectX effects to different applications in Windows XP/2000/NT/Me. Even Windows Vista will not have all of possibilities IndieVolume has now.

Leave a comment

You must be logged in to post a comment.