Realtime Audio Normalisation
Haiku could benefit from implementing an automatic real time audio normalization system (i.e. An automatic volume adjustment system) at the mixer level on a per channel basis. It could utilise adjustable normalization schemes based upon given scenarios or channel purposes.
Details
Real time audio normalization could be implemented at the system mixer level in Haiku. This system would be designed to boost or soften sounds produced throughout the system to suit listener tastes or given conditions. E.g. Large quantities of digital media have extremely low sound levels throughout. But it is also impractical to continually adjust the volume of the player application. With this system in place, the digital media's volume could be scaled to an acceptable volume, while not affecting other audio playback applications in the system or requiring user intervention when switching to digital media with appropriate audio levels.
An easily accessible volume range setting, incorporating a maximum volume and a preferred volume would be ideal. The maximum volume setting should be exactly that. No sound should ever break that level, primarily for comfort reason, but also for added safety. (A DrDobbs column relates the story of one user with headphones playing soft music. They received an extremely high volume sound clip and was left almost deaf). The system should adjust the volume as closely to the preferred volume level as possible at all times, without ever breaking the maximum volume.
While this system will allow quite reasonable performance, the addition of normalization schemes would allow for greater control over sound levels. These schemes would encapsulate settings such as delay times, how quickly the volumes scale and how greatly the volumes scale. These schemes could then be saved and applied to different situations. For example there could be one for watching video which does not alter sounds such as a gun crack in a suspenseful scene, another for listening to music and another for TV designed to soften loud commercials. Schemes would be applied on a per channel basis, possibly using a "default scheme" unless otherwise specified. The direct manipulation of schemes should not be necessary for the system's use, it should be provided as a means for advanced users to fine tune rather than as a general tool.
The possibility of saving much of this information into attributes looks promising. It could be quite effective to store, for example, normalization schemes as attributes in each file of a users music collection, providing a customized normalization for each. This could of course be achieved similarly for all media and extended also into audio applications, saving the last normalization settings as attributes of the binary.
When considering system alerts and other such sounds, it could be possible to make use of a dynamic normalization scheme which could utilise information such as the current average volume. This way sounds from sources such as system alerts do not provide a great disruption to the user.
One way to implement such a system, would be to make use of VST plugins at the mixer level. Using a preset number of plugins per channel as well as for mixer outputs it would be quite easy to develop a normalization system with support from additional kits from Haiku.

Comments
Sorry, but at all this
Sorry, but at all this doesn't seem to be possible ...
Normalisation means that you adjust the level of the whole
signal with the amount you needed for the loudest part to reach
the wanted volume (like -1.5 dB) ... and that's impossible because
of the "streamed nature of the soundsource"
the other possibility is to limit the signal, but that would
end up in crackeling sound ... (you know ... the digital
clipping-thingy)
the last possibility is compression and that one would alter
the sound in a negative way ... (pumping music ... altered attacks and
so on) ...
it's a nice idea but imho impossible :(
greetings ...
PS: excuse my dumb childish kind of articulation, but at all I'm a dumb
german guy ... SAUERKRAUTBREZELHI*LER
It's a good idea, and
It's a good idea, and perfectly doable given the flexibility of the Haiku media system.
Dynamics processing (compressing, limiting, expanding) is widely used in radio broadcasting and audio mastering in general. At first sight, i don't see why it would be a bad idea.
Re: It's a good idea, and
I think a long-attack and long-release compressor, followed by a limiter would do the thing good.
It would be also great if the algorithm could be applied also for recording.
If one would require high quality sound, obviously everything could be turned off. But such a feature is nice for watching poorly recorded movies, or for VoIP.
Re: Realtime Audio Normalisation
This would be a great feature for laptop users. When you don't have external amplifier + volume control, it gets painfully obvious how often normalization is not done. Some audio and video files are just too silent, and this gets interpreted as hardware problem.