- Install Control on your phone (for Android, but it, or something similar, is probably available for iOS).
- Run it, tap on "menu", then "Destinations", and then the "+" symbol. For the destination URL enter the IP address of your computer running Sonic Pi, and for the destination port enter 5005, then click "Add".
- In your terminal, run the soundboard.sh script (or just copy and paste the last line). This listens on a public port and forwards any UDP packets to Sonic Pi (because Sonic Pi only listens on localhost).
- Copy and paste the soundboard.rb code into a Sonic Pi buffer and run it.
- In the Control app, tap on "Interfaces" and select "Monome Emulation".
- Tap the grid, and you should hear sounds.
- The sliders adjust volume and low-pass cutoff.
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
// ==UserScript== | |
// @name Stay signed in to MS | |
// @description Automatically click "yes" on the Microsoft "stay signed in" page that keeps appearing. | |
// @downloadURL https://gist.github.com/emlyn/2f0c9702bd83fe7d232ed58626c90ac7/raw/ms_ssi.js | |
// @updateURL https://gist.github.com/emlyn/2f0c9702bd83fe7d232ed58626c90ac7/raw/ms_ssi.js | |
// @namespace https://gist.github.com/emlyn/ | |
// @version 0.6 | |
// @author Emlyn Corrin | |
// @match https://login.microsoftonline.com/* | |
// @match https://login.live.com/* |
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
// ==UserScript== | |
// @name Databricks Workspace | |
// @description Display workspace name at top of Databricks page | |
// @downloadURL https://gist.github.com/emlyn/169af82a09c2af8d79494f8d7e7d90b1/raw/dbws.js | |
// @updateURL https://gist.github.com/emlyn/169af82a09c2af8d79494f8d7e7d90b1/raw/dbws.js | |
// @namespace https://gist.github.com/emlyn | |
// @version 0.4 | |
// @author Emlyn Corrin | |
// @match https://*.azuredatabricks.net/* | |
// @icon https://databricks.com/favicon.ico |
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
use_bpm 100 | |
root = 220 | |
chords = [[1/1.0, 5/4.0, 3/2.0], | |
[3/2.0, 15/8.0, 9/4.0], | |
[9/8.0, 45/32.0, 27/16.0], | |
[9/8.0, 3/2.0, 9/5.0], | |
[3/2.0, 2/1.0, 24/10.0], | |
[1/1.0, 5/4.0, 3/2.0]] |
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
# Requires: pip install unidecode | |
import gzip | |
import re | |
import unidecode | |
# From https://sciencenotes.org/list-elements-atomic-number/, contains: | |
# - Atomic number | |
# - Symbol | |
# - Name |
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
# I set myself a challenge to code a piece using only white noise. | |
# White noise contains equal amounts of energy at every (audible) frequency. | |
# It sounds like this: | |
#synth :noise | |
# Not very musical. | |
# But... it contains every frequency, so every possible sound or piece of music | |
# is hidden in there somewhere... you just have to filter out the parts you don't want. |
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
# The Secret Garden by Pauline Hall | |
use_synth :saw | |
use_bpm 100 | |
use_midi_defaults channel: 1 | |
# play note/chord | |
define :pl do |ns, t, p=0.8| | |
if not ns.respond_to?('each') | |
ns = [ns] |
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
let tail_y = 0 | |
let tail_x = 0 | |
let head_y = 0 | |
let head_x = 0 | |
let eaten = false | |
let score = 0 | |
let dir = 0 | |
let food_y = 0 | |
let food_x = 0 | |
let alive = false |
A self-contained version of what I have in my sonic-pi-experiments repo. It uses my play-helper and drum sequencer helpers, so here I've pasted them into the buffer so anyone can run it.
Here's a recording of it on Soundcloud.
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
# Guitar Strumming - by Emlyn | |
# This tries to work out the guitar (or ukulele etc.) fingering for arbitrary chords (and tuning). | |
# It seems to work reasonably well for basic chords, but is quite naive and probably makes many mistakes. | |
# Ideas, bug reports, fixes etc. gratefully received, just comment below, or tweet @emlyn77. | |
# Feel free to make use of this code as you like (with attribution if you feel like it, but you don't have to). | |
# Thanks to @Project_Hell_CK for fixing the tuning, and spotting that it gets chord(:f, :major) not quite right. | |
# Next note higher or equal to base note n, that is in the chord c | |
define :next_note do |n, c| | |
# Make sure n is a number |