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
1 _,,ddP"""Ybb,,_ | |
,dP"' `"Yb | |
,d" .gPPRg, | |
d" dP' `Yb | |
d' 8) (8 | |
8 Yb dP | |
8 "8ggg8" | |
8 __ |
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.studio.sequencer | |
(:use [overtone.live])) | |
(defn- play-sample | |
[samp time vol] | |
(at time (stereo-player samp :vol vol))) | |
(defn determine-time | |
[onset-time b-idx beat-dur num-beats] | |
(+ onset-time (* b-idx beat-dur))) |
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
user> (use 'overtone.live) | |
_____ __ | |
/ __ /_ _____ _____/ /_____ ____ ___ | |
/ / / / | / / _ \/ ___/ __/ __ \/ __ \/ _ \ | |
/ /_/ /| |/ / __/ / / /_/ /_/ / / / / __/ | |
\____/ |___/\___/_/ \__/\____/_/ /_/\___/ | |
Programmable Music. |
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 soundcodr.core | |
(:use [overtone.live] | |
[overtone.inst.synth])) | |
;;change these values to suit the environment: | |
;;------ | |
(def NUM-SYNTHS 50) | |
(def LISTENING-PORT 57110) | |
;;------ |
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 listen | |
"Register a function to be called for every byte received on the specified port." | |
([port handler] (listen port handler true)) | |
([port handler skip-buffered] | |
(let [raw-port (:raw-port port) | |
in-stream (:in-stream port) | |
listener (reify SerialPortEventListener | |
(serialEvent [_ event] (when (= SerialPortEvent/DATA_AVAILABLE (.getEventType event)) | |
(handler in-stream))))] |
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 foo | |
(:require [loom.io.ubigraph :as ubi])) | |
(ubi/clear) | |
(def idxs (doall (take 500 (repeatedly #(ubi/call :new_vertex))))) | |
(defn rand-idx [els] | |
(rand-int (count els))) |
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 boiingg.core | |
(:use | |
overtone.live | |
[clojure.contrib.seq-utils :only [indexed]]) | |
(:require [monome-serial.monome :as monome])) | |
(refer-ugens) | |
(boot) |
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
(Git:master?) λ lein deps on master(38a6c98) | |
Downloading: org/clojure/clojure/1.1.0-alpha-SNAPSHOT/clojure-1.1.0-alpha-SNAPSHOT.pom from clojure | |
Downloading: org/clojure/clojure/1.1.0-alpha-SNAPSHOT/clojure-1.1.0-alpha-SNAPSHOT.pom from clojure-snapshots | |
Downloading: org/clojure/clojure/1.1.0-alpha-SNAPSHOT/clojure-1.1.0-alpha-SNAPSHOT.pom from clojars | |
Downloading: org/clojure/clojure/1.1.0-alpha-SNAPSHOT/clojure-1.1.0-alpha-SNAPSHOT.pom from central | |
[null] An error has occurred while processing the Maven artifact tasks. | |
[null] Diagnosis: | |
[null] | |
[null] Unable to resolve artifact: Missing: | |
[null] ---------- |
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
#!/usr/bin/ruby -wKU | |
require 'rubygems' | |
require 'ya2yaml' | |
$KCODE="UTF8" | |
lines = File.readlines(ARGV[0]) | |
lines.map!{|l| l.gsub(/[;"\r\n]/, '').split(" ", 2)} | |
lines.map!{|m| [m[0], m[1].strip]} | |
lines.map!{|m| [m[0].split('-'), m[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
∴ /Users/sam | |
λ rlwrap java -cp ~/.clojure/edge/clojure-edge.jar:~/.clojure/edge/clojure-contrib-edge.jar clojure.main | |
Clojure 1.2.0-master-SNAPSHOT | |
(ns your-namespace | |
(:require clojure.contrib.command-line)) | |
java.io.FileNotFoundException: Could not locate clojure/contrib/command_line__init.class or clojure/contrib/command_line.clj on classpath: (NO_SOURCE_FILE:1) | |
your-namespace=> |