(def pi (str java.lang.Math/PI)) (def piPitch (replace-map pi {"1" " c$" "2" " d$" "3" " e$" "4" " f$" "5" " g$" "6" " a$" "7" " b$" "8" " >c$" "9" " g$" "." ""})) (def piDuration (.replace piPitch "$" "50ms (quant 100)")) (def aldaCode1 (.concat " midi-synth-pad-polysynth: (panning 90) o4" (.replace (.replace piDuration "D" "50ms (quant 100)") "S" "50ms (quant 99)"))) (def aldaCode2 (.concat " cello: (vol 100) " (.replace (.replace piDuration "D" "100ms (quant 100)") "S" "90ms (quant 10)"))) (def aldaCode3 (.concat " midi-choir-pad: (panning 50) o3" (.replace (.replace piDuration "D" "390ms (quant 98)") "S" "100ms (quant 100)"))) (def aldaCode4 (.concat " midi-echo-drops: (panning 40) o3" (.replace (.replace piDuration "D" "110ms") "S" "110ms"))) (def repetitions 1) (tempo! 100) (alda-code (apply str (repeat 10 aldaCode1))) cello: o1 (panning 10) (vol 60) (alda-code (apply str (repeat 5 aldaCode2))) cello: o2 (panning 100) (vol 40) (alda-code (apply str (repeat 5 aldaCode2))) cello: o2 (vol 10) (alda-code (apply str (repeat 3 aldaCode2))) (alda-code (apply str (repeat repetitions aldaCode3))) (alda-code (apply str (repeat repetitions aldaCode4))) cello: o1 (panning 10) (vol 50) (alda-code (apply str (repeat 5 aldaCode2))) cello: o2 (panning 100) (vol 40) (alda-code (apply str (repeat 5 aldaCode2)))