Skip to content

Instantly share code, notes, and snippets.

@Nanomancer
Nanomancer / transmission.rb
Last active December 1, 2019 13:17
Sonic Pi code (Ruby) for piece entitled 'Transmission' based around MIDI note tuned resonators
## Transmission - Origin Unknown -Tuned Resonators in C minor
## Random Seed Version: 746742
## Coded by Nanomancer - Distributed under Creative Commons Non-Commercial Attribution license - :)
## 26.03.2016
## Watch a video produced with screen grabs of the code and Nebulae:
## https://www.youtube.com/watch?v=5fwGHAdoaXA&feature=youtu.be
#######################
max_t = 8 # Adjust the run time of the piece
# Alexandre rANGEL
# "raining rage" (v11)
# www.quasecinema.org
# 10-Mar-2016
# Sonic Pi 2.9
arrangement = true
mybpmbase = 160
mybpm = mybpmbase
use_bpm mybpm
@gnachman
gnachman / iterm.scpt
Last active April 8, 2023 23:42
Replace /Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/iterm.scpt with this.
set itermRunning to (application "iTerm" is running)
set scriptPath to quoted form of POSIX path of ((path to me as text) & "::" & "start.sh")
set user_shell to do shell script "dscl /Search -read /Users/$USER UserShell | awk '{print $2}'"
tell application "iTerm"
activate
if not (exists window 1) or (itermRunning = false) then
reopen
end if
@rbnpi
rbnpi / SP_RotatingBinaryRhythms.rb
Last active January 31, 2016 05:23
SP_RotatingBinaryRhythms uses an idea from http://bernhardwagner.net/musings/RPABN.html developed to give four sets of rotating rhythms playing together. Tested on Pi2 and Mac. Hear it at https://soundcloud.com/rbnman/sp-rotatingbinaryrhythms
#Rotating binary rhythms by Robin Newman, January 2016
#This piece was inspired by an article I read at http://bernhardwagner.net/musings/RPABN.html
#I played with the idea and extended it to give the current piece.
#set_sched_ahead_time! 4 #I set this when recording on a Pi2 to prevent errors
use_debug false
######### three user settings below ###########
rvol=0.6 #balance these two vol settings to taste (0-1)
lvol=1
numpasses=4 #set for number of passes required (pattern repeats after 4 passes)
@mattdesl
mattdesl / tile-folder.js
Last active January 23, 2016 16:43
devtool script to tile images into a single image
// install with:
// npm i -g devtool
// npm i img javascript-natural-sort electron-canvas-to-buffer
//
// run:
// devtool tile-folder.js -qch
var fs = require('fs')
var path = require('path')
var loadImage = require('img')
anonymous
anonymous / funky_bells.rb
Created November 18, 2015 05:30
PROG_DURATION = 2.0
chords = [
c1 = chord(:c, :major7),
c2 = chord(:f, :major7),
c3 = chord(:d, :minor7),
c4 = c1,
]
live_loop :main do
@hzulla
hzulla / sonicpi-crash-course.txt
Last active May 9, 2023 09:25
Crash into Sonic Pi: Learn to code music in less than 30 minutes
# -------------------------------------------
# CRASH INTO SONIC PI!
# Learn to code music in less than 30 minutes
# -------------------------------------------
# - download Sonic Pi from sonic-pi.net
# - copy and paste these code snippets
# - change and experiment with the snippets
# - go!
# -------------------------------------------
# These snippets were made for a workshop to
@darinwilson
darinwilson / sonic_pi_examples.txt
Last active June 8, 2025 07:10
Sonic Pi Examples
##############################################
## Example 1 - play a note
play 60
##############################################
## Example 2 - play 4 random notes
4.times do
play rrand_i(60, 90)
sleep 0.5
@darinwilson
darinwilson / SonicPiDrumMachine
Last active March 2, 2024 20:11
Sonic Pi Drum Machine
#########################################
## Sonic Pi Drum Machine
## coded by Darin Wilson
##
use_bpm 95
in_thread(name: :drum_machine) do
# choose your kit here (can be :acoustic, :acoustic_soft, :electro, :toy)
@samaaron
samaaron / dnb.rb
Last active August 23, 2020 08:10
Derivative Drum and Bass
# Super simple drum and bass
# Coded by Sam Aaron w/ Sonic Pi
# To play: download Sonic Pi from the link below, paste the code in and hit Run
# http://sonic-pi.net
use_bpm 100
live_loop :amen_break do