Slime System

So for the start of this year I have been developing a ChucK based system for integration in the HELOpg Slime system.

You can see my current code on GitHub,

https://github.com/witt0191/slime

The code still requires a little more tidying but is fully functional for use within the HELOpg Slime system. It also facilities using OSC within ChucK by creating a static public class for sending OSC making it very memory efficient and much quicker to live code with.

The HELOpg extension defines the currently active ip address and automatically sends all OSC message to all Slime computers.

Posted in ChucK, HELO, Live Coding | Tagged , | Leave a comment

ICMC 2011 Huddersfield

The International Computer Music Conference is in Huddersfield all this week.

I hope to blog about as it is happening so the post maybe a little rushed so a consequence I am going to put them on my personal blog rather than here.

Summary thoughts and interesting research material will however be blogged here.

ICMC 2011 on scotthewitt.co.uk

Posted in Uncategorized | Leave a comment

ChucK for Beginners

Today I gave a sample lecture to some sixth form students for Huddersfield University.

Took the opportunity to introduce them to ChucK and I think they found it quite enjoyable.

When introducing ChucK I prefer to use the miniAudicle as the VM monitor makes it easy to spot and sort problems and helps students develop a clear understanding.

So to start with a simple sine wave,

SinOsc s => dac;
500::ms => now;

Then a sine wave with a random frequency

SinOsc s => dac;
Std.rand2f(300,600) => s.freq;
500::ms => now;

Now add in a simple control structure

SinOsc s => dac;
while(1)
{
Std.rand2f(300,600) => s.freq;
500::ms => now;
}

I use this example to explain the VM monitor and demonstrate how to stop a shred from the user interface.

Now is a good time to make a chord and explain the Ugens

SinOsc s => dac;
SinOsc ss => dac;
SinOsc sss => dac;
while(1)
{
Std.rand2f(300,600) => s.freq;
s.freq() + 100 => ss.freq;
s.freq() + 200 => sss.freq;
500::ms => now;
}

At this point I tend to talk about Ugen DSP network by modifying the code to include a Gain Ugen.

SinOsc s => Gain g => dac;
SinOsc ss => g;
SinOsc sss => g;
while(1)
{
Std.rand2f(300,600) => s.freq;
s.freq() + 100 => ss.freq;
s.freq() + 200 => sss.freq;
500::ms => now;
}

Doing this also makes it possible to sort the dac amplitude issues by altering the gain.

SinOsc s => Gain g => dac;
SinOsc ss => g;
SinOsc sss => g;
0.3 => g.gain;
while(1)
{
Std.rand2f(300,600) => s.freq;
s.freq() + 100 => ss.freq;
s.freq() + 200 => sss.freq;
500::ms => now;
}

I think this block of code provides an easy to follow introduction to the ChucK programming language.

Finally to finish the example off I like to expand the code to include to demonstrate the use of functions and sporking.

adc => Gain gg => blackhole;

SinOsc s => Gain g => dac;
SinOsc ss => g;
SinOsc sss => g;

function void linker()
{
while(1)
{
gg.last() => g.gain;
2::ms => now;
}
}

spork ~ linker();

while(1)
{
Std.rand2f(300,600) => s.freq;
s.freq() + 100 => ss.freq;
s.freq() + 200 => sss.freq;
500::ms => now;
}

So I think thats a good way to start off with ChucK.

Posted in ChucK, Live Coding | Tagged | Leave a comment

ICMC UnConf 2011

So the International Computer Music Conference ( ICMC ) 2011 is rolling into Huddersfield at the end of July which is pretty exciting. Along side the formal ICMC conference the Inclusive Improv is hosting the UnConference.

An UnConference is an opportunity to meet in a more informal environment without the rigid structure of conference proceedings. The idea being that informal discussion are as valuable as more formal arrangements.

I am really excited to be part of the convening committee for the UnConference as I relish the opportunity to organise such a cool gathering of people.

This year we have tried a couple of new ideas out, on the wiki you are invited to propose a topic ahead of time and using FaceBook Like buttons you can indicate your support for a topic.

So why not get involved and check it out and if you are around Huddersfield make sure you look me up.

Posted in News, Research | Leave a comment

ChucK an Obvious Method

So at the inclusive improv Improv Session this evening a really obvious idea hit me for coding within ChucK.


adc => Gain g => blackhole;

while(1)
{
g.last() => (Ugen.parameter-of-choice)
1::samp => now;
}

Doing this allows you to take the audio input amplitude value and map onto any appropriate resolution Ugen value.

So you can use the audio input as an amplitude control on a synth like this;


adc => Gain g => blackhole;
SinOsc s => Gain gg => dac;
while(1)
{
g.last() => gg.gain;
1::samp => now;
}

Also to provide variation the amplitude values can scaled


g.last() * 0.8 => gg.gain;

Finally the obvious inversion;


1.0 - (g.last() * 0.8) => gg.gain;

As always I was using my lc script so the changes were recorded in a git respiratory available online here.

Posted in ChucK, Live Coding | Leave a comment

Git and Chuck Live Coding

As part of some commercial work I have been doing I have been working in a team using Git for version control. The lc script I wrote has been providing me with a version history of my performances and rehearsal with ChucK but I think it would also offer the opportunity to distribute the code in real time between performers.

I envision a performance which is a collaboration between players passing code between each other using Git and potential modifying each others code.

Perhaps the insertion of code into ChucK VM could only happen after a pull request, though ChucKs lack of support for public code could make this difficult to work with. Tough a pull request after code insertion would be effective. The combined could then be pushed.

I think this could be an interesting performance so I am going to propose it for the ICMC unConf in Huddersfield this August 2011.

Posted in ChucK, Live Coding, Research | Leave a comment

An Argument About Languages

So recently a rather interesting Facebook discussion was kicked off but an article discussing Max/MSP. The discussion is trapped inside Facebook but the articles is available online here.

It is an interesting read the discussion about perceived value of items based on cost and why Max continues to enjoy the popularity that it does.

Personally I have found my use of Max declining even though I have continued to teach it. (Interestingly I think this has aided my teaching of the language as rather than having a focused area of current use I have instead focused on maintaing a broad methodology for others to extend.)

The reasons I started using Max are simple; it along side C was what I was taught.

In a race between C and Max you get something fun much quicker in Max, sliders, dials flashing lights and noises and I still believe that is Max’s best feature, the rapid prototype and quick to build methodology. (In C I built a calendar!)

However while the graphical interface is very quick to learn it does create massive complexities out of simple tasks and perhaps hinders a more detailed understanding of programming. ChucK, the text language I found is increasingly my first choice and while there are a number of reasons I think is the precision of the text interface and the language behaviour is facilitates which has caused this.

In the article the example of poly~ is given to illustrate the problems  of the graphical language and within ChucK polyphonic behaviour is a matter of function reuse or class instantiation, clear programming methods.

I understand that the choice of tool is a personal one so all I am really suggesting is that if you have never considered a text based language it might be worth giving it a try.

Posted in ChucK | Leave a comment

Live Coding Git Commits within HELOpg

I have been working with the git versioning system for the last 70 days and for some of that time using the lc shell script. So I though it would be worth having a review of the commits.

You can copy, see, fork, examine the complete record on github.

In 70 days I have made 213 Commits, with 843 added lines, 343 removed lines all of these within rehearsal in HELOpg.

The Git summary

Report Period
2011-02-17 15:49:29 to 2011-04-27 20:40:53
Age
70 days, 6 active days (8.57%)
Total Files
23
Total Lines of Code
500 (843 added, 343 removed)
Total Commits
213 (average 35.5 commits per active day, 3.0 per all days)

The commit diffs

The commit diffs show the changes in files when the diffs were created many of these are small changes as sonic parameters are changed within the performance.

Continue reading

Posted in HELO, Live Coding, Research | Leave a comment

Live Coding ChucK and Git

Finally had a bit of time to look at an idea I had had regarding documenting live-coding.

Thought it would be interesting to create a what I am calling a livecoding interface extension for ChucK that includes automatic code versioning.

Turns out that it is doable use a simple bash script and git versioning.

Use
To use you require a working git install and the files you are coding in to be under versioning.

lc file.ck
Adds chuck code to vm and runs git commit

lc file.ck 2
Replaces shred 2 with chuck code and runs git commit

Bash Code (file named lc)

#!/bin/bash

# File provides version interface via git for Chuck
# no args error
# 1 args add file and run git commit
# 2 args replace shred with file and run git commit

if [ -z "$1" ]; then #no args
echo $0 please submit file or file and shred number to replace
exit
elif [ -z "$2" ]; then # single filename argh add file and do git commit
FILE=$1
echo add $FILE
chuck + $FILE
git commit -a -m "live coding record"
exit
else
FILE=$1
ID=$2
echo replace shred $2 with $FILE
chuck = $ID $FILE
git commit -a -m "live coding record"
fi

In Use

You can see an online git repository record of a ChucK live coding performance as part of a HELOpg rehearsal online here.

Things to do

My intention is to expand the functionality of the script to track revision use within the VM.

I also intend to explore the distributed versioning functionality within a live performance.

Posted in Live Coding, Research | Leave a comment

Sonic Event II – Live Coding Video

Found a great video of the TOPLAP live coding gig I played at back in October; shot and edited by Richard Bolam.

Sonic Event II – Access Space, Sheffield, UK – 29th October, 2010

Features excerpts of performances by Alex McLean and myself, Neil C. Smith and Dan Stowell.

Posted in Events, Live Coding | Leave a comment