modularizing chuck files

Nikolaus Gradwohl2009-01-17T13:11:00+00:00

I wrote a simple chuck script that generates a drum loop and a bass-sequence. later i wanted to reuse the sounds and started to search how to modularize the code.

so i started to convert my instrument declarations in classes. The instrument classes don't get connected to 'dac' directly. They have a "connect"-method that can be used by the main script.

to run the loop all the scripts must be given on the commandline


The main script ( instanciates a DrumSet and a Bass class and connects them to "dac". Than it generates a walking bass and a simple electronic drum loop.

DrumSet drm;
drm.connect( dac );

Bass bass;
bass.connect( dac );

[ 41, 41, 44, 46] @=> int bline[];
0 => int pos;
0 => int count;

while ( true ) {
    if ( count % 2 == 0 ) {; }
    if ( count % 4 == 2 ) {; }

    if ( count % 2 == 0 ) { spork ~ bass.bass( bline[ pos % 4 ]); }
    if ( count % 2 == 1 ) { spork ~ bass.bass( 12 + bline[ pos % 4 ]); }

    1 + count => count;
    if ( count % 4 == 0 ) { 1 + pos => pos; }
    250::ms => now;
read more ...

flying with python3.0

Nikolaus Gradwohl2009-01-16T18:48:00+00:00

I recently installed python3. While scanning through the module directory a package named "antigravity" catched my eye.

when i typed "import antigravity" python opend a browser-window with this link

i really like python - and xkcd :-)

read more ...

Visiting the Mailüfterl

Nikolaus Gradwohl2009-01-11T16:10:00+00:00

Today i was visiting the Technical Museum of Vienna and while standing in front of favourite exhibit - the Mailüfterl which is
the first european full transistorized computer - i thought it would be cool to see some code running on this machine.

back home i googled a bit and - tata - someone has written a emulator of the mailüfterl!


note: the image is from Wikipedia and was shot by Florian Staudacher and was licenced under Creative Commons Attribution 3.0 Unported

read more ...

download bots - xmas edition

Nikolaus Gradwohl2008-12-28T15:44:00+00:00

a while ago i made some wooden bots while waiting for a download. My family really liked them - so they got our xmas-tree decoration this year :-)


read more ...

ascii flower with bee

Nikolaus Gradwohl2008-12-09T16:27:00+00:00

   __/  \__
  /  \__/  \     ()
  \__/  \__/    O//)-
  /  \__/  \     ()
  \__/  \__/
      ||   __
      ||  / /|
      || / / |
      ||/ / /
      || / /
read more ...

Training Bike Visualization

Nikolaus Gradwohl2008-12-08T14:58:00+00:00

i wrote a processing sketch to visualize and record sessions on a training bike. To calculate the rotation-speed of my training bike i hooked up 2 reed-switches to my arduino and taped them to my training bike. Than i sticked a rare earth magnet on each pedal.

the processing sketch draws a small figure on a bike which is animated at the same speed as the bike.

the sketch also records the timestamps to a log file for later analysis.

training bike

read more ...

processing ical-flowers

Nikolaus Gradwohl2008-12-06T22:42:00+00:00

I just made a processing sketch using my ical4p library. The programm draws a flower for every event in a given ical-file. The more events the calender has, the more beautifull the flower-garden is :-)


read more ...

ical4p Processing lib

Nikolaus Gradwohl2008-12-06T22:26:00+00:00

i have written a small wrapper around ical4j written by Ben Fortuna. This allows to write processing sketches, that visualize data from ical files.

i included a small example in the lib showing how to draw a timeline based on an ical file.

i also have set up a project-page for it. The libray is released under the LGPL.

read more ...

where do my readers come form?

Nikolaus Gradwohl2008-12-05T05:35:00+00:00

out of couriousity i took the access.log from my blog for the last 5 days, extracted the ip-adresses and looked up the countries my readers come from using

so here is a list ordered by count of uniqe ip-adresses. (i even have readers from andorra! more than from swizerland and austria together!)

read more ...

Lava Lamp Monster

Nikolaus Gradwohl2008-12-04T06:16:00+00:00

This time i catched a monster that was trying to hide from me in a lavalamp. but - HAHA - a experienced monster collector like me can not be tricked that easy! so beware you monsters!

the photo is a bit ugly this time - i made it using my mobilephone


read more ...