### CC3 semester 1 wk1

This weeks Super Collider excercise was a bit of a push to get through. Mainly because I had Womad all weekend and had little time to get it done. But I got it in the end. The readings weren't as strait forward as they could be but I think I deciphered it in the end. I had to look onto John Deleny's blog to discover how to post multiple times.

CC3A wk1 rtf file

// CC3 week 1 SC

(

"hmm".postln;

)

// Now it is time for some Maths

(

a = 2;

b = 2;

(a + b).postln;

)

(

// Words and Numbers Global ( tilda ~)

~time = 100;

~code = "Dead Ants";

(~time + ~code).postln;

)

(

// Words and Numbers Local

var whoSays, youCantHaveItAll;

whoSays = 100;

youCantHaveItAll = "Dead Ants";

(whoSays + youCantHaveItAll).postln;

)

(

// Function 1

f = {

arg a,b;

var frozenInTime = 9;

(a + b - frozenInTime).postln

};

f.value(5, 4);

)

(

// Function 2

f = {

arg a,b;

var whoSays, youCantHaveItAll;

whoSays = 100;

youCantHaveItAll = "Dead Ants";

(a + b - whoSays + youCantHaveItAll).postln

};

f.value (101, 99);

)

(

// Funtion 3

f = {

arg a,b;

var mooMoo, cow;

mooMoo = 9;

cow = 2;

(a * b - mooMoo / cow).postln

};

f.value (4, 7);

)

(

// Function 4

f = {

var luke, is, a, vegetarian, hippy, dude;

luke = "Lets";

is = "go";

a = "on";

vegetarian = "a";

hippy = "killing";

dude = "spree!";

(luke + is + a + vegetarian + hippy + dude).postln

};

f.value

)

(

// Function 5

f = {

arg a, b, c, d, e, f; a - b * c + d / e

};

f.value (1, 2, 3, 4, 5, 6).postln;

)

(

// Function 6

f = {

arg a, b, c, d, e;

a + b + c + d + e

} ;

f.value("Luke", "is", "a vegetarian", "hippy", "dude.");

)

(

/* Function 7 - Printing multiple times.

I have looked at John Delany's blog to figure this one out as I couldn't find out how to do this from the readings.

*/

10.do({ arg item; {"100 Dead Ants".postln; "Frozen in time".postln }.value});

)

(

// Function 8

y = 12;

q = 57;

r = 9;

v = "100 Dead Ants Floating in Time";

(y * q - r + v).postln;

)

(

// Function 9

y = { arg a, b, c, d, r, t; a + b * c - d / r * t; };

y.value(9, 3, 11, 5, 2, 6);

)

(

//Function 10

~thisIs = 5;

~myLast = 5;

~function = "Functions complete";

(~thisIs + ~myLast + ~function).postln

)

[1] Christian Haines. "Creative Computing 3: Semester 1, Week 1. Introduction to SuperCollider." Lecture presented at the Electronic Music Unit, University of Adelaide, South Australia, 6/03/2008.

## 0 Comments:

Post a Comment

<< Home