[LAD] Any introductory material for sound programming?

Joern Nettingsmeier nettings at folkwang-hochschule.de
Fri Oct 17 16:01:09 UTC 2008

Carl-Erik Kopseng wrote:
> Having searched the net for hours, I still cannot find any tutorials or
> intro-material for someone new to sound programming in Linux. Can anyone
> tip me of such a place?
> Things that would be valuable for a newbie:
>  - Introduction to various ways of storing audio; float vs integer
> representation, bit depth issues, etc. 

integer used to be computationally more effective. (although i've heard
people who should know it say it's no longer an issue on modern cpus.
still, if you are targetting embedded systems, be sure to check out
their floating point performance.)

float has the very big advantage that it will always give you optimum
resolution (i.e. use all vailable bits) regardless of your level, and
that you don't have to worry about overflow. only in the last step
before the DAC do you need to clamp it between 0 and 1.0.

when reducing bit depth, be sure to understand about dither. wikipedia
should have something, steve harris explained it in a joint paper we did
some years ago at a LAC
and there is an excellent chapter in bob katz' book on mastering audio.

>  - Introduction to using standard libraries such as libsndfile and
> libsamplerate.

both come with example programs.

>  - How to programatically convert 24 bit sound files to 16 bit files

bit-shift and dither.

> The *only* audio programming introductions I could find was about ALSA
> and OSS.

in the open source world, every app is a howto :-D

> Trying to directly use the APIs is very frustrating when one doesn't
> have a high-level understanding of what goes on ...

the easiest and most rewarding API is probably JACK. check out the
example programs. apart from hiding the gruesome details of audio
hardware, it will make your application part of the most versatile and
creative free infrastructure existing today.

jörn nettingsmeier

home://germany/45128 essen/lortzingstr. 11/

Kurt is up in Heaven now.

More information about the Linux-audio-dev mailing list