The Audio Programming Book

Public Group

active 2 weeks ago

Learn C programming and low-level computer music fundamentals with The Audio Programming Book (edited by Richard Boulanger and Victor Lazzarini.)

Group Admins

  • Avatar Image


  • GW Rodriguez posted on the forum topic Damaged disc in the group AvatarThe Audio Programming Book:   2 weeks ago · View

    I don’t know if thee is but I could upload a zip file with the cd contents if you ant find something. Just let me know. 

  • Daniel started the forum topic Damaged disc in the group AvatarThe Audio Programming Book:   2 weeks, 1 day ago · View

    Bought the book last week but the little pocket which attached the disc to the back cover was incorrectly manufactured, leading the data side of the disc to be covered in glue and scratches… any way I can download the disc contents from somewhere?

  • GW Rodriguez posted on the forum topic Erratum in the group AvatarThe Audio Programming Book:   1 month, 2 weeks ago · View

    Listing 2.5.11 page 279

    Book currently reads:
    if(stream->npoints < 2)

    But it should read:
    if (npoints < 2)

  • GW Rodriguez posted on the forum topic gnuplot – help with installing in the group AvatarThe Audio Programming Book:   2 months, 3 weeks ago · View

    So I found a great post that helped.:
    http://bhou.wordpress.com/2011/09/13/how-to-install-gnuplot-in-mac-os-x-lion/

    He explains how to install gnuplot for osx lion.  Also the second comment has a link to a program called homebrew that makes installing gnuplot a breeze!

  • GW Rodriguez started the forum topic gnuplot – help with installing in the group AvatarThe Audio Programming Book:   4 months ago · View

    I just got to the part in chapter 1 that uses gnuplot.  The DVD comes with a pre packaged gnuplot-4.0.  After installing it I went into the terminal and tried to run it but got an error: “Launch of “gnuplot” failed: the PowerPC architecture is no longer supported.” I was able to track down the [...]

  • AlexAB started the forum topic Chapter 0 – Exercise 0.10.3 minor bug in the group AvatarThe Audio Programming Book:   5 months, 3 weeks ago · View

    Hello, I’m currently learning C at school, so I bought a copy of The Audio Programming Book for personal study. While doing the exercises in chapter 0, I found a small bug in the function-based interval program. When the user enters 2 wrong notes, the program returns a unison instead of reporting the error. While [...]

    • Avatar Image
      Dr. Richard Boulanger · 5 months, 2 weeks ago

      Victor Lazzarini suggested to me that the following would work to fix the problem…

      … just replace the check for wrong notes by this:

       if(nameToPc(note2) == 100 || nameToPc(note1) == 100) 

    • Avatar Image
      AlexAB · 5 months, 2 weeks ago

      Hello, and thanks for your reply.
      In fact, this is more or less what I came up with, I then added another if()…else if() condition to have the program return the exact wrong note in the case where the user would enter one good note and one bad note.
      The code is on my laptop so I don’t have access to it right now but it was something like:

      if(nameToPc(note1) == 100 && nameToPc(note2) == 100)
      printf(”neither %d nor %d are natural notes”, note1, note2);
      else if (nameToPc(note1) == 100)
      printf(”%d is not a natural note”, note1);
      else if (nameToPc(note2) == 100)
      printf(”%d is not a natural note”, note2);

      I just didn’t want to post it right away in case other beginners like me would wish to solve it themselves ..

      Thanks again!

      Alex

  • Martin started the forum topic VC++ Access Denied in the group AvatarThe Audio Programming Book:   8 months ago · View

    Hi all, I’ve been trying to get the DFT (chapter7) example going in Visual Studio C++ (sorry), and I get an Access Denied on the command line. Also dft.exe is not a valid Win32 program. I’ve tried config of both 32 bit & 64 bit to no avail. I’m trying to statically link to libsndfile [...]

  • athos bacchiocchi started the forum topic Can't compile a basic program with portsf on code::blocks in the group AvatarThe Audio Programming Book:   8 months, 2 weeks ago · View

    hi all, i am studying the book, and i tried to build a small program using the psf_sndOpen function from portsf library. I’m using code::blocks on ubuntu, i grabbed the four library files (from the 2nd chapter folder), put them in a folder on my hd and indicated the path in code::blocks, going in Settings->Compiler [...]

  • Earhacker posted on the forum topic Erratum in the group AvatarThe Audio Programming Book:   8 months, 2 weeks ago · View

    In Chapter 1, tables 1.2 and 1.3 (referred to in the text on pages 117 and 107 respectively) seem to be missing altogether.

  • Roberto Garreton posted on the forum topic Erratum in the group AvatarThe Audio Programming Book:   9 months, 1 week ago · View

    got what was the problem.
    Chapter one, on the book and on the file in the DVD, Listing 1.9.4 says on line 36:
      angleincr = twopi*freq/nsamps;
    and should say:
    angleincr = twopi*freq/srate;The same mistake happens on listing 1.9.5

  • Roberto Garreton posted on the forum topic Erratum in the group AvatarThe Audio Programming Book:   9 months, 1 week ago · View

    On the first chapter, the program tfork2 (listing 1.9.4) gives me a different pitch. After checking character by character, I couldn’t find any typo. Then I run the program from the CD and the same. Giving a frequency of 440, sr 44100, 1 channel and amp 1, the resulting frequency is 88hz. The tfork program (listing 1.9.3) gives [...]

    • Avatar Image
      Roberto Garreton · 9 months, 1 week ago

      found the problem: in the book and in the file on the cd, Listing 1.9.4 says on line 36: angleincr = twopi*freq/nsamps;
      should say: angleincr = twopi*freq/srate;

      Same mistake on listing 1.9.5 line 66.

  • Roberto Garreton posted on the forum topic mac os x text2sf in the group AvatarThe Audio Programming Book:   9 months, 2 weeks ago · View

    Hi guys,
    I tried the solution here, but I couldn’t find any single comment line… 
    I just cant compile the thing!
    Anyone had (another) tip or just have a compiled executable to use?
    Thanks,
    Roberto

    • Avatar Image
      Roberto Garreton · 9 months, 1 week ago

      It is working already… don’t know how and why though.

  • John started the forum topic Errata in the group AvatarThe Audio Programming Book:   9 months, 3 weeks ago · View

    is this the right place to suggest errata? I’m not far into the book, but suggest these.. 0.9.2 – ‘multiplication’ should read ‘division’ 0.12.24. pointer declarations; return-type (*pointer-name) (arguments); [ <- no square bracket at the end. 0.13 ...is a valid assignment to an int, and... strcpy(note.name, "C" ); should read strcpy( firstnote.name, "C" ); [...]

  • Dr. Richard Boulanger posted on the forum topic Erratum in the group AvatarThe Audio Programming Book:   10 months, 1 week ago · View

    Dear Readers of The Audio Programming Book.  Thanks so much for the code and information and opinions that you have shared here.  Your reports of these errata are especially important to us.  MIT Press contacted me today and asked for a complete list of typos and erratum so that they could correct these for the [...]

  • analoq posted on the forum topic Erratum in the group AvatarThe Audio Programming Book:   10 months, 3 weeks ago · View

    I’m back!  Here’s one that tripped me up recently…
    Equation #9 in 6.6.2 (p.483) reads:
      b1 = -*(2pif/sr)
    Should read:
      b1 = -*cos(2pif/sr)

  • Load More