Skip to content

Instantly share code, notes, and snippets.

💭
💻 🎨 🎵

Joseph Wilk josephwilk

💭
💻 🎨 🎵
Block or report user

Report or block josephwilk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8185995
(ns overtone.bug
(:require [overtone.midi :as midi]))
(defn ping-event [& _] (Thread/sleep 10) (print ".") (flush))
(defn- detect-midi-devices [] (midi/midi-sources))
(defn- add-listener-handles!
"Adds listener handles to send incoming messages to Overtone's event
stream. Devices that a handler can't be added to are dropped. Returns
View beethoven.clj
(ns explore-overtone.beethoven
(:use [overtone.live]))
;; Starting with this example
;; https://github.com/overtone/overtone/blob/master/src/overtone/examples/timing/internal_sequencer.clj
;; lets see about trying to get rid of the limitation on sequence
;; length.
;;
;; I'd like to create a composition outside the server in "beat space"
;; (play note N at beat B). I really enjoy working with the
View phasor-skipping-sequencer.clj
(use '[overtone.live])
(defsynth phasor-skipping-sequencer
"Supports looping and jumping position"
[buf 0 rate 1 out-bus 0 start-point 0 bar-trg [0 :tr] loop? 0 amp 1.0 cb 0]
(let [ph (phasor:ar :trig bar-trg
:rate (* rate (buf-rate-scale:kr buf))
:start 0
:end (buf-frames:kr buf)
:reset-pos start-point)
View gist:7543878
;;TB3 pack
474
(def trumpet (sample (freesound-path 2323))
(def boom (sample (freesound-path 157523))
(def shock-chord (sample (freesound-path 207365)))
(def heart-beat (sample (freesound-path 92036)))
(def group-talking (sample (freesound-path 30046)))
View gist:7511216
(use 'overtone.live)
(def harp-s (sample (freesound-path 27130)))
(def dub-s (sample (freesound-path 185943)))
(defsynth skipping-sequencer
"Plays a single channel audio buffer."
[buf 0 rate 1 out-bus 0 beat-cnt-bus 0 beat-trg-bus 0 start-point 0 bar-trg 0 loop? 0 vol 1.0]
(out out-bus (* vol (scaled-play-buf 1 buf rate bar-trg start-point loop?))))
View gist:7237222
defmodule AmTestTest do
use Amrita.Sweet
def user_pid do
{:ok, pid} = User.start_link("test")
end
#Works since user_pid is a fn that can be resolved as part of current module
fact "the truth" do
provided [Repo.find_by_email("test") |> user_pid] do
@josephwilk
josephwilk / gist:7117116
Created Oct 23, 2013
Music share @ SoundCloud
View gist:7117116
January  16th - Classic and Beginner Guitar  Brendan C & Brian W
February 20th - Working with Overtones Joe w
March 20th - Abelton Mathis P, Dominik, Ozgur
April 17th - Cubase Darius
May 15th - Signal Flow Dominik S
View gist:7098902
;Thought: Clojure destructing not supporting pattern matching means Compojure routes mix
; route matching and data extraction. Hence you validate within a route (since you want the extracted data).
;
; Route matching should support matching on the properties of the extracted data.
; A route is just a function and I want Erlang style guard statements.
;Now
(defroutes app
(GET "/impression/:x" [x] (when (valid? x) {:body "Woo hoo" :status 200}))
(ANY "*" {:status 404 :body "Not found"}))
View gist:6766732
(defmacro pandoriclet (letargs &rest body)
(let [letargs (cons '(this) (let-binding-transform letargs))]
`(let (,@letargs)
(setq this ,@(last body))
,@(butlast body)
(dlambda
(:pandoric-get (sym)
,(pandoriclet-get letargs))
(:pandoric-set (sym val)
,(pandoriclet-set letargs))
View Makefile
wget --no-clobber http://www.erlang.org/download/otp_src_R16B01.tar.gz
cd vendor && tar -k -xf ../otp_src_R16B01.tar.gz
cd vendor/otp_src_R16B01 && ./configure --without-termcap --disable-hipe --without-javac && make
wget --no-clobber -q http://dl.dropbox.com/u/4934685/elixir/v${ELIXIR_VERSION}.zip && unzip -o -qq v${ELIXIR_VERSION}.zip -d vendor/elixir
${RUN_MIX} deps.get
You can’t perform that action at this time.