Skip to content

Instantly share code, notes, and snippets.

View rbnpi's full-sized avatar

Robin Newman rbnpi

  • Near Peterborough
View GitHub Profile
rbnpi / bach-allabreve2-bwv589-RF.rb
Created July 27, 2023 15:50
Sonic Pi version of Bach's Allabreve. You need to use run_file "path/to/bach-allabreve2-bwv589-RF.rb" to run it. Listen to it on
View bach-allabreve2-bwv589-RF.rb
#coded for Sonic Pi by Robin Newman, July 2023
use_debug false
use_synth_defaults amp: 0.5
s=0.96;r=0.04;st=0 #s,r,st = sustain factor,release factor, start tempo section
Last = 4 #pause on last note
with_fx :reverb , room: 0.9,mix: 0.7 do
use_synth :pulse
with_fx :compressor,amp: 0.7 do
rbnpi / SonicPiHiHats.rb
Last active May 10, 2023 21:45
Program illustrates HiHat samples added to Sonic Pi source around May9th 2023. Hear the result on
View SonicPiHiHats.rb
#Sonic Pi HiHats by Robin Newman May 2023
#demo of new hi-hat samples in action
#program prints sample names, then fades in
#and runs for about 1 minute before fading out and stopping
use_debug false
sample_names(:hat).each do |name|
puts name
set :kill,false
at 65 do
rbnpi / SPhydraFrere4Pane2.rb
Last active February 6, 2023 16:18
Sonic Pi 4.4dev with built in Hydra plays Frere Jaques displaying the notes. Video at
View SPhydraFrere4Pane2.rb
#Sonic Pi 4.4dev with built in Hydra
#Hydra sketch shows Frere Jaques 2 part round notes in real time
#coded by Robin enwman February 2023
use_debug false
define :clearPanes do
hydra "
rbnpi / SonicPiReichLikeDrumsWithHydra.rb
Created January 24, 2023 14:57
Sonic Pi produces a Reich Like drum pattern which controls a Hydra Sketch. Video at
View SonicPiReichLikeDrumsWithHydra.rb
#Reich like drumming, by Robin Newman, January 2023
#I use hi and mid tomtoms for the two parts
#or you can set them both the same eg to hard snare
use_debug false
use_midi_logging false
use_midi_defaults channel: 1,port: "iac_driver_bus"
link #lets you adjust tempo as program is running
#set master pattern option with uniform amp or accented amp
#uncomment either the 12 beat or 16 beat patterns
rbnpi / Hydra Sketch2
Created December 31, 2022 22:30
Sonic Pi and hydra.ojack communicating via midi and audio See it on
View Hydra Sketch2
//Sonic Pi controlled code using midi and audio input by Robin Newman
// register WebMIDI
.then(onMIDISuccess, onMIDIFailure);
function onMIDISuccess(midiAccess) {
var inputs = midiAccess.inputs;
var outputs = midiAccess.outputs;
for (var input of midiAccess.inputs.values()){
rbnpi / progressionsBells.rb
Created December 13, 2022 23:29
Progresions of bell like sounds above a bass drone. Based on a toolkit by theibbster on Listen on
View progressionsBells.rb
#This piece is developed from a chord progression tool written by theibbster on
#Robin Newman, December 2022
define :chrd do |deg, tonic, sca|
n = 3
if deg.match?('7')
n = 4
deg = deg.slice(0,deg.length-1).to_sym
rbnpi / SonicPiTocAndFugue-RF.rb
Last active July 27, 2022 22:08
Bach Toccata and Fugue played by Sonic Pi. Use run_file "/path/to/SonicPiTocAndFugue-RF.rb" to play. Hear it on
View SonicPiTocAndFugue-RF.rb
#BachTocAndFugue-RFrb (latest version)
#coded by Robin Newman from an arrangement by Guillaume Bentaieb
start = 0 #section to start playing from (fugue stats at 6)
#note data part0 (a few extra notes from part 1 which required this to play on Sonic Pi)
rbnpi / OydUnaCosa.rb
Last active October 31, 2021 23:06
Oyd, oyd una cosa by Fransisco Guerrero (16th century) coded for Sonic Pi. Hear it on
View OydUnaCosa.rb
#OydUnaCosa.rb Oyd, oyd una cosa by Francisco Guerrero 1589
#coded for Sonic Pi by Robin newman October 2021
use_bpm 150
use_synth :chiplead
use_synth_defaults attack: 0.08
with_fx :reverb, room: 0.7,mix: 0.6 do
with_fx :level,amp: 0.5 do
rbnpi / bari_bassic_blues-RF.rb
Created August 29, 2021 19:45
Bari Bassic Blues (originally for saxophone quartet and drums) by Joshua Haagen coded for Sonic Pi Hear it on
View bari_bassic_blues-RF.rb
#"Bari_Bassic_Blues" by Joshua Haagen
#originally for Saxophone Quartet and drums
#converted for Sonic Pi by Robin Newman, Aug 2021 with the composer's permission
#voiced for :dsaw synth with fxs reverb and wobble applied
#percussion parts converted to a note stream and then case statement used to select samples
#parts transposed to allow for original instrument
#use run_file "path/to/this/file" as too long for a suonic pi buffer
use_synth :dsaw
use_synth_defaults amp: 0.6
use_bpm 120
rbnpi / Gabrieli-Ch172-Septimi-RF.rb
Last active July 3, 2021 21:49
Gabrieli_Canzon_per_sonar_septimi_toni_a_8 coded for Sonic Pi. Hear it on
View Gabrieli-Ch172-Septimi-RF.rb
#converted to Sonic Pi code by Robin Neman from midi file by Martin Grayson Creative Commons 3.0 Attribution Non-Commercial-Share-Alike
use_synth_defaults attack: 0.03
with_fx :reverb, room:0.8,mix: 0.6 do
with_fx :level,amp: 0.5 do
use_synth :pulse