[LAD] starting out with tux audio

Fons Adriaensen fons at kokkinizita.net
Fri Jun 13 08:56:10 UTC 2008


On Fri, Jun 13, 2008 at 01:34:01PM +0530, AlgoMantra wrote:

> I'm a newbie to audio in linux. I can code in C, and I know that
> if you $cat /dev/dsp you can see your microphone feeding weird
> shit into this sound device.

/dev/dsp and /dev/audio are OSS devices and almost never used
in Linux Audio. They exist mainly for compatibility with old
software. 

> I've also read that this device is encoded as 8-bit unsigned,

This will almost never be true. 15 years ago yes, but not today.

1. If you want to experiment with audio software you'd use
either ALSA devices or JACK.

ALSA replaces the old /dev/dsp and /dev/audio devices, but
with a completely different interface. Using ALSA devices
directly can be hard for a beginner since you need to take
care of everything.

JACK works on top of ALSA (in most cases) and hides a lot
of the gory details. All audio signals become floating point
no matter what your hardware uses. JACK can also connect 
audio programs to each other and not only to the sound
card.

If you want to experiment with writing audio code:

1. Find out about JACK. Google 'Jack Audio Connection Kit'.

2. Learn what it does and how.

3. Examine the example code that comes with it.

4. Start coding your own. It's easier to use
   than any other interface.

If you just want to experiment with sine waves and
additive synthesis you don't have to write andy code.
There are many programs that allow you to do this
sort of thing directly: CSound, SuperCollider, PureData,
..., and also a number of software synthesisers like
e.g. AMS.

Ciao,

-- 
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

Lascia la spina, cogli la rosa.




More information about the Linux-audio-dev mailing list