Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. //: a text:
  2. (
  3. {
  4. var text;
  5. text = "The tao that can be told
  6. is not the eternal Tao
  7. The name that can be named
  8. is not the eternal Name.
  9. The unnamable is the eternally real.
  10. Naming is the origin
  11. of all particular things.
  12. Free from desire, you realize the mystery.
  13. Caught in desire, you see only the manifestations.
  14. Yet mystery and manifestations
  15. arise from the same source.
  16. This source is called darkness.
  17. Darkness within darkness.
  18. The gateway to all understanding.";
  19. text.size; // 432 characters;
  20. text.split($ ).size; // 60 words
  21. /*
  22. // version 1 - first test
  23. // each char is a midinote
  24. text do: { | char |
  25. [char, char.ascii].postln;
  26. (midinote: char.ascii).play;
  27. 0.2.wait;
  28. };
  29. "THE END".postln;
  30. */
  31. // verson 2: play each word as a phrase
  32. text.split($ ) do: { | word |
  33. var transposition;
  34. transposition = 12.rand;
  35. word do: { | char |
  36.  
  37. // [char, char.ascii].postln;
  38. (midinote: char.ascii + transposition, dur: 0.1).play;
  39. (transposition + 1 / 12).wait;
  40. };
  41. (midinote: word.ascii, dur: word.size / 10).play;
  42. // pause 1 second between words.
  43. ((word.size/10)+0.4).wait;
  44. };
  45. }.fork;
  46. )
  47. //:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement