music live-coding environments - my first impressions

Nikolaus Gradwohl2017-04-15T17:33:49+00:00

I've been playing with live coding Music environments lately here is a short description of the environments I've used so far

Sonic PI

Sonic PI is a live coding music environment that comes bundled with most raspberry pi images and was invented to teach coding through making sounds. But don't be fooled by it's simple interface or the name - Sonic PI is a pretty serious tool for making music. Despite it's name it runs on Linux, MacOS, Windows and - surprice! - a raspberry pi and is based on supercollider and ruby.

To program it you write ruby programs that contain loops to trigger various synths and samples - you can add a bunch of effects and control various parameters of the synths. It also allows you to write pretty complex melodies and chord structures, by adding random elements to your code.

Sonic pi already comes with a impressive collection of loops, samples, example programs and synths to get you started, but it also allows you to add your own samples or supercollider synth definitions if you want to.

Chuck

Chuck is a pretty unique programming language, that allows you to write virtual instruments and control them either with your code or with various controllers via midi, Hid-events, osc, or whatever else you come up with. You can start and stop your code in sync with the loops already running and it's the basis for the laptop orchestra.

The language used feels a bit strange in the beginning but one gets used to it pretty fast.

PureData + automatonism

Automatonism is a Modular Synth that runs on PureData Vanilla - which means it runs pretty much everywhere. It's a really impressive collection of modules, plus you can use it to livepatch and edit your modules. Since it runs on puredata, you can also use regular puredata structures should you ever get stuck with the provided modules.

The modules help to create a playable pure data patch pretty fast and allow you to expand from there if you want to dive deeper into the pure data universe.

Conclusion

Each of the frameworks I tested this weekend is pretty cool and each of them has it's strengths and weaknesses - I haven't played enough with them to choose a favourite yet. I will try to integrate them into my current Bitwig, VST-Plugin and hardware synth setup and see which one I end up using

read more ...

volca ardour3 jam

Nikolaus Gradwohl2014-03-17T17:56:12+00:00

I created a small chuck script that makes ardour jump to a marker using osc messages. These messages get triggered by the midi signals created by my launchpad mini. I also synced my volca bass to the track using midi-clock. Unfortunately ardour doesn´t send midi sync signals when playing in loop mode. So I created a midi track and sent the same note that my chuck script uses to trigger the "jump-to-marker-1" signal to create the loop.

The lower 5 glowing buttons control the mute state of the first 5 tracks.

you can download my chuck code after this video.

All the sounds except the drum loop have been created using a volca bass or a volca keys. The bass sequence is the same I used in my last blogpost only played slower.

volca jam

read more ...

how to create launchpad light effects with chuck

Nikolaus Gradwohl2014-02-26T05:28:26+00:00

Most launchpad videos feature cool effects running on a launchpad. There are several tutorials on how to make such effects using ableton live. But since my launchpad is connected to a linux box this doesn´t help me much. So I wrote a short chuck script that reacts to the midi events sent by the launchpad and creates an arpeggiator effect to light up the leds. The color can be influenced by changing the velocity.

This script works with a launchpad S or a launchpad mini.

here is a short video that shows my script in action

launchpad lightshow

read more ...

osc sequencer in ruby

Nikolaus Gradwohl2009-01-20T05:29:00+00:00

I wrote a simple osc sequencer in ruby using rosc. The script triggers the drum-kit and the bass i implemented last week.

the pattern may also be of different length. This allows very interesting polyrythmic loops.

require 'osc'
Host = 'localhost'
Port = 3334

c = OSC::UDPSocket.new
hh = OSC::Message.new('/drum', 's', "hh" )
bd = OSC::Message.new('/drum', 's', "bd" )
sn = OSC::Message.new('/drum', 's', "sn" )

ba = OSC::Message.new('/bass', 'i', 64 )


#c.send sn, 0, Host, Port
bpm = 120
step = 1.0/8;
s = bpm * step / 60.0 ;

snd = [ bd, sn, hh ]
pattern = [
[1, 0, 0, 1, 0, 1, 0, 0 ],
[0, 0, 1, 0, 0, 0, 1, 1 ],
[1, 1, 1, 1, 1, 1, 1, 1 ]
]
bass = [
40, 40, 0, 40, 40, 0, 43, 0,
40, 40, 0, 40, 40, 0, 38, 0 ]

count = 0;
while(true)
    (0..2).each { |i|
        c.send(snd[i], 0, Host, Port) if pattern[i][count % pattern[i].length] == 1
    }

    ba.args = [bass[ count % bass.length]]
    c.send( ba, 0, Host, Port ) if bass[ count % bass.length ] != 0

    sleep s
    count+=1
end
read more ...

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

chuck Bass.ck DrumSet.ck loop.ck

The main script (loop.ck) 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 ) {
    drm.hh();
    if ( count % 2 == 0 ) { drm.bd(); }
    if ( count % 4 == 2 ) { drm.sn(); }

    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 ...

Chuck iControl Projectpage

Nikolaus Gradwohl2008-07-14T06:46:00+00:00

as written before, i have started writing a chuck script that mapps the midi-data from my iControl to OSC events. I now have set up a proper project page for the script.

read more ...

chuck icontrol

Nikolaus Gradwohl2008-05-22T18:04:00+00:00

I own a m-audio icontrol and some time ago i started to play with chuck a programming language for making electronic music. today i managed to link them together and use my icontrol to start and stop my chuck programms :-)

next thing i will try is to convert the values from the "endless"-knobs to floats and to pass messages to the sub programms

1 => int device;

MidiIn min;
MidiOut mout;
MidiMsg msg;

// open the device
if( !min.open( device ) ) me.exit();
if( !mout.open( device ) ) me.exit();
[0,0,0,0,0,0,0,0] @=> int on[];
[-1, -1, -1, -1, -1, -1, -1, -1] @=> int ids[];
["beep.ck", "sing.ck", "autoloop.ck", "", "", "", "", "" ] @=> string names[];
while ( true ) {
    min => now;

    // get the message(s)
    while( min.recv(msg) ) {
        // print out midi message
        <<< msg.data1, msg.data2, msg.data3 >>>;

        if ( msg.data1 == 176 && msg.data2 >= 64 && msg.data2 < 72 && msg.data3 == 127 ) {
            msg.data2 - 64 => int chan;
            if ( on[chan] == 1 ) {
                0 => on[chan];
                sendOff( chan );
                if (ids[chan] > 0) {
                    Machine.remove( ids[ chan ] )
                        -1 => ids[chan];
                    }
                } else {
                    1 => on[chan];
                    sendOn( chan );
                    if ( names[chan] != "" ) {
                        Machine.add( names[chan] ) => ids[chan];
                    }
                }
            }
            // send( msg.data1, msg.data2, msg.data3 );
        }
    }

    fun void sendOn( int chan ) {
    send( 176, 64 + chan , 127 );
    }

    fun void sendOff( int chan ) {
    send( 176, 64 + chan, 0 );
    }

    fun void send( int d1, int d2, int d3 ) {
        MidiMsg msg;
    d1 => msg.data1;
    d2 => msg.data2;
    d3 => msg.data3;
    mout.send( msg );
    }
read more ...