https://kn1kn1.github.io/2016/02/06/In-N-Out-Sonic-Pi-Pt.I.html に移動しました
This file contains 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
// cf. https://github.com/brunoruviaro/SynthDefs-for-Patterns/blob/master/laserbeam.scd | |
// cf. https://gist.github.com/kn1kn1/bfb750a57895b804907c | |
( | |
SynthDef("laserbeam", { | |
arg out = 0, pan = 0.0, freq = 440, amp = 0.1, dur = 0.25; | |
var snd, freqenv, ampenv; | |
// frequency envelope | |
freqenv = Line.kr(1, 0, dur/2, doneAction: 2); | |
// amplitude envelope | |
ampenv = Line.kr(1, 0, dur/2, doneAction: 2); |
This file contains 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
// cf. https://github.com/brunoruviaro/SynthDefs-for-Patterns/blob/master/laserbeam.scd | |
( | |
SynthDef("laserbeam", { | |
arg out = 0, pan = 0.0, freq = 440, amp = 0.1, dur = 0.25; | |
var snd, freqenv, ampenv; | |
// frequency envelope | |
freqenv = Env.perc(releaseTime: dur/2).kr(doneAction: 2); | |
// amplitude envelope | |
ampenv = Env.perc(releaseTime: dur/2).kr(doneAction: 2); | |
// snd = LFTri.ar(freq: freq * freqenv, mul: ampenv); |
This file contains 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
# Stops all threads in the current buffer. | |
# @example | |
# load "~/sp-stop-util.rb" | |
# stop_current_buffer | |
# @note This method is using the Sonic Pi's internal methods and variables. | |
# SonicPi::RuntimeMethods#__current_job_info, __stop_job, __current_job_id | |
# SonicPi::Runtime#user_jobs, job_subthreads | |
def stop_current_buffer | |
current_job_info = __current_job_info |
This file contains 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
# install golang | |
pushd ~/ | |
export GOLANG_VERSION=1.5.3 | |
export GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz | |
export GOLANG_DOWNLOAD_SHA256=43afe0c5017e502630b1aea4d44b8a7f059bf60d7f29dfd58db454d4e4e0ae53 | |
curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \ | |
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ | |
&& tar xzf golang.tar.gz \ | |
&& rm golang.tar.gz |
This file contains 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 voltap.voltap | |
(:use [overtone.live])) | |
(defsynth vol [freq 440.0 rq 1.0] | |
(tap "system-vol" 60 (lag (abs (bpf (in:ar 0) freq rq)) 0.1))) | |
(def monitor-var (vol [:after (foundation-monitor-group)] 440)) | |
(defn monitor-vol | |
([] @(get-in monitor-var [:taps "system-vol"])) | |
([synth-var] @(get-in synth-var [:taps "system-vol"]))) |
This file contains 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 '[overtone.live :refer :all]) | |
(definst da-funk [freq 440 dur 1.0 amp 1.0] | |
(let [env (env-gen (adsr 0.3 0.7 0.5 0.3) | |
(line:kr 1.0 0.0 dur) :action FREE) | |
osc (saw freq)] | |
(pan2 (* osc env amp)))) | |
;;(-> osc (* env amp) pan2))) | |
(da-funk) |
This file contains 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 | |
^{:doc "Making it easy to load and play audio samples (wav or aif files)." | |
:author "Jeff Rose"} | |
overtone.sc.sample | |
(:use [clojure.java.io :only [file]] | |
[overtone.helpers lib synth] | |
[overtone.libs event deps] | |
[overtone.sc server synth ugens buffer foundation-groups node] | |
[overtone.sc.machinery allocator] | |
[overtone.sc.machinery.server comms] |
This file contains 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
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"errors" | |
"fmt" | |
"net" | |
"os" | |
"regexp" |