Has Anyone explored the AudioProgrammingBook?

If anyone has studied this book…I’m confused on chapter 0.2.2 which mentions compiling (which is fine). Then suddenly mentions a program command cc mysource.c and explains that it’s meant to out put a.out? Its not clear what the program is or where its come from? I checked to see if it was on the CD ROM that comes with the book but its not there either?

a.out is the default name given to a compiled program if you don’t specify an output name.

yep and cc is the name for the UNIX Compiler Command, if you’re on a linux system you’ll probably be using gcc or the GNU Compiler Collection.

But terminal looks like this and the c program reads:

#include <stdio.h>

int main()
{

return 0;

}
16

is the default name suppose to appear here ?

No. In Unix the convention is typically that if a command succeeds it doesn’t produce any output, unless that’s its purpose or some verbose flag is used.

If you type ls now you should see a file called a.out in the current directory.

2 Likes

You may want to take a look at a basic tutorial on unix, such as:

http://www.ee.surrey.ac.uk/Teaching/Unix/

or

http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line

or many others.

1 Like

Yes, not to discourage you, but I think a going through a few tutorials on C programming will really help you get more out of the audio programming book.

2 Likes

Agree with this.

There are various good, slow paced C tutorials on youtube that would help OP work through this.

Solid foundations make solid projects.

1 Like

The Audio Programming Book is great but if you’re new to programming (or C), it will be hard to follow the text. Like what others have said, focus on understanding how C/unix works. Check out portaudio too once you are comfortable with C! :slight_smile:

It’s worth continuing on with chapters 0 & 1 – they are a great introduction to C aimed at musicians.

I think it’s useful when diving into a new subject to do comparative reading. It’s getting old now but I like to refer to steve oualline’s ‘practical c programming’ book in this way. Another good reference (mentioned often in this forum) is the more recent ‘21st century c’ book by ben klemens.

But the introductory chapters in the audio programming book are very good, and the rest of the book builds directly on them.

Referring to the same subject in a different text or texts when the book feels unclear can really connect the dots even when none of the texts cover the material completely clearly. Comparing helps push aside certain phrasing or jargon or omissions of context that are confusing when getting into something unfamiliar imho…

2 Likes

Unix command line came up. Philosophically interesting topic - for newcomers what it really is is often missed. Here is a one page cheat sheet that includes a bit on shell programming, pipes, etc. that might be useful.

Corrections and suggestions are welcome.

1 Like

Just in case it’s not obvious, you can still type cc, though it will be actually running gcc on Linux or clang on OSX.

1 Like