//reads the sputnik transmission datafiles,
or any text with numbers.
//julian rohrhuber 02/11
(
var findNumber, d, readNumber,
l, data;
a = File.openDialog("get data file", { arg
path;
f = File(path, "rb");
l = f.length;
});
d = Routine({ l.do({ f.getChar.yield
}) });
d = d.collect({ arg item; if(item.isDecDigit,
{ item.digit }, { 0 }) });
data = Array.fill(l, { d.next }).postln;
Library.put(\data,
data);
)
(
#{{
var arr, freq;
arr = Library.at(\data);
freq = Sequencer.kr({ arg i;
if(i % 20 == 0, { "".postln
});
arr.wrapAt(i).post;
}, Impulse.kr(10), 2, rrand(60,
70)).midicps;
SinOsc.ar(freq, 0, 0.1);
}.play; }.send;
)
(
#{{
var arr, freq;
arr = Library.at(\data);
freq = Sequencer.kr({ arg i;
arr.wrapAt(i)
}, Impulse.kr(10), 2, rrand(60,
70)).midicps;
SinOsc.ar(freq, 0, 0.2);
}.play; }.send;
)
(
#{{
var arr, freq;
arr = Library.at(\data);
freq = Sequencer.kr({ arg i;
arr.wrapAt(i)
}, Impulse.kr(10), 2, rrand(60,
70)).midicps;
SinOsc.ar(freq * WhiteNoise.kr(LFNoise1.kr(0.2,
0.02, 0.03), 1), 0, 0.2);
}.play; }.send;
)
(
#{{
var arr, freq;
arr = Library.at(\data);
freq = Sequencer.kr({ arg i;
arr.wrapAt(i)
}, Impulse.kr(10), 2, rrand(60,
70)).midicps;
SinOsc.ar(freq * WhiteNoise.kr(LFNoise0.kr(5.3,
0.1, 0.11), 1), 0, 0.2);
}.play; }.send;
)
(
#{{
var arr, freq;
arr = Library.at(\data);
freq = Sequencer.kr({ arg i;
arr.wrapAt(i)
}, Impulse.kr(10), 3, rrand(60,
35)).midicps;
Pan2.ar(
RLPF.ar(LFPulse.ar(freq, 0, LFNoise1.kr(0.12,
0.3, 0.5), 0.3), LFNoise1.kr(0.1,
200, 500), 0.3),
LFNoise0.kr(0.2)
)
}.play; }.send;
)
This page was created by SimpleText2Html 1.0.3 on 1-Nov-101.