Susan Harkins (252) [Avatar] Offline
#1
Please share post-publication errors in this folder. We'll compile and publish a comprehensive list for everyone's convenience. Thank you!

Susan Harkins
Errata Editor
120765 (2) [Avatar] Offline
#2
In Appendix D, pg. 273 of the print edition, the loop variable 'n' is uninitialized in the following line:

for(int n; n < msg.numArgs(); n++)

I think it should be:

for(0 => int n; n < msg.numArgs(); n++)
Spencer Salazar (2) [Avatar] Offline
#3
Thanks- in ChucK this is actually ok, because int and float variables in ChucK are automatically initialized to 0. (Other types also have default initialization to sane zero-ish or empty values, if no other initialization is provided.)

So the main reason to make this change would be for style or clarity- functionally they are the same.

spencer
274153 (1) [Avatar] Offline
#4
Listing 1.8

1 *=> myPitch;

This should be 2 *=> myPitch;

Otherwise, you get the same note played twice!
perry.cook (29) [Avatar] Offline
#5
Right you are. Noted for correction in examples that
come with distribution, and for future printings of the book.

Thanks!

PRC
Susan Harkins (252) [Avatar] Offline
#6
A current errata list is available at http://manning.com/kapur/excerpt_errata.html.
Susan Harkins (252) [Avatar] Offline
#7
Susan Harkins wrote:A current errata list is available at http://manning.com/kapur/excerpt_errata.html.
278463 (1) [Avatar] Offline
#8
Hi there, this is a musical errata. In chapter 2, figure 2.1 of the ebook, there's a figure of a piano and an arrow pointing to the first few notes of Twinkle twinkle. The issue is that the note on 'little', the F, would have to be an F# if the song is to remain in a major mode as in the original.
Kunio (24) [Avatar] Offline
#9
1.4.3 on the tempo (per minute, not second)
in the "1.4.3. Variables of type time" section,
after the first one line of code, it goes:
"... tempo, often expressed in how many quarter-note duration happen per second, also
called BPM (beats per minute). ..."

imho, it should be "how many quarter-note duration happen per minute"
(like M.M. ?=75, etc.)

// My only paperback copy of the book currently lent to my editor/publisher
// so I am not sure about the page.
// I am a Japanese translator trying to persuade him/them
// to publish your ChucK book in Japanese!

cheers - Kunio Yoshikawa
Kunio (24) [Avatar] Offline
#10
Figure 3.2 has no # for F note (page 65)
On the same line as #8 comment, the Figure 3.2 (in section 3.4.1) music has no sharp (#) on F notes ("lit--tle") so the melody differs from the original song. Actually, you need three sharps on C, F and G to make it an A major song. Of course, it is rather weird and scary for non music-school students to see three sharps, but you have to be careful not to offend music-school students smilie
Mitch K (2) [Avatar] Offline
#11
In Listing 3.8, in the section //set melody and harmony, I believe the arrays harmNotes[i] should refer to t.freq and melNotes[i] should refer to s.freq.
perry.cook (29) [Avatar] Offline
#12
278463 wrote:Hi there, this is a musical errata. In chapter 2, figure 2.1 of the ebook, there's a figure of a piano and an arrow pointing to the first few notes of Twinkle twinkle. The issue is that the note on 'little', the F, would have to be an F# if the song is to remain in a major mode as in the original.


Perry here: Right you are! How embarrassing, and thanks for finding this. We'll get it fixed on the errata page and also in subsequent printings of the book. I'm attaching a corrected version of that figure (if it works).
perry.cook (29) [Avatar] Offline
#13
1.4.3 on the tempo (per minute, not second)
55080 wrote:in the "1.4.3. Variables of type time" section,
after the first one line of code, it goes:
"... tempo, often expressed in how many quarter-note duration happen per second, also
called BPM (beats per minute). ..."

imho, it should be "how many quarter-note duration happen per minute"
(like M.M. ?=75, etc.)

// My only paperback copy of the book currently lent to my editor/publisher
// so I am not sure about the page.
// I am a Japanese translator trying to persuade him/them
// to publish your ChucK book in Japanese!

cheers - Kunio Yoshikawa


Perry here: Yes you are totally correct in that it should say "happen per minute"
instead of "second." We'll get this corrected in the next printing. Thanx!!
perry.cook (29) [Avatar] Offline
#14
Figure 3.2 has no # for F note (page 65)
55080 wrote:On the same line as #8 comment, the Figure 3.2 (in section 3.4.1) music has no sharp (#) on F notes ("lit--tle") so the melody differs from the original song. Actually, you need three sharps on C, F and G to make it an A major song. Of course, it is rather weird and scary for non music-school students to see three sharps, but you have to be careful not to offend music-school students smilie


Perry here: Right you are! How embarrassing, and thanks for finding this. We'll get it fixed on the errata page and also in subsequent printings of the book. I'm attaching a corrected version of that figure (just with the single F# accidental, not with the whole scary three sharp key signature smilie.
perry.cook (29) [Avatar] Offline
#15
Mitch K wrote:In Listing 3.8, in the section //set melody and harmony, I believe the arrays harmNotes[i] should refer to t.freq and melNotes[i] should refer to s.freq.


Perry here: Yep, you're right. Those two lines should look like this:

// set melody and harmony from arrays
Std.mtof(melNotes[i]) => s.freq; // (10) Sets frequencies from
Std.mtof(harmNotes[i]) => t.freq; // array MIDI notes

It turns out it doesn't sound that different, but for consistency, it will
be updated in future printings. Thanx!!
383596 (1) [Avatar] Offline
#16
In Listing 5.17 you call sonify(factorial(x)) which adds an additional sound pulse. If you just call factorial(x) it works fine, as factorial already calls sonify().
Andrew Piepenbrink (1) [Avatar] Offline
#17
In Listing 9.5, the line:

quarterNote*0.5 => thirtysecondNote;

should be:

sixteenthNote*0.5 => thirtysecondNote;

to be musically correct (Listing 9.4 is fine). I notice, however, that none of the other Chapter 9 listings ever use the value of the 'thirtysecondNote' variable, so one would only get odd behavior if they tried to use Listing 9.5 (and accessed the bad value) in their own projects.

This error is also repeated in the built-in examples in ChucK (i.e. miniAudicle) 1.3.5.2 in three places; examples/book/digital-artists/chapter9/Listing9.5.ck, examples/book/digital-artists/chapter9/BPM.ck, and examples/book/digital-artists/chapter9/DrumMachine/BPM.ck.