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
live_loop :timer do | |
sleep 1 | |
sleep 1 | |
end | |
live_loop :drummer do | |
sync :timer | |
play degree(1, :A2, :major) | |
sleep 2 | |
end |
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
puts "adasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasd" | |
puts "adasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasdadasd |
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
# Live coding example for Retune conference 2014 | |
# 1) Press Run (Cmd+R) to start | |
# 2) Make changes (e.g. comment in/out various lines in :beats & :amen) | |
# 3) Press Run again (changes will only be audible from next queue point) | |
# compute loop length (4 bars), bar & quarter note durations | |
dur = sample_duration :loop_compus | |
bar = dur / 4 | |
quart = dur / 16 |
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
require 'rubygems' | |
$LOAD_PATH.unshift '/Users/josephwilk/Workspace/ruby/ashton/lib/' | |
require "ashton" | |
class TestWindow < Gosu::Window | |
NOISE_FRAGMENT =<<-END | |
#version 110 | |
// Use 3D Simplex noise, even though the shader operates on a 2D | |
// texture, since then we can make the Z-coordinate act as time. |
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
define :degrees do |degree,scale,root| | |
the_degrees = {:i => 1, :ii => 2, :iii => 3, | |
:iv => 4, :v => 5, :vi => 6, | |
:vii => 7, :_ => nil} | |
intervals = Scale::SCALE[scale] | |
intervals = intervals.cycle.take(the_degrees[degree]-1) | |
note(root) + intervals.reduce(0,:+) | |
end |
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
dir = File.dirname(File.expand_path(__FILE__)) | |
$LOAD_PATH.unshift dir + '/../lib' | |
require 'midi-jruby' | |
MIDIJRuby::Input.first.open do |input| | |
while true do | |
m = input.gets | |
$>.puts(m.inspect) | |
end |
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.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 |
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 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 |
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
(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) |
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
;;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))) |