[LAD] Tutorial for programming with JACK

Joan Quintana joan_quintana at yahoo.com
Fri Feb 24 10:12:16 UTC 2012


Related with this topic, I would like to contribute with 3 pieces of code made with an educational point of view (though I don't teach audio processing and I don't consider an expert myself). These examples use libsndfile library, that is important if the source or the destination of your audio data is a wav file.

a) jcapture:
*http://wiki.joanillo.org/images/0/07/Jcapture-1.0.0.tar.gz 
reads the data coming from the microphone, and saves a wav file. Shows a textual signal meter in the console. (I know the existance of jack-capture. I didn't look at jack-capture code, sure that has better performance and lots of options, I just wanted the minimal code)

b) jplay-sndfile-simple:
*http://wiki.joanillo.org/images/1/1e/Jplay-sndfile-simple-1.0.0.tar.gz
It's just a playback wav file. In the callback function there are two possibilities: copying blocks of memory; or copying sample by sample, and this permits a little signal processing (in this simple case just divide the signal by 2).
I borrowed code from sndfile-jackplay.c (sndfile-tools-1.03, Erik de Castro Lopo & Jonatan Liljedahl), where is interesting the thread implementation  (playing while reading the file) that I didn't implemented.

c) jplay-sndfile:
*http://wiki.joanillo.org/images/e/e6/Jplay-sndfile-1.0.0.tar.gz
This is more interesting and not simple like the previous. A part of playing back the file, it permits frequency shifting and frequency sweeping in a range between .5 and 2.

Hope this helps to somebody,
Joan Quintana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20120224/d24cba15/attachment.html>


More information about the Linux-audio-dev mailing list