Skip to content

Instantly share code, notes, and snippets.

Robin Newman rbnpi

  • Near Peterborough
Block or report user

Report or block rbnpi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rbnpi / TheTwelveDaysOfChristmas
Last active Sep 21, 2019
Extended 12 days of Christmas Sonic Pi Project based on adding harmony
View TheTwelveDaysOfChristmas
#12 days of Christmas
#based on
#tune altered slightly, based on
#I've added sustain/release for each note
#using pl function, also ability to play chords with pl
#also added simple accompaniment part.
#I cycle synth used each verse, and adjust tempo last two verses
#also added slight reverb.
#I modifiy many of the functions to allow refinements for each day,
#by utilising a days parameter.
rbnpi / polyphonicsynth.rb
Last active Sep 5, 2019
A polyphonic gated synth for Sonic Pi3 with midi keyboard input. Runs on Raspberry Pi3 or more powerful computer with Sonic Pi 3. Accompanying article and video SECOND VERSION ADDED: see comments
View polyphonicsynth.rb
#polyphonic midi input program with sustained notes
#experimental program by Robin Newman, November 2017
#pitchbend can be applied to notes at any time while they are sounding
use_debug false
set :synth,:tb303 #initial value
set :pb,0 #pitchbend initial value
kill_list=[] #list to contain notes to be killed
on_notes=[] #list of notes currently playing
ns=[] #array to store note playing references
rbnpi /
Last active Aug 26, 2019
Sonic Pi program to display lissajous figures controlled by TouchOSC. Requires SP 2.12 midi-alpha6 or later. Video with details at

This program runs on Sonic Pi midi version. It works on SP 2.12-midi-alpha6 released recently to patreon subscribers of Sam Aaron see It also requires the program TouchOSC which is available for iPad or iPhone users at a very modest price. The TouchOSC file required to run this program is contained in the file index.xml To produce the TouchOSC file, download the raw file index.xml, right click it and select the Compress function. Rename the resulting file SPlissajous.touchosc and say Yes when it asks if you want to change the file extension. Open the file using the TouchOSC editor and download it to your iPad or other compatible device using the sync function. The layout is designed to fit on an iPhone or iPad. The SPlissajousTouchOSC.rb file should be downloaded and opened or pasted into a blank Sonic Pi buffer.

rbnpi /
Created Aug 9, 2019
Mesmeric Arpeggios. Sonic Pi on a Pi4 with Arturia MatrixBrute
rbnpi / FurEliseMusicaBox.rb
Last active Jul 17, 2019
Beethoven's Fur Elise rendered with a sampled Musical Box voice on Sonic Pi. Listen at Samples can be downloaded from
View FurEliseMusicaBox.rb
#Fur Elise by Beethoven played with a sampled Musical Box voice, by Robin Newman June 2016
#array to hold note info for range 52 to 103. Each entry shows three items:
#note value, offset of sample to use in sample folder and rpitch value to use with the sample
#I recorded 12 samples from a musical box played slowly, and separated them in Audacity
#The piece is played an octave above the notated pitch.
path="~/Desktop/Samples/MusicalBox/mb2" #path to sample folder. Adjust as necessary
rbnpi / SP_LiveAudio.rb
Created Jun 20, 2017
Sonic Pi midi-alpha 7 and 8. Program illustrates used of live_audio and fx_record. For usage see the video at
View SP_LiveAudio.rb
#example using new live_audio and buffer recording features in SP midi-alpha7 and midi_alpha8
#by Robin Newman, June 2017
use_bpm 120
r2=2**(1.0/12) #scale factor to increase pitch by 1 semitone
Track=1 #track number for recording (using 4 buffers here)
rbnpi / Ortiz3-RF.rb
Created Jun 2, 2019
recerada Tercera by Diego Ortiz 916th centry) from midi by Michael Robinson. use run_file "path-to-Ortiz3-RF.rb" to run it
View Ortiz3-RF.rb
#recerada Tercera by Diego Ortiz 916th centry) from midi by Michael Robinson
#converted for Sonic Pi by Robin Newman, June 2019
#midi file at
#use run_file "path-to-Ortiz3-RF.rb" to run it
use_bpm 100
define :plarray do |notes,durations,tp=0,pan=0,vol=1,s=0.9,r=0.1|
#puts offsetclass do |n,d|
if n.respond_to?(:each)
rbnpi / Ortiz2-RF.rb
Created Jun 2, 2019
Recerada Segunda by Diego Ortiz 16th century) from midi by Michael Robinson. Use run_file "path-to-Ortiz2-RF.rb" command to run it.
View Ortiz2-RF.rb
#Recerada Segunda by Diego Ortiz 16th century) from midi by Michael Robinson
#midi file at
#converted for Sonic Pi by Robin Newman, June 2019
#use run_file "path-to-Ortiz2-RF.rb" to play it
use_bpm 100
define :plarray do |notes,durations,tp=0,pan=0,vol=1,s=0.9,r=0.1|
#puts offsetclass do |n,d|
if n.respond_to?(:each)
rbnpi / PalesHos-RF.rb
Created Jun 2, 2019
Palestrina (c. 1525-1594) Hosanna played by Sonic Pi from a midi file by Michael Robinson. Use run_file "path-to-PalesHos-RF.rb" to run it.
View PalesHos-RF.rb
#Giovanni Pierluigi de Palestrina (c. 1525-1594) Hosanna
#transcribed for Sonic Pi by Robin Newman, June 2019 from a midi file by Michael Robinson
use_bpm 90
define :plarray do |notes,durations,tp=0,pan=0,vol=1,s=0.9,r=0.1|
#puts offsetclass do |n,d|
if n.respond_to?(:each)
n.each do |nv|
rbnpi / paseagua-RF.rb
Created May 29, 2019
Pase el agua Anonymous Spanish 15th Century played by Sonic Pi (use run_file "path to filename" to play) Hear it at
View paseagua-RF.rb
#Pase el agua, ma Julieta Spanish Anon 15th century
#arranged for Sonic Pi by Robin Newman, May 2019
with_fx :reverb,room: 0.5,amp: 0.8,mix: 0.7 do
use_synth :chiplead
with_fx :level,amp: 0.5 do
You can’t perform that action at this time.