Re: [LAD] Any introductory material for sound programming?

From: Joern Nettingsmeier <nettings@email-addr-hidden-hochschule.de>
Date: Fri Oct 17 2008 - 19:01:09 EEST

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
(http://spunk.dnsalias.org/public_stuff/linux_audio/audio_engineering_in_a_nutshell/slides.xml),
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/
http://spunk.dnsalias.org
phone://+49/201/491621
Kurt is up in Heaven now.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Fri Oct 17 20:15:08 2008

This archive was generated by hypermail 2.1.8 : Fri Oct 17 2008 - 20:15:09 EEST