Skip to content

Instantly share code, notes, and snippets.


Xavier Riley xavriley

View GitHub Profile
xavriley /
Last active Jan 27, 2021
Using vim on Bela
xavriley / vimrc
Last active Aug 28, 2020
June 2020 vimrc
View vimrc
" Vim config
" 2020
" see ~/.config/nvim/init.vim for nvim stuff
set shell=/bin/bash
" set shell=$SHELL
packadd minpac
call minpac#init()
View gist:fec3da354d726779fcbb2fecc46a19ec
This is Google's cache of It is a snapshot of the page as it appeared on 4 May 2020 03:03:17 GMT. The current page could have changed in the meantime. Learn more.
Full versionText-only versionView source
Tip: To quickly find your search term on this page, press Ctrl+F or ⌘-F (Mac) and use the find bar.
Cymbal synthesis tutorial
Dan Stowell
This tutorial describes an approach to synthesising decent-sounding cymbals, in a way that is efficient enough for a real-time synthesis system.
xavriley /
Created Jun 22, 2018
Working with Carabiner (Ableton Link) from Ruby

Working with Carabiner (Ableton Link) from Ruby

This script currently requires Ruby >= 2.4 and Mac OS 10.12 or higher

Download Carabiner from here (releases page has builds for OSX and Windows)

Run it in a terminal somewhere.

Download the Link repo and build the examples:

xavriley /
Created Jun 18, 2018
Sonic Pi Vocoder Prototype

Prototype of vocoder on Sonic Pi

Demo here: Original voice input here:

This is a demo of a simple effects synth using the UGen from SuperCollider. This is a fairly primitive vocoder implementation made of a bunch of bandpass filters which are "tuned" to various frequencies.

The results are mixed, but it's difficult to get a decent reproduction of the words from this.

To get T-Pain/Imogen Heap style auto-tune it would be necessary to write a different algorithm probably using a technique called PSOLA which is described at the following links:

xavriley /
Last active Mar 23, 2018
Gossip with Xbees

Gossip protocol with XBee and Arduino - Personal Report

Early on in the project we decided to divide some of the requirements from the specification between ourselves. Mirela and I looked at implementing the Gossip algorithm in parallel to the work that Luis was doing on wiring the sensors and transferring the sensor data.

The first stage was to write some pseudo-code outlining the stages of the gossip algorithm. This was done in discussion with Mirela while looking over the paper and other resources we had available. This was important to gain understanding of the key steps.

Initially we decided to try implementing half of the algorithm each with me taking the broadcasting phase and Mirela implementing the receiving phase. Given that I had marginally more experience working with C we later revised these so that I handled both parts of the implementation to allow Mirela to focus on other deliverables.

The Code

xavriley /
Created Dec 4, 2017
Sonic Pi on Docker on Heroku research


developer@5b0666c5c640:~$ jackd -r -t 100000  -d dummy -r 44100
jackd 0.124.1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
xavriley /
Created Nov 13, 2017
SuperCollider wavetable experiments for Sonic Pi
// 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 ="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 / dont_drop_the_bass.rb
Created Jul 8, 2017
Don't Drop the Bass - Source code with comments - Brighton Ruby 2017
View dont_drop_the_bass.rb
# ❤️ Brighton Ruby
# This code uses some features from the pre-release of Sonic Pi,
# due out later this month (touch wood!).
# If you just can't wait for the release but want to try it yourself
# you can either build the Sonic Pi master branch from source (pros: free, cons: hard)
# or share some love and contribute to the Patreon page to support Sonic Pi's development
# That will give to access to the latest pre-release versions