ChucK is a music programming language (and compiler/synthesizer) written by a professor (Perry Cook) and his students at Princeton University. I'm learning how to use it; I thought that writing about how to use it would help...

Thursday, November 17, 2005

No More Comments, Sorry, Too Much Spam

Apparently the spammers have effective robots, I've been getting twenty or more spam letters/comments a day...so I've turned commnents off. Sorry, but I'm getting overwhelmed with noise mail...

Friday, October 21, 2005

Found a free web space for mp3's

Thanks to a link on Penny Arcade, today I found a site that offers free disk space for mp3's:

The mp3 links (on the right over there) or this page (http://www.putfile.com/gwms451) let you listen to recordings for some of our chuck examples...

[chuck] version 1.2.0.3 released

[chuck] version 1.2.0.3 released


Dear All,

chuck-1.2.0.3 (dracula) is now available.

Once again, we have made some small (but potentially critical) language
and API changes (very sorry). The experimental 'loop' keyword has been
renamed to 'repeat', std.abs() now deals with int (instead of float)
and std.fabs() uses floats. Additionally, a sizable bug in
instantiating arrays of null object references have been fixed (we
hope), and /* block comments */ are now supported. See below for more
details.

http://chuck.cs.princeton.edu/release/
(may need to reload page to see update)

Please let us know of any issues, and as always, HappY ChucKing!

Best,
chuck team

---
1.2.0.3
(API changes again)
(syntax change - 'loop' -> 'repeat')
- loop( ... ) construct (see 1.2.0.2) changed to repeat( ... )
- usage and semantics same as before
- this is also an experimental language feature
(let us know if it's good or bad)
- float std.abs( float ) changed -> int std.abs( int )
- use std.fabs( ... ) for floating point absolute value

- (added) \/\* block comments \*\/
- no nesting allowed
- closing '\*\/' not necessary if commenting out rest of the file
- (fixed) arrays of null object references correctly allocated
: Event @ events[128];
- (fixed) DEFAULT sndbuf rate now set correctly to interpolate
for files outside of chuck sample rate (no longer have to
explicit do 1 => buf.rate)
- (fixed) examples/midi/polyfony*.ck no longer creates 128
unnecessary events...
- (changed) examples/stk/wurley.ck -> examples/stk/wurley2.ck
- (changed) examples/stk/wurley.ck (wacky version)

_______________________________________________
chuck mailing list
chuck@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck

Monday, October 17, 2005

[chuck] version 1.2.0.2 released

[chuck] version 1.2.0.2 released


Dear All,

chuck-1.2.0.2 (dracula) is now available. Changes include class and
member functions renaming for OSC objects (see below), stability and
performance improvements for OSC, ability to open multiple OscRecv
objects on a single port, experimental control construct 'loop', events
fire with 0-sample delay instead of 1-sample, new/updated examples, and
many various bug fixes (hopefully).

http://chuck.cs.princeton.edu/release/
(may need to reload page to see update)

Please let us know of any issues.

HappY ChucKing!

Best,
chuck team

---
1.2.0.2

(sorry for the API changes)
- (API change) OSC_Send class name changed to 'OscSend'
(also): .startMesg(...) name changed to startMsg(...)
- (API change) OSC_Recv class name changed to 'OscRecv'
- (API change) OSC_Addr class name changed to 'OscEvent'
(also): .hasMesg() name changed to .hasMsg()
(also): .nextMesg() name changed to .nextMsg()
- (API change) STK Shakers.freq now expect Hz instead of MIDI number

- (moved) examples/event/opensound*.ck moved to examples/osc/OSC*.ck
(see OSC_send.ck and OSC_recv.ck for examples on OpenSoundControl)
- (moved) examples/event/polyfony*.ck to examples/midi/

- (added) 'loop(...){ }' control structure :
example: loop( 8 ) { ... } // executes body 8 times
example: loop( foo ) { ... } // executes body foo times
(foo is evaluated exactly once entering the loop, the
value at that time is used as a constant to control
loop iteration - even if foo is changed in the loop
body.)
- supports break and continue
- important: one fundamantal difference between the loop
semantic and for/while/until semantic is that the argument
expression 'exp' in loop( exp ) is evaluated exactly once
when the loop is first entered.
- (added) MidiIn and MidiOut member functions:
.good() : whether the thing is good to go (int)
.num() : the device number (int)
.name() : the device name (string)
.printerr( int ) : whether to auto print errors (default YES)
- (added) --version command line flag (Graham)

- (changed) chuck --status now prints shreds sorted by id
(previously it was the current shreduling order + blocked)
- (changed) a udp port may now be shared by many OSC_Recv (phil)
: the incoming messages are broadcast to all
- (changed) address/type string in OSC: comma now optional (phil)

- (fixed) events are now 0-sample synchronous (instead of 1)
- (fixed) startup audio stability for --callback mode
- (fixed) incorrect 'continue' behavior in for loops
- (fixed) improved OSC stability (phil)
- (fixed) OSC shreduling sanity check failed now resolved
- (fixed) math.round for negative numbers (win32)
- (fixed) std.mtof and std.ftom now internally double precision
- (fixed) removed extra console output in STK Flute
- (fixed) multiple delete/assertion failure on type rollback
- (fixed) chuck --kill now closes WvOut and MidiRW file handles
- (added) examples/midi/gomidi.ck : very useful sometimes
- (added) examples/midi/gomidi2.ck
- (added) examples/basic/rec-auto.ck (rec2.ck back in action)
- (added) examples/basic/fmsynth.ck (from v1)
- (added) examples/sitar.ck
- (fixed) examples/stk/*-o-matic.ck now uses array

_______________________________________________

Tuesday, September 27, 2005

[chuck] version 1.2.0.1 released

[chuck] version 1.2.0.1 released

Dear All,

chuck-1.2.0.1 (dracula) is now available, with new callback
functionality for real-time audio (potentially better for linux and os
x), and several bug fixes: crash when using --replace averted, member
resolution in inherited classes corrected, and string comparison is
less broken, among others. Much thanks to Robin Davies, Manfred
Brockhaus, Leonard "paniq" Ritter, and others for their help.

http://chuck.cs.princeton.edu/release/
(may need to reload page to see update)

Please let us know of any issues.

HappY ChucKing!

Best,
chuck team

---
1.2.0.1
- (added) full callback capability for real-time audio
- blocking functionality still available
- select via flags: --blocking and --callback
- improves latency and stability, especially on linux
- use --callback (default) for low latency / small buffer size
- use --blocking for higher throughput (sometimes)
- (fixed) crash when doing on-the-fly 'replace'
example: chuck --replace 0 foo.ck
- (fixed) implicit cast is now correct when sporking
(thanks to Manfred Brockhaus)
- (fixed) nested class definitions can have same name as outer class
- (fixed) nested class bug in scan1 (thanks to Robin Davies)
- (fixed) variable resolution in parent class now visible
(thanks to Robin Davies)
- (fixed) variable resolution ordering
- local, class, parent, global (thanks to Robin Davies)
- (fixed) emitter now asserts inheritance instead of equality
(thanks to Robin Davies)
- (fixed) string comparison ==, !=
- (added) string operations <, <=, >, >=
- (fixed) examples code reformatted, cleaned, and commented
- (fixed) OSC event function now correctly named ("event")
- (fixed) removed debug output in OSC

_______________________________________________
chuck mailing list
chuck@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck

Thursday, August 25, 2005

Version 1.2.0.0 (dracula) released

[chuck] version 1.2.0.0 (dracula) released

Dear All,

chuck-1.2.0.0 is released. (Sorry.) This is the "v2" major release.
Additions include arrays, objects and classes, events, and more. A
full list of new and updated features can be found at the end of this
email.

http://chuck.cs.princeton.edu/

We have also put together a draft of a language specification
(finally). It is not complete yet and will be improved as (real) time
is advanced:

http://chuck.cs.princeton.edu/doc/language/

We have been testing this release along the way. However, since this
is the initial release, there is probably a healthy amount of egregious
bugs! Please let us know if you run into anything fishy (email one of
us directly, post to chuck-dev or the newly created chuck-users list).
Same goes for the documentation. Actually, any type of feedback would
be greatly appreciated.

Many thanks to the great people who have contributed ideas, code, and
time to this release! Thanks to everyone for being so patient with
this release.

Development shall continue as we fix the bugs, add new features (and
more bugs).

Please let us know if you run into any problems. HappY ChucKing!

Best,
ChucK Team
(Perry, Ananya, Phil, Adam, Ajay, Ge ...)


---
1.2.0.0

SYNTAX and OPERATORS:
- (added) +=>, operator : 2 +=> i; (also) -=>, *=>, /=>, %=>
- (added) @=> for explicit assignment
this is the only way to make object reference assignments
- (added) implicit int to float casting
- (changed) cast now look like: 1.1 $ (int) => int i;
- (added) function call by chucking :
// call
(1,4) => math.rand2f => result;
// same as
math.rand2f(1,4) => result;

LANGUAGE:
- (fixed) type system for existing types
- (added) forward lookup of classes and functions (mutual recursion)
- (added) stack overflow detection for massive recursion

DOCUMENTATION:
- (added) language specification:
http://chuck.cs.princeton.edu/doc/language

COMMAND-LINE:
- (added) --probe prints all audio and MIDI devices
- (added) --log or --verbose logs compiler and virtual machine
- (added) --logN or --verboseN multi level logging
1 - least verbose
10 - most verbose

OBJECTS:
- (added) 'class' definitions : class X { int i; }
- (added) 'extends' keyword : class Y extends Event { int i; }
- (added) virtual/polymorphic inheritance
- (added) added pre-constructors - code at class level
gets run when object is instantiated
- (added) function overloading :
class X { fun void foo() { } fun void foo( int y ) { } }
- (added) base classes (can be extended):
Object, Event, UGen
see below
- (added) base classes (cannot be extended):
array, string
see below
- (added) member data
- (added) static data
- (added) member functions
- (added) static functions

EVENTS:
- (added) base Event class : Event e;
can be used directly
can be extended to custom events
(see one_event_many_shreds.ck)
- (added) waiting on event, chuck to now :
e => now; // wait on e
- (added) e.signal() wakes up 1 shred, if any
- (added) e.broadcast() wakes up all shreds waiting on e
- (added) class MidiEvent (see gomidi2.ck)
alternative to polling.
- (added) class OSCEvent

ARRAYS:
- (added) arrays : int a[10]; float b[20]; Event e[2];
- (added) multidimensional arrays : int a[2][2][2];
- (added) associative arrays : int a[10]; 0 => a["foo"];
all arrays are both int-indexed and associative
- (added) array initialization : [ 1, 2, 3 ] @=> int a[];
- (added) .cap() for array capacity
- (added) .find() test if item is associative array
- (added) .erase() erase item in associative array

UGENS:
- (added) class UGen
can be extended
- (changed) all ugen parameters are now also functions:
// set freq
440 => s.freq => val;
// same as...
s.freq( 440 ) => val;
- (changed) left-most parameters must now be called as functions
// no longer valid
f.freq => float val;
// valid
f.freq() => float val;
// still ok
440 => s.freq => float val;

SHREDS:
- (added) class Shred
- (added) .yield() .id()

STRINGS:
- (added) class string

AUDIO:
- (added) stereo
all stereo unit generators have .left, .right, .pan functions
- (changed) stereo ugen: dac (2 in, 2 out)
- (changed) stereo ugen: adc (0 in, 2 out)
- (added) stereo ugen: pan2 take mono or stereo input and pans
- (added) stereo ugen: mix2 mix stereo input into mono

------------------------------------------------


[chuck] spork ~ chuck-users ( new mailing_list + more )




Dear All,

Along with the new release, we have made a new mailing list
(chuck-users), intended for specific questions and discussions about
using chuck. This list (chuck) will (soon) become a moderated,
low-traffic mailing list intended for updates, announcements,
tutorials, and low-bandwidth discussions.

Hopefully the folks that are interested in chuck can remain on (chuck)
without being potentially spammed too much, and those that have
specific questions can fire away on (chuck-users) with a clean
conscience!

Additionally, we have been graciously given permission to abuse an
entity called 'soup kitchen'. It is the state-of-the-art in
anti-social networking. It contains many nice features (all
conversations are by default world-readable, optional email
notification of new replies to topics, and is rather elegant) that may
be to useful as a semi-realtime semi-anonymous forum. The author,
Visnu Pitiyanuvath, will work with us to further enhance the site to
make it more useful and fun.

Links to all the lists and soup kitchen can be found here:

http://chuck.cs.princeton.edu/community.html

Join, if you like. Have fun!

Best,
ChucK Team

Friday, July 01, 2005

RBF-soft. [producing] working with chuck (via chuck mailing list)

RBF-soft. [producing] working with chuck

Hi to everyone!, Hi Chuckit list!

We're David & Ivan Rodriguez, RBF-soft. [producing], Electronic Artists from barcelona - Spain. We presented our last work VIFE _alpha v.01 at NIME'05 Vancouver - Canada. VIFE _alpha v.01 is a Virtual I nterface to Feel Emotions. The performer user can control 6 three dimensional sonorous forms with an interactive glove (VIFE _glove v.01) & an anlaysing box (R-CUBE IV). The works investigate the idea of Synaesthesia and her enormous possibilities creating new realities, sensations and zones, where the user can find new points of interaction.

In NIME'05 we knew Ge Wang and Perry Cook. So interesting people ;) :)

After that we presented this project in SONAR'05 (Barcelona), too.

For our next project, we're working with Chuck like a sonorous engine. Chuck is so powerfull and don't need any visual interface, only the console. This is very important for our next work, because we need to save resources and energy to use it in other things like, analysis of audio, synthesis, sonorous effects,... This project is about wearable technology, GPS, sensors,... We will use Chuck for this project.

Best Regards,


rodri_DJ & ivan_VJ
RBF-soft. [producing]
http://www.rbf-soft.com
rbf_soft@hotmail.com

Monday, June 27, 2005

Chuck 1.2 - any date yet?

Chuck 1.2 - any date yet?


Hi Thor and Everyone,

We have continued development in full since NIME (for the most
part) and are going to do so until the release and beyond. We are
working on completing the core feature set before releasing 1.2.
We have everything except about 4 showstopper feature/bugs
that we feel needs to be in the release. (They include finishing
rudimentary garbage collection, stereo (very close), a pre-scanner
for the type system, and static data initialization). The main
additions (arrays, objects, events, and even basic OSC) are
completed and even tested.

However, I think it's hard to set a release date, since our earlier
attempts obviously weren't met. So we will keep going as fast as
we can until the last features/bugs are dealt with. We are close.

> I'm pretty eager now as I was thinking of playing with chuck
> in my summer holiday in a cottage up in some Icelandic mountains.

laptop... $2000
headphones... $100
chuck... $0
summer cottage in Icelandic mountains... priceless.

Best,
Ge!

On Jun 27, 2005, at 11:45 AM, thor wrote:

> Hi everybody.
>
> Thanks Ge, Perry and the rest of you for a wicked workshop at
> NIME last month.
>
> I've been on my way to do a Chuck session, but have decided
> to wait for the 1.2 release. Any news on when....?
>
> I'm pretty eager now as I was thinking of playing with chuck
> in my summer holiday in a cottage up in some Icelandic mountains.
>
> Cheers
> Thor
>
> _______________________________________________
> chuck mailing list
> chuck@lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck

_______________________________________________
chuck mailing list
chuck@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck

Upddate: Re: [chuck] Chuck 1.2 - any date yet?


On Jun 28, 2005, at 8:32 AM, oliver oli wrote:
> what about multi-channel (> 2 channels)?

multi-channel is certainly planned for, but probably won't
be in the initial 1.2.0.0 release. However, it should follow
soon in a subsequent release. It is a high priority.

Best,
Ge!