Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View xavriley's full-sized avatar

Xavier Riley xavriley

View GitHub Profile
@xavriley
xavriley / clyde_stubblefield.rb
Created June 10, 2014 21:15
Funky drummer with Sonic Pi
# The funky drummer
# The aim here is to experiment with
# a) sequencing drums
# b) playing with 'time feel' which is
# music-speak for how the beat feels,
# ranging from robotic (0.0 swing_time)
# to ultra funky Fresh Prince of Bel Air
# theme tune style (0.2+ swing_time)
current_bpm = 180.0
@xavriley
xavriley / pyin-lf.patch
Created January 17, 2022 09:25
pYin patch for detecting low frequencies
commit 6ed838b60173dc354fcb432e27bccb3a7a1e5769
Author: Xavier Riley <xavriley@hotmail.com>
Date: Mon Jun 28 12:47:19 2021 +0100
Reduce min frequency detectable from 61Hz to 22Hz
diff --git a/LocalCandidatePYIN.cpp b/LocalCandidatePYIN.cpp
index fc69308..4f04fbc 100644
--- a/LocalCandidatePYIN.cpp
+++ b/LocalCandidatePYIN.cpp
@xavriley
xavriley / kindle_4_vnc.md
Created July 6, 2015 11:32
Setting up VNC on a Kindle 4
@xavriley
xavriley / README.md
Created October 20, 2015 11:58
"A Protocol for Packet Network Intercommunication" - VINTON G. CERF AND ROBERT E. KAHN (Plain text for Kindle, ereaders, ipads etc)
@xavriley
xavriley / stella.ly
Last active October 1, 2021 14:34
Example of using LilypondExport to produce MusicXML from Lilypond. See https://music.stackexchange.com/a/115341/77453 for instructions
% LilyBin
\version "2.18.2"
\include "oll-core/package.ily"
\loadPackage lilypond-export
opts.exporter = #exportMusicXML
\score{
@xavriley
xavriley / wavetable_stuff.sc
Created November 13, 2017 08:20
SuperCollider wavetable experiments for Sonic Pi
s.boot
// BEGIN code to convert AKWF wavetables from 600 samples in length to 1024
// because VOsc3 needs a buffer which is a power of two to work properly
// this pipes in stdout from ls
(
var p, l;
p = Pipe.new("find ~/Projects/sonic-pi/etc/wavetables/AKWF/AKWF_0001 -iname *.wav", "r"); // list directory contents in long format
l = p.getLine; // get the first line
@xavriley
xavriley / README.md
Created February 11, 2016 09:44
Emulating the 2A03 NES sound chip in SuperCollider
@xavriley
xavriley / README.md
Created October 19, 2015 12:19
MIDI with Sonic Pi on OSX

Warning

These instructions are mainly for my own personal reference and should not be considered a supported feature of Sonic Pi. For experimentation only. Assumes OSX 10.10

  1. Setup a virtual midi channel on OSX

This is sometimes referred to as a "loopback" device and it should allow the various software applications to communicate.

  • Open /Applications/Utilities/Audio\ MIDI\ Setup.app/ and go to "Window > Show MIDI studio".
# 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
@xavriley
xavriley / wobwob.rb
Created June 10, 2014 21:30
Standalone Sonic Pi wobble bass
# Defining standalone wobble
# WOBBLE BASS
define :wob do |note, no_of_wobs, duration|
# using in_thread so we don't block everything
in_thread do
use_synth :dsaw
lowcut = note(:E1) # ~ 40Hz
highcut = note(:G8) # ~ 3000Hz