Wednesday, October 17, 2007

Week 10

Creative Computing : GUI(3)

Keywords and lecture Notes:

* BoxGrid.help.rtf :
* Grid.help.rtf :
* MIDIKeyboard.help.rtf :
* ParaSpace.help.rtf :
* ScrollNumberBox.help.rtf :
* Software, IXI 2006, Experimental Music Software -
Backyard, IXI, 2007... www.ixi-software.net

Task of the Week:
===================================================================
/*
VarSaw : Variable duty saw
Lag2 : It is equivalent to Lag.kr(Lag.kr(in, time), time), thus resulting in a smoother transition. This saves on CPU as you only have to calculate the decay factor once instead of twice.
*/
// Sound Source
(
SynthDef("saw+tri",{|freq, amp=0.90|

var signal,
signal1;

signal = VarSaw.ar(Lag2.kr(freq, 60.1), 0, amp)!2;
signal1 = LFTri.ar(Lag3.kr(freq, 62.1), 0, amp)!2;
signal = (signal * signal1) ;
Out.ar(0, signal);
}).load(s);
)
/* List is a subclass of SequenceableCollection with unlimited growth in size.
SCWindow : User interface Window
ParaSpace is a GUI widget, similar to the SCEnvelopeView, but has some
additional functionality and it is easier to use. One can select many nodes
at the same time and drag them around.
A Synth is the client-side representation of a synth node on the server. It represents a single sound producing unit.
*/
// Set up the ParaSpace
(
l = List.new;
w = SCWindow("ParaSpace", Rect(10, 500, 800, 300));
a = ParaSpace.new(w, bounds: Rect(20, 20, 760, 260));

76.do({arg i;
a.createNode(3+(i*10), 130);
l.add(Synth("saw+tri", [\freq, 150, \amp, 0.04])); // starting frequency
});
75.do({arg i;
a.createConnection(i, i+1);
});

/* Task is a pauseable process. It is implemented by wrapping a PauseStream around a Routine. Most of it's methods (start, stop, reset) are inherited from PauseStream.
SystemClock is more accurate, but cannot call Cocoa primitives.
AppClock uses NSTimers but is less accurate,it can call Cocoa primitives.
*/
t = Task({
var d;
inf.do({arg i;
76.do({arg j;
d = ((i*(j/100)).sin*120)+130;
a.setNodeLoc_(j, 3+((j%76)*10), d);
l[j].set(\freq, 500+(400 - (d*4))); // emerging frequency,travelling range
});
0.25.wait;
})
}, AppClock);
t.start;
)
t.stop;
===========================================================

References :
Referenes:
* Haines.Christian."Workshop-10-sem2 conducted on GUI(3) .Programming with SuperCollider".11 October'2007.Electronic Music Unit.University of Adelaide, South Australia.
* IXI softwares, www.ixi-software.net
* McCartney , James et al . 2007,SuperCollider Inbuilt Help.
* Source Forge, http://supercollider.sourceforge.net/

No comments: