Difference between revisions of "ChucK/fm.ck"

From CSWiki
Jump to: navigation, search
 
Line 1: Line 1:
  // carrier
+
// carrier
  sinosc c => dac;
+
sinosc c => dac;
  // modulator
+
// modulator
  sinosc m => blackhole;
+
sinosc m => blackhole;
  
  // carrier frequency
+
// carrier frequency
  220 => float cf;
+
220 => float cf;
  // modulator frequency
+
// modulator frequency
  550 => float mf => m.freq;
+
550 => float mf => m.freq;
  // index of modulation
+
// index of modulation
  .5 => float index;
+
.5 => float index;
  
  // time-loop
+
// time-loop
  while( true )
+
while( true )
  {
+
{
      // modulate
+
    // modulate
      cf + (index * mf * m.last()) => c.freq;
+
    cf + (index * mf * m.last()) => c.freq;
      // advance time by 1 samp
+
    // advance time by 1 samp
      1::samp => now;
+
    1::samp => now;
  }
+
}

Revision as of 22:30, 8 March 2006

// carrier sinosc c => dac; // modulator sinosc m => blackhole;

// carrier frequency 220 => float cf; // modulator frequency 550 => float mf => m.freq; // index of modulation .5 => float index;

// time-loop while( true ) {

   // modulate
   cf + (index * mf * m.last()) => c.freq;
   // advance time by 1 samp
   1::samp => now;

}