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.

48 lines
1.5 KiB

4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
  1. s.quit;
  2. s.boot;
  3. (
  4. var pulse, playString, theString;
  5. SynthDef.new(\DTMF, { arg f1, f2, out; Out.ar(out, [SinOsc.ar(f1) + SinOsc.ar(f2), SinOsc.ar(f1) + SinOsc.ar(f2)])}).add;
  6. TempoClock.default.tempo = 100;
  7. pulse = { arg f1, f2;
  8. f = Synth.new(\DTMF, [\f1, f1, \f2, f2]);
  9. TempoClock.sched(8, { f.free; });
  10. };
  11. playString = {|data|
  12. r = Routine({
  13. data.do({ arg item, i;
  14. switch(item)
  15. {$0} {pulse.value(941, 1336)}
  16. {$1} {pulse.value(697, 1209)}
  17. {$2} {pulse.value(697, 1336)}
  18. {$3} {pulse.value(697, 1477)}
  19. {$4} {pulse.value(770, 1209)}
  20. {$5} {pulse.value(770, 1336)}
  21. {$6} {pulse.value(770, 1477)}
  22. {$7} {pulse.value(852, 1209)}
  23. {$8} {pulse.value(852, 1336)}
  24. {$9} {pulse.value(852, 1477)}
  25. {$A} {pulse.value(697, 1633)}
  26. {$B} {pulse.value(770, 1633)}
  27. {$C} {pulse.value(852, 1633)}
  28. {$D} {pulse.value(941, 1633)}
  29. {$*} {pulse.value(941, 1209)}
  30. {$#} {pulse.value(941, 1477)};
  31. 10.yield;
  32. })
  33. });
  34. TempoClock.default.sched(0, r);
  35. };
  36. theString = File.readAllString("/home/annwan/code/projects/ccc3/tools/sounder/text.txt");
  37. theString.postln;
  38. playString.value(theString);
  39. s.record(path: "/home/annwan/code/projects/ccc3/tools/sounder/text.wav", numChannels: 1);
  40. TempoClock.default.sched(theString.size * 10, {
  41. s.stopRecording;
  42. theString = File.readAllString("/home/annwan/code/projects/ccc3/tools/sounder/name.txt");
  43. theString.postln;
  44. playString.value(theString);
  45. s.record(path: "/home/annwan/code/projects/ccc3/tools/sounder/name.wav", numChannels: 1);
  46. TempoClock.default.sched(theString.size * 10, {s.stopRecording;});
  47. });
  48. )