Software - ChucK: Strongly-timed Concurrent Audio Programming

horo - 21.02.2008, 12:27 Uhr
Titel: ChucK: Strongly-timed Concurrent Audio Programming

searching for DSP and measurement I discovered this project:

what is it? : ChucK is a new (and developing) audio programming language for real-time synthesis, composition, performance, and now, analysis - fully supported on MacOS X, Windows, and Linux. ChucK presents a new time-based, concurrent programming model that's highly precise and expressive (we call this strongly-timed), as well as dynamic control rates, and the ability to add and modify code on-the-fly. In addition, ChucK supports MIDI, OSC, HID device, and multi-channel audio. It's fun and easy to learn, and offers composers, researchers, and performers a powerful programming tool for building and experimenting with complex audio synthesis/analysis programs, and real-time interactive control.

ChucK works perfectly with JACK.
apt-get install chuck

A very simple program:
 // connect sine oscillator to D/A convertor (sound card)
SinOsc s => dac;
1000 => s.freq;
// allow 2 seconds to pass
2::second => now;

Save as sinus.ck and run it:
chuck sinus.ck
you will hear a sinus for two seconds.
A more complex program from the tutorial:
      // impulse to filter to dac
      Impulse i => BiQuad f => dac;
      // set the filter's pole radius
      .99 => f.prad;
      // set equal gain zero's
      1 => f.eqzs;
      // initialize float variable
      0.0 => float v;

      // infinite time-loop
      while( true )
          // set the current sample/impulse
          1.0 => i.next;
          // sweep the filter resonant frequency
          Std.fabs(Math.sin(v)) * 4000.0 => f.pfreq;
          // increment v
          v + .1 => v;
          // advance time
          100::ms => now;

Save as moe.ck and run it:
chuck moe.ck
Stop it with ^C

hours of fun...

Ciao Martin
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007