28.03.2024, 22:12 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
Autor Nachricht
horo
25 Titel: ChucK: Strongly-timed Concurrent Audio Programming  BeitragVerfasst am: 21.02.2008, 12:27 Uhr



Anmeldung: 17. Dez 2003
Beiträge: 700
Wohnort: Berlin
Hi,

searching for DSP and measurement I discovered this project:
http://chuck.cs.princeton.edu/

Zitat:
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:
Code:
 // 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:
Code:
      // 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

_________________
omnia vincit pecunia
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Beiträge vom vorherigen Thema anzeigen:     
Gehe zu:  
Alle Zeiten sind GMT + 1 Stunde
Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
PNphpBB2 © 2003-2007 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.