The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

enzyme69 (3) [Avatar] Offline
#1
// three oscillators in stereo
SqrOsc s => dac.left;
SqrOsc t => dac;
SqrOsc u => dac.right;

// THIS IS NEEDED FOR WINDOWS CHUCK USERS
0.3 => s.gain;
0.4 => t.gain;
0.3 => u.gain;

// functions for octave and fifth
fun float octave( float originalFreq )
{
return 2.0 * originalFreq;
}

fun float fifth( float originalFreq )
{
return 1.5 * originalFreq;
}

// Main Program
for (100 => float freq; freq < 500; 0.5 +=> freq)
{
freq => s.freq;
octave(freq) => t.freq;
fifth(freq) => u.freq;
10::ms => now;
}
beanat50 (3) [Avatar] Offline
#2
Re: Chapter 5, page 104, listing 5.5 --- ChucK Windows user needs this
Perhaps also a comment in the text discussing DAC, that windows requires a maximum input from all sources in a shred of 1 to prevent distortion.
perry.cook (29) [Avatar] Offline
#3
Re: Chapter 5, page 104, listing 5.5 --- ChucK Windows user needs this
Will do. Thanx!!