Jump to content
IGNORED

Teaching myself ChucK?


Recommended Posts

Prior experience in programming would make it easier, but that doesn't mean you can't learn ChucK. If you understand synths/samplers/effects/whatever then it will come natural. I just hope it is well documented. CSound has a nice book to get you started, not sure about ChucK.

 

If you can get things together on a modular synth then you'll be able to handle it...

Edited by Oscar
Link to comment
https://forum.watmm.com/topic/56215-teaching-myself-chuck/#findComment-1324260
Share on other sites

No, chuck is pretty simple if you want to do simple things, not much of a learning curve.

 

 

lol dithering in chuck:

 

// dither.ck
// demo of dithering
//
// can use any UGen as source in play_with_dither()
// qbits : number of bits to quantize to
// do_dither : whether to dither
//
// gewang

// patch
Impulse imp => dac;

// sine wave generator
SinOsc s => blackhole;
220 => s.freq;

// go
play_with_dither( s, 2::second, 6, false );
play_with_dither( s, 2::second, 6, true );
.5::second => now;

play_with_dither( s, 2::second, 5, false );
play_with_dither( s, 2::second, 5, true );
.5::second => now;

play_with_dither( s, 2::second, 4, false );
play_with_dither( s, 2::second, 4, true );
.5::second => now;

// dither
fun void play_with_dither( UGen src, dur T, int qbits, int do_dither )
{
   // sanity check
   if( qbits <= 0 || qbits > 24 )
   {
       <<< "quantization bits out of range (1-24)", "" >>>;
       return;
   }

   // loop
   float sample;
   int quantized;
   (1 << 24) => int max;
   while( T > 0::second )
   {
       // get the last sample
       src.last() => sample;
       // quantize it
       if( do_dither ) // dither
           ((sample + Std.rand2f(0,Math.pow(2,-qbits))) * max) $ int => quantized;
       else // no dither
           (sample * max) $ int => quantized;

       // throw away extra resolution
       quantized >> (24-qbits) << (24-qbits) => quantized;
       // cast it back for playback
       (quantized $ float) / max => imp.next;
       // advance time
       1::samp => now;
       // decrement
       1::samp -=> T;
   }
}

Link to comment
https://forum.watmm.com/topic/56215-teaching-myself-chuck/#findComment-1325462
Share on other sites

Taught myself ChucK years ago, but I'm a programmer. It's pretty different from most languages though. Took me a bit to wrap my head around how time works in it, but it's amazing. I wrote a few generative music programs here and there that were pretty nifty.

 

Also, lol at forking threads being "sporking shreds" in ChucK.

Link to comment
https://forum.watmm.com/topic/56215-teaching-myself-chuck/#findComment-1325764
Share on other sites

hey i just started with this, it's pretty intuitive and fun so far coming from Processing/Java. Getting into it rather quickly.

 

I'm doing the few tutorials, there doesn't seem to be much documentation on the web though. Is this still being actively developed? How about stability? Does garbage collection work now or does it still leak a lot? Can i build binaries from my code?

Link to comment
https://forum.watmm.com/topic/56215-teaching-myself-chuck/#findComment-1327312
Share on other sites

Yes, it's still in development. It's pretty stable though. I think garbage collection is solid. I never had any leaks I was aware of anyway. I don't think you can build binaries, as it's a real-time interpretted language. I may be wrong though.

Link to comment
https://forum.watmm.com/topic/56215-teaching-myself-chuck/#findComment-1327421
Share on other sites

hmm, it could work by putting the ChucK distribution into some installer, together with your .ck files, and spork shreds ( :emotawesomepm9: ) from a script right? Or is there a more convenient way?

 

i'm asking cause i want to pack graphical stuff (Processing) and ChucK audio stuff into one package.

Link to comment
https://forum.watmm.com/topic/56215-teaching-myself-chuck/#findComment-1327455
Share on other sites

  On 5/17/2010 at 8:28 PM, phling said:

hmm, it could work by putting the ChucK distribution into some installer, together with your .ck files, and spork shreds ( :emotawesomepm9: ) from a script right? Or is there a more convenient way?

 

i'm asking cause i want to pack graphical stuff (Processing) and ChucK audio stuff into one package.

 

Sounds like it's worth trying.

Link to comment
https://forum.watmm.com/topic/56215-teaching-myself-chuck/#findComment-1327458
Share on other sites

lol okay i tried and it works (on OS X for now. Will take a look at Windows tomorrow.)

 

http://dl.getdropbox.com/u/1358257/launchChuck.dmg

 

inside the disk image is an .app file in which everything is tucked away neatly. Just launch the app, it will start a ChucK VM and a shred. It's a proof of concept, not much you can do with it.

The Processing app syncs with ChucK via OSC. If you close the window, ChucK will also shut down.

:trashbear:

Link to comment
https://forum.watmm.com/topic/56215-teaching-myself-chuck/#findComment-1328386
Share on other sites

okay i'm making a Processing library to integrate ChucK into Processing: phuck.

 

the main goal is to use the export-as-application feature of Processing to include the ChucK VM, so you can run an exported app without having ChucK installed.

it's early/buggy/might not work on your system just now, but here is an example app for Windows and Mac.

Edited by Guest
Link to comment
https://forum.watmm.com/topic/56215-teaching-myself-chuck/#findComment-1335030
Share on other sites

  • 3 weeks later...
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   1 Member

×
×