Cursed Conlang Circus 3 submission
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

40 lines
1.2 KiB

s.quit;
s.boot;
(
var pulse, playString, theString;
SynthDef.new(\DTMF, { arg f1, f2, out; Out.ar(out, [SinOsc.ar(f1) + SinOsc.ar(f2), SinOsc.ar(f1) + SinOsc.ar(f2)])}).add;
TempoClock.default.tempo = 100;
pulse = { arg f1, f2;
f = Synth.new(\DTMF, [\f1, f1, \f2, f2]);
TempoClock.sched(12, { f.free; });
};
playString = {|data|
r = Routine({
data.do({ arg item, i;
switch(item)
{$0} {pulse.value(941, 1336)}
{$1} {pulse.value(697, 1209)}
{$2} {pulse.value(697, 1336)}
{$3} {pulse.value(697, 1477)}
{$4} {pulse.value(770, 1209)}
{$5} {pulse.value(770, 1336)}
{$6} {pulse.value(770, 1477)}
{$7} {pulse.value(852, 1209)}
{$8} {pulse.value(852, 1336)}
{$9} {pulse.value(852, 1477)}
{$A} {pulse.value(697, 1633)}
{$B} {pulse.value(770, 1633)}
{$C} {pulse.value(852, 1633)}
{$D} {pulse.value(941, 1633)}
{$*} {pulse.value(941, 1209)}
{$#} {pulse.value(941, 1477)};
15.yield;
})
});
TempoClock.default.sched(0, r);
};
theString = File.readAllString("/home/annwan/code/projects/ccc3/tools/sounder/text.txt");
playString.value(theString);
s.record(path: "/home/annwan/code/projects/ccc3/tools/sounder/text2.wav", numChannels: 1);
TempoClock.default.sched(theString.size * 15, {s.stopRecording;});
)