sudo apt-get -y --force-yes install supercollider ruby1.9.3 libqscintilla2-l10n libqscintilla2-dev qt4-dev-tools cmake libffi-dev qt4-qmake libqt4-dev
git clone [email protected]:samaaron/sonic-pi.git
| ;; this didn't work for me. use lein instead | |
| > clojure -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.8.0"} overtone {:mvn/version "0.10.3"}}}' -r |
| use_bpm 145 | |
| # Our chord sequence | |
| p1 = [chord(:E3,"minor7"), | |
| chord(:G3,"major7"), | |
| chord(:A3,"minor7"), | |
| chord(:G3,"m9"), | |
| chord(:E3,"m9"), | |
| chord(:C3,"minor7"), |
| SuperDirt.start | |
| ( | |
| //forward OSC message (localhost, port 3333) | |
| var addr = NetAddr.new("127.0.0.1", 3333); | |
| OSCdef(\tidalplay2, { | |
| arg msg; | |
| addr.sendMsg("/play2", *msg); | |
| }, '/play2', n); | |
| ) |
| class SonicPiOsc { | |
| String synth; | |
| String[] paramList; | |
| void perse(OscMessage msg) { | |
| if (msg.checkAddrPattern("/log/multi_message")) { | |
| String[] allList = split(msg.get(5).stringValue(), ','); | |
| String[] synthList = split(allList[0], ':'); | |
| synth = synthList[1]; | |
| String str = msg.get(5).stringValue(); |
| use_bpm 140 | |
| #kick | |
| live_loop :a do | |
| s = (ring 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.75).tick(:t1) | |
| k = (ring :bd_ada, :bd_haus, :bd_zum).tick(:t2) | |
| sample k, start: 0.06, finish: 1, sustain_level:0, decay:0.2, amp: 3, rate: 0.9 | |
| sleep 1 #1 | |
| end |
| def nested_beat(el, stepsize=0) | |
| if el.kind_of? Array | |
| el.map {|x| nested_beat(x, (stepsize.zero? ? 1.0 : stepsize/el.length)) } | |
| else | |
| {level: stepsize, step: el} | |
| end | |
| end | |
| def get_nested_beat(pattern) | |
| nested_beat(pattern).flatten.map do |step| |
| (ns overtone.examples.compositions.piano-phase | |
| (:use overtone.live | |
| overtone.inst.sampled-piano)) | |
| ;; Steve Reich's Piano Phase | |
| (def piece [:E4 :F#4 :B4 :C#5 :D5 :F#4 :E4 :C#5 :B4 :F#4 :D5 :C#5]) | |
| (defn player | |
| [t speed notes] |
sudo apt-get -y --force-yes install supercollider ruby1.9.3 libqscintilla2-l10n libqscintilla2-dev qt4-dev-tools cmake libffi-dev qt4-qmake libqt4-dev
git clone [email protected]:samaaron/sonic-pi.git
| # DUBSTEP | |
| # Combines ideas from my other gists | |
| current_bpm = 140.0 | |
| use_bpm current_bpm | |
| # WOBBLE BASS | |
| define :wob do | |
| use_synth :dsaw | |
| lowcut = note(:E1) # ~ 40Hz | |
| highcut = note(:G8) # ~ 3000Hz |
| ( | |
| s.waitForBoot { | |
| var rootPath, window, view, | |
| drawBuf, bufnum, sound, task, | |
| width, height, fps, curX, curY, pixSize, | |
| processFunc, loadFile; | |
| // initial settings | |
| rootPath = "/path/to/root/dir"; | |
| pixSize = 5; |