Difference between revisions of "LiveCoding"

From CCRMA Wiki
Jump to: navigation, search
m
(==)
Line 56: Line 56:
 
Code Monkey just waiting, for now<br/>
 
Code Monkey just waiting, for now<br/>
 
Code Monkey say someday, somehow<br/>
 
Code Monkey say someday, somehow<br/>
 +
 +
= Luke's Live Code: ===========
 +
 +
// LC1: squares
 +
 +
// -----------------------------------------------
 +
// bring tha noise
 +
// -----------------------------------------------
 +
 +
SqrOsc mosc => SqrOsc cosc => ADSR env => dac => Delay del => LPF flt => dac;
 +
 +
//SqrOsc mosc => SqrOsc cosc => ADSR env => dac;
 +
//env => Delay del => dac;
 +
//LPF flt => blackhole;
 +
 +
3::second => del.max;
 +
 +
2 => cosc.sync;
 +
 +
// some basic parms:
 +
 +
// pitch:
 +
Std.mtof(Std.rand2(20, 30)) => cosc.freq; 
 +
 +
// pitch variation: 
 +
Std.rand2f(5, 20) => mosc.gain;             
 +
 +
// speed of pitch variation:             
 +
1 => mosc.freq;                             
 +
 +
// delay feedback (be careful here!):
 +
0.7 => del.gain;
 +
 +
// length of delay:
 +
100::ms => del.delay;
 +
 +
// delay filter stuff:
 +
Std.rand2f(500, 2000) => flt.freq;
 +
Std.rand2f(0.5, 1.0) => flt.Q;
 +
 +
 +
// -----------------------------------------------
 +
// make time
 +
// -----------------------------------------------
 +
 +
3.1::second => dur d;                        // how long it lasts
 +
0.8 => float decay_frac;                    // what fraction is decay
 +
env.set( d*0.3, d*0.01, .5, d*decay_frac );  // attack, decay, sustain, release
 +
env.keyOn();
 +
d*(1-decay_frac) => now;
 +
env.keyOff();
 +
d*decay_frac + 2::second => now;
 +
 +
===============================

Revision as of 20:17, 21 January 2009

Page for Live Coding Examples from Luke's 12/21/2009 live-coding session

====================================================================
====================================================================

if you're bored...

http://www.youtube.com/watch?v=v4Wy7gRGgeA

Code Monkey by Jonathan Coulton

Code Monkey get up, get coffee
Code Monkey go to job
Code Monkey have boring meeting
Boring manager Rob
Rob say Code Monkey very diligent
But his output stink
His Code not functional or elegant
What do Code Monkey think?
Code Monkey think,
Maybe manager wanna write
Goddamn log-in page himself
Code Monkey not say it out loud
Code Monkey not crazy, just proud

Code Monkey like Fritos
Code Monkey like Tab and Mountain Dew
Code Monkey very simple man
Big, warm, fuzzy, secret heart
Code Monkey like you
Code Monkey like yooooouuuuu

Code Monkey hang around at front desk
Tell you sweater look nice
Code Monkey offer buy you soda
Bring you cup, bring you ice
You say no thank-you for the soda 'cause
Soda make you fat
Anyway, you busy with the telephone
No time for chat
Code Monkey have long walk back to cubicle
He sit down, pretend to work
Code Monkey not thinking so straight,
Code Monkey not feeling so great.

Code Monkey have every reason
To get out this place
Code Monkey just keep on working
See your soft pretty face
Much rather wake up, eat a coffee cake
Take bath, take nap
This job fulfilling and creative way
Such a load of crap
Code Monkey say someday he have everything
Even pretty girl, like you
Code Monkey just waiting, for now
Code Monkey say someday, somehow

Luke's Live Code: ==========

// LC1: squares

// ----------------------------------------------- // bring tha noise // -----------------------------------------------

SqrOsc mosc => SqrOsc cosc => ADSR env => dac => Delay del => LPF flt => dac;

//SqrOsc mosc => SqrOsc cosc => ADSR env => dac; //env => Delay del => dac; //LPF flt => blackhole;

3::second => del.max;

2 => cosc.sync;

// some basic parms:

// pitch: Std.mtof(Std.rand2(20, 30)) => cosc.freq;

// pitch variation: Std.rand2f(5, 20) => mosc.gain;

// speed of pitch variation: 1 => mosc.freq;

// delay feedback (be careful here!): 0.7 => del.gain;

// length of delay: 100::ms => del.delay;

// delay filter stuff: Std.rand2f(500, 2000) => flt.freq; Std.rand2f(0.5, 1.0) => flt.Q;


// ----------------------------------------------- // make time // -----------------------------------------------

3.1::second => dur d; // how long it lasts 0.8 => float decay_frac; // what fraction is decay env.set( d*0.3, d*0.01, .5, d*decay_frac ); // attack, decay, sustain, release env.keyOn(); d*(1-decay_frac) => now; env.keyOff(); d*decay_frac + 2::second => now;

===================