IF3Si/scd/IF3Si.scd

128 lines
2.8 KiB
Plaintext

(/*
This file is part of "Interface Fractures III - Silicon".
Copyright (c) 2015 Luka Prinčič, All rights reserved.
This program is free software distributed under
GNU General Public Licence. See COPYING for more info.
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Interface Fractures III - Silicon
(c) Luka Prinčič / Nova deViator
nova@deviator.si
SuperCollider main patch
.______________________ _________.__
| \_ _____/\_____ \ / _____/|__|
| || __) _(__ < \_____ \ | |
| || \ / \/ \| |
|___|\___ / /______ /_______ /|__|
\/ \/ \/
*/
// Be nice. Say hi!
postln("\n\n
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>> Hello. Starting Interface Fractures III - SILICON <<<
.______________________ _________.__
| \\_ _____/\\_____ \\ \/ _____\/|__|
| || __) _(__ < \\_____ \\ | |
| || \\ / \\/ \\| |
|___|\\___ / /______ /_______ /|__|
\\/ \\/ \\/
");
Server.default.waitForBoot {
// midi init & stuff:
(
var p5osc;
var midiFunc;
//MIDIIn.connectAll;
p5osc = NetAddr.new("zarquon", 12000);
midiFunc = MIDIFunc.cc({
arg val1, val2;
postln("sending: /ctlin " + val2 + " " + val1);
// we need to send /ctlin CCnum CCvalue
p5osc.sendMsg("/ctlin", val2, val1);
}, (0..127)); // match all cc (from 1..127)
)
midiFunc.free; // cleanup
p5osc.disconnectAll
MIDIIn.findPort;
MIDIClient.init(1,0);
MIDIClient.sources;
MIDIIn.connect("Renoise MIDI Output", "out0");
// where are we?
var dir = PathName(thisProcess.nowExecutingPath).pathOnly;
// this might go to separate file at some point... ---------------------|
// will load samples for granular synthesis
// var dir = PathName(thisProcess.nowExecutingPath).pathOnly; //
var granSmp = PathName(dir +/+ "../smp/granul/").files;
var granBfr = List();
postln("\n~~~ Loading samples for granular synthesis ..." );
granSmp.do({ |item, i|
postln(" " + i + "" + item.folderName +/+ item.fileName);
granBfr.add(Buffer.readChannel(s, item.fullPath, channels:[0])); // [0] forces mono!
});
postln("");
// ---------------------------------------------------------------------|
// what are the files?
~files = List[
"sdefs.scd", // SynthDef definitions
"snd_lines.scd", // converting Si spectra lines to sound
"gui_core.scd", // basic general GUI setup
"gui_chaos.scd", // chaos tab
"gui_granul.scd", //
"gui_main.scd"
];
// for each file in list, load/execute it
~files.do({|item, i| this.executeFile(dir +/+ item) });
}
)
//s.meter;
//s.plotTree;
//EnvirGui