The Audio Programming Book, any good?
Moderators: MattKingUSA, khz
The Audio Programming Book, any good?
Hi all, I'm wanting to know if anyone owns this book and if it is very good for learning to code audio plugins? I know very little about programming having only played around with C/C++ and editing lv2 plugin source code, tweaking default settings to my liking. I would like to know if this is a good book for learning programming with the intent to write audio DSP plugins in lv2 format for GNU/linux. Thanks
-
StudioDave
- Established Member
- Posts: 753
- Joined: Sat Nov 01, 2008 1:12 pm
Re: The Audio Programming Book, any good?
A brief review here:
http://www.linuxjournal.com/content/lin ... -christmas
But you might want to start with something a little lighter.
Best,
dp
http://www.linuxjournal.com/content/lin ... -christmas
But you might want to start with something a little lighter.
Best,
dp
Re: The Audio Programming Book, any good?
I own the book, I am not too happy with it to be honest and I ended up using more formal material on DSP, but I think it's well written and full of valuable information, it just didn't suit my particular needs.
The book starts with a very, very basic introduction to C (what's an 'if', what's a 'for' level), so it's quite tedious if you've any programming experience, but it might be useful if you're only starting. In total there's ~400 pages of c, c++ and program design material, half of them are general C material, the other half audio specific.
As a reference, the K&R book, the "bible" of C, is less than 300 pages long. So there might be enough information in the Audio Programming Book for someone starting with programming.
As for the more sophisticated audio stuff, you'll find a good introduction to signals, explanations of how an oscillator works and how to implement it, convolution, dft, etc.. That's another 400 pages or so, including appendices.
Taking all this into account, I think the book is as good as you're going to find if you want to learn both general programming and audio programming from one book; it's written and structured towards that goal. But I agree with StudioDave, it's going to be challenging.
There's alternatives though. There's audio specific languages like faust, which let you focus a lot more on the audio and less on the mundane details of the language, and there's SuperCollider and Chuck which are completely audio/music oriented but will still expose you to basic (and some not so basic) programming techniques.
The book starts with a very, very basic introduction to C (what's an 'if', what's a 'for' level), so it's quite tedious if you've any programming experience, but it might be useful if you're only starting. In total there's ~400 pages of c, c++ and program design material, half of them are general C material, the other half audio specific.
As a reference, the K&R book, the "bible" of C, is less than 300 pages long. So there might be enough information in the Audio Programming Book for someone starting with programming.
As for the more sophisticated audio stuff, you'll find a good introduction to signals, explanations of how an oscillator works and how to implement it, convolution, dft, etc.. That's another 400 pages or so, including appendices.
Taking all this into account, I think the book is as good as you're going to find if you want to learn both general programming and audio programming from one book; it's written and structured towards that goal. But I agree with StudioDave, it's going to be challenging.
There's alternatives though. There's audio specific languages like faust, which let you focus a lot more on the audio and less on the mundane details of the language, and there's SuperCollider and Chuck which are completely audio/music oriented but will still expose you to basic (and some not so basic) programming techniques.
Re: The Audio Programming Book, any good?
I have thought of the audio oriented languages mentioned but would like to learn C/C++ so that i can apply it to other areas of programming as well. Also, the plugins i use are all written in C/C++ so i would be able to learn and take ideas from those. It sounds like The Audio Programming book would be good for me with a lot of basic programming stuff in it. Thanks!
-
jeffh
- Established Member
- Posts: 217
- Joined: Wed Jan 18, 2012 1:27 pm
- Location: East Coast, USA
- Contact:
Re: The Audio Programming Book, any good?
I first learned DSP program from
Musical Applications of Microprocessors
by Hal Chamberlain
It's an ancient book from the 1980s with antiquated code examples, but since all audio DSP theory is based on Calculus and Trigonometry discovered circa 1850, it's still completely relevant today.
Musical Applications of Microprocessors
by Hal Chamberlain
It's an ancient book from the 1980s with antiquated code examples, but since all audio DSP theory is based on Calculus and Trigonometry discovered circa 1850, it's still completely relevant today.
Re: The Audio Programming Book, any good?
Hi jeffh, thanks for the info.
I am still just looking at plugin source code and C/C++ language tutorials at this stage. I really need advice on which language to start with, the website "writing LV2 plugins for the complete idiot" uses C++. While the text books i have read about seem to prefer the original C language for audio DSP programming. Ardour i think is mostly written in C++ and so are the Calf plugins ( i think), while other software such as swh_plugins are written in C. Would you reccomend either language over the other for someone who is attempting to learn with the goal of writing a LV2 plugin with a gui? can such advice be given? My dream would be to create my own parametric EQs and compressors, I would like to learn only one language (if possible) as I have a specific goal. Are there any non-subjective reasons for programmers prefering one language over the other? Such as lv2-c++-tools or particular libraries etc?
I am still just looking at plugin source code and C/C++ language tutorials at this stage. I really need advice on which language to start with, the website "writing LV2 plugins for the complete idiot" uses C++. While the text books i have read about seem to prefer the original C language for audio DSP programming. Ardour i think is mostly written in C++ and so are the Calf plugins ( i think), while other software such as swh_plugins are written in C. Would you reccomend either language over the other for someone who is attempting to learn with the goal of writing a LV2 plugin with a gui? can such advice be given? My dream would be to create my own parametric EQs and compressors, I would like to learn only one language (if possible) as I have a specific goal. Are there any non-subjective reasons for programmers prefering one language over the other? Such as lv2-c++-tools or particular libraries etc?
- eikakot
- Established Member
- Posts: 104
- Joined: Fri Jan 29, 2010 2:24 pm
- Location: Vilnius, Lithuania
- Has thanked: 9 times
- Been thanked: 3 times
- Contact:
Re: The Audio Programming Book, any good?
Well, I prefer C++, but I would't recommend to depend on lv2-c++-tools.
John G. Proakis, Dimitris G. Manolakis - Digital Signal Processing--Principles,.Algorithms.&.Applications
Digital Signal Processing Using Matlab - Ingle & Proakis 1997
John G. Proakis, Dimitris G. Manolakis - Digital Signal Processing--Principles,.Algorithms.&.Applications
Digital Signal Processing Using Matlab - Ingle & Proakis 1997
-
jeffh
- Established Member
- Posts: 217
- Joined: Wed Jan 18, 2012 1:27 pm
- Location: East Coast, USA
- Contact:
Re: The Audio Programming Book, any good?
warkus wrote:Hi jeffh, thanks for the info.
I am still just looking at plugin source code and C/C++ language tutorials at this stage. I really need advice on which language to start with, the website "writing LV2 plugins for the complete idiot" uses C++. While the text books i have read about seem to prefer the original C language for audio DSP programming. Ardour i think is mostly written in C++ and so are the Calf plugins ( i think), while other software such as swh_plugins are written in C. Would you reccomend either language over the other for someone who is attempting to learn with the goal of writing a LV2 plugin with a gui? can such advice be given? My dream would be to create my own parametric EQs and compressors, I would like to learn only one language (if possible) as I have a specific goal. Are there any non-subjective reasons for programmers prefering one language over the other? Such as lv2-c++-tools or particular libraries etc?
Disclaimer: I am completely, and totally biased. None of the following should be considered objective or unbiased, because I founded, own and developed the entire project myself.
There's this great new project called LibModSynth that aims to simplify plugin development. The Sourceforge page is here:
http://sourceforge.net/projects/libmodsynth/
It's a C library of high performance audio DSP algorithms and GUI templates written in C++ and Qt. The 6 DSSI plugins currently released by the project (1 synth and 5 effects) are designed to be easy to understand, and easy to fork.
[end marketing mode]
Personally, I think C is just a flat-out better tool than C++ for high performance DSP. Raw C gives very predictable performance, and frankly, object-oriented-ness just isn't needed 99% of the time, and gives inferior performance. Here are some performance examples of my plugins using raw C, using only my own libraries for math:
(on my AMD-FX8120 @ 3.1ghz)
Ray-V: 8 simultaneous notes, 7 unison saws = 56 saws, 4x oversampled filter per voice = 8 filters: ~24% of one CPU core
LMS EQ5: 5 x EQs, each 4x oversampled : ~2% of one CPU core
I think that's pretty stellar relative to anything else out there. Unless somebody proves me wrong, it would be hard to make C++ that fast unless you were to not use any of the advanced features that make it C++ instead of C. Although, you will probably find more code examples on the internet in C++.
Try downloading LibModSynth with this command:
Code: Select all
git clone git://git.code.sf.net/p/libmodsynth/git libmodsynth-git