This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns overtone-chrismas.core | |
(:use [overtone.live])) | |
(definst beep [freq 440] | |
(let [env (env-gen (perc 0.1 0.2) :action FREE)] | |
(* env (sin-osc freq)))) | |
; ドレミの周波数を定義 | |
(def doremi {:none 0 | |
:do :c3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns tarai.core | |
(:use [overtone.live])) | |
;; basic.clj より | |
(defsynth foo [freq 200 dur 0.5] | |
(let [src (saw [freq (* freq 1.01) (* 0.99 freq)]) | |
low (sin-osc (/ freq 2)) | |
filt (lpf src (line:kr (* 10 freq) freq 10)) | |
env (env-gen (perc 0.1 dur) :action FREE)] | |
(out 0 (pan2 (* 0.1 low env filt))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn mk-tmp-dir! | |
"Creates a unique temporary directory on the filesystem. Typically in /tmp on | |
*NIX systems. Returns a File object pointing to the new directory. Raises an | |
exception if the directory couldn't be created after 10000 tries." | |
[] | |
(let [base-dir (file (System/getProperty "java.io.tmpdir")) | |
base-name (str (System/currentTimeMillis) "-" (long (rand 1000000000)) "-") | |
tmp-base (mk-path base-dir base-name) | |
max-attempts 10000] | |
(loop [num-attempts 1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns examples.satie | |
(:use [clojure.core.match :only [match]] | |
[overtone.live] | |
[overtone.inst sampled-piano]) | |
(:require [polynome.core :as poly])) | |
;;Erik Satie Gnossienne No. 1 | |
(def phrase1a [:iii :v :iv# :iii :iii :ii# :iii :ii#]) | |
(def phrase1b [:iii :v :iv# :iii :v# :vi :v# :vi]) | |
(def phrase1c [:iii :v :iv# :iii :iii :ii# :i :vii- :vi- :vii- :vi- :vii- :i :vii- :vii- :vi-]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns mostly.lazy.dubstep | |
(:use [overtone.live] | |
[overtone.helpers.file] | |
[clojure.core.match :only [match]] | |
[polynome.core :as poly])) | |
;;Ian Hall's drum pack: http://www.freesound.org/people/ianhall/packs/691/ | |
(def drum-path "~/Desktop/samples/drums") | |
(def hhat-path (mk-path [drum-path "13246__ianhall__hihat-closed.aif"])) | |
(def snar-path (mk-path [drum-path "13253__ianhall__snare.aif"])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns audiocat | |
(:use [overtone.live] | |
[overtone.helpers.audio-file])) | |
(def samp1 (load-sample "assets/GEM4_1.aif")) | |
(def samp2 (load-sample "assets/GEM4_10.aif")) | |
(def s1-data (buffer-data samp1)) | |
(def s2-data (buffer-data samp2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This buffer is for notes you don't want to save, and for Lisp evaluation. | |
;; If you want to create a file, visit that file with C-x C-f, | |
;; then enter the text in that file's own buffer. | |
(ns overtone.studio.sequencer | |
(:use [overtone.live])) | |
(defn- long? | |
[val] | |
(when (= Long (type val)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.-.` | |
+hhhhh+` | |
+hhysyhhs | |
hs. -sh/ | |
:` `yh. | |
+ho | |
`sh: | |
/hs | |
.hhh: | |
/yhhhy/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns examples.coordination | |
(:use [overtone.live] | |
[overtone.inst.synth]) | |
(:require [polynome.core :as poly])) | |
;;ping | |
(def m (poly/init "/dev/tty.usbserial-m64-0790")) | |
(poly/on-press m (fn [x y s] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_____ __ | |
/ __ /_ _____ _____/ /_____ ____ ___ | |
/ / / / | / / _ \/ ___/ __/ __ \/ __ \/ _ \ | |
/ /_/ /| |/ / __/ / / /_/ /_/ / / / / __/ | |
\____/ |___/\___/_/ \__/\____/_/ /_/\___/ | |
Programmable Music. | |