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
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
#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 http://www.standingstones.com/em_midi.html
#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
notes.zip(durations).each do |n,d|
if n.respond_to?(:each)
@rbnpi
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
#Ortiz2-RF.rb
#Recerada Segunda by Diego Ortiz 16th century) from midi by Michael Robinson
#midi file at http://www.standingstones.com/em_midi.html
#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
notes.zip(durations).each do |n,d|
if n.respond_to?(:each)
@rbnpi
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
#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
#http://www.standingstones.com/em_midi.html
use_bpm 90
define :plarray do |notes,durations,tp=0,pan=0,vol=1,s=0.9,r=0.1|
#puts offsetclass
notes.zip(durations).each do |n,d|
if n.respond_to?(:each)
n.each do |nv|
@rbnpi
rbnpi / polyphonicsynth.rb
Last active Jun 1, 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
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 https://soundcloud.com/user-999157198-370666210/pase-el-agua
View paseagua-RF.rb
#paseagua-RF.rb
#Pase el agua, ma Julieta Spanish Anon 15th century
#arranged for Sonic Pi by Robin Newman, May 2019
s=0.85;r=0.1
with_fx :reverb,room: 0.5,amp: 0.8,mix: 0.7 do
use_synth :chiplead
with_fx :level,amp: 0.5 do
a1=[]
b1=[]
@rbnpi
rbnpi / hasslerCanzon-RF.rb
Created May 29, 2019
Canzon by Hans Leo Hassler (1564-1612), transcribed for Sonic Pi (play suing run_file "path to filename" hear it at https://soundcloud.com/user-999157198-370666210/hassler-canzon
View hasslerCanzon-RF.rb
#hasslerCanzon-RF.rb
#Canzon by Hans Leo Hassler (1564-1612), transcribed for Sonic Pi by Robin Newman, May 2019
with_fx :reverb, room: 0.6,mix: 0.7 do
use_synth :saw
a1=[]
b1=[]
a1[0]=[:G4,:G4,:D5,:G5,:F5,:D5,:E5,:F5,:F5,:E5,:C5,:D5,:E5,:E5,:D5,:r,:r,:G4,:G4,:D5,:G5,:F5,:D5,:E5,:F5,:F5,:E5,:C5,:D5,:E5,:E5,:D5,:E5,:F5,:C5,:D5,:C5,:C5,:Bf4,:A4,:G4,:r,:D5,:C5,:C5,:Bf4,:D5,:Cs5,:D5,:r,:r,:r,:r,:r,:r,:r,:r,:G4,:G4,:D5,:G5,:F5,:D5,:E5,:F5,:F5,:E5,:C5,:D5,:E5,:E5,:D5,:Bf4,:C5,:D5,:D5,:C5,:A4,:B4,:C5,:C5,:Bf4,:D5,:C5,:Bf4,:A4,:G4,:F4,:E4,:D4,:D5,:E5,:F5,:D5,:F5,:E5,:D5,:D5,:C5,:Bf4,:A4,:A4,:Bf4,:A4,:G4,:G4,:Fs4,:E4,:Fs4]
b1[0]=[1.0,1.0,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,0.5,0.5,1.0,1.0,4.0,4.0,4.0,1.0,1.0,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,0.5,0.5,1.0,1.0,3.0,1.0,2.0,1.0,1.0,3.0,1.0,2.0,2.0,4.0,2.0,2.0,3.0,1.0,2.0,4.0,2.0,4.0,4.0,4.0,4.0,4.0,4.0,4.0,4.0,4.0,1.0,1.0,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,0.5,0.5,1.0,1.0,1.0,1.5,0.5,1.0,0.5,0.5,0.5,0.5,1.0,0.5,0.5,1.0,1.0,1.0,1.0,6.0,2.0,4.
@rbnpi
rbnpi / bjs1031b-RF.rb
Created May 29, 2019
Bach Siciliano from Flute Sonata in Eb Major for Sonic Pi. (use run_file "path to filename") Hear it on https://soundcloud.com/user-999157198-370666210/bach-flute-siciliano
View bjs1031b-RF.rb
#bjs1031b-RF.rb
#attributed to J.S. Bach or C.P.E. Bach Siciliano from Flute Suite 2 BWV 1031
#transcribed for Sonic Pi by Robin Newman, May 2019
with_fx :reverb, room: 0.8,mix: 0.6 do
use_synth :tri
a1=[]
b1=[]
a1[0]=[:D5,:Ef5,:D5,:D5,:G5,:Ef5,:C5,:C5,:D5,:C5,:C5,:A5,:C5,:C5,:Bf4,:A4,:G4,:r,:Bf4,:D5,:Ef5,:C6,:Ef5,:Ef5,:D5,:F5,:Bf5,:F5,:G5,:F5,:Ef5,:D5,:C5,:F5,:A5,:C6,:Bf5,:D6,:C6,:Bf5,:A5,:G5,:F5,:Ef5,:D5,:r,:F5,:G5,:F5,:F5,:Bf5,:G5,:Ef5,:Ef5,:F5,:Ef5,:Ef5,:C6,:Ef5,:D5,:F4,:G4,:A4,:Bf4,:C5,:D5,:F5,:Bf5,:D5,:D5,:C5,:A5,:C5,:A4,:Bf4,:D5,:G5,:A5,:Bf5,:A5,:G5,:A5,:G5,:F5,:E5,:G5,:F5,:E5,:D5,:Df5,:D5,:E5,:Af5,:A5,:E5,:F5,:D5,:Df5,:D5,:E5,:Af5,:A5,:E5,:F5,:D5,:Df5,:D5,:E5,:A4,:Bf4,:D5,:Df5,:D5,:E5,:D5,:A4,:D5,:Df5,:D5,:E5,:D5,:G4,:Bf4,:A4,:G4,:F4,:E4,:F4,:D4,:r,:r,:D5,:Ef5,:D5,:D5,:G5,:Ef5,:C5,:C5,:D5,:C5,:C5,:A5,:C5,:Bf4,:G4,:A4,:Bf4,:C5,:D5,:Ef5,:F5,:Ef5,:D5,:C5,:Bf4,:A4,:Df5,:D5,:A4,:Bf4,:G4,:Fs4,:G4,:A4,:Df5,:D5,:A4,:Bf4,:G4,:Fs4,:G4,:A4,:G4,:A4,:Bf4,:C5,:D5,:Ef5,:D5,:C5,:Bf4,:D5,:C5,:Bf4,:A4,:G4,:Ef5,:C5,:Bf
@rbnpi
rbnpi / bransleDeLaTorche.rb
Last active May 24, 2019
Bransle_de_la_Torche by Paretorius (1571-1621) played by Sonic Pi Hear it on https://soundcloud.com/user-999157198-370666210/bransledelatorche
View bransleDeLaTorche.rb
#Praetorius (1571-1621) Bransle_de_la_Torche
#short and sweet, trasncribed for Sonic Pi by Robin Newman May 2019
#bransleDeLaTorche.rb
use_synth :saw
use_bpm 160
#plarray plays the array notes, with corresponding array durations to give their lengths
define :plarray do |notes,durations,amp=1,pan=0,skip=false|
in_thread do
if skip #drop last note
@rbnpi
rbnpi / SP-KeyboardController.rb
Last active May 21, 2019
Sonic Pi Keyboard Controller These two programs enable you to control Sonic Pi with a QWERTY keyboard. One program runs in a normal Sonic Pi Buffer, and the other (Ruby script) started first, runs in a terminal. Keyboard input in terminal controls SPi. A video of the system at https://youtu.be/uM4hEw4kju4
View SP-KeyboardController.rb
## The following two sections of code are utilites to clear and load all samples used in the program
## They should be used by uncopmmenting when running on a Pi as required, before using the main program
## The samples are required by live loop :sampfrenzy
##| sample_free_all
##| stop
##| sample_groups.each do |g|
##| load_samples g.to_s if g.to_s != "loop"
##| end
##| stop
@rbnpi
rbnpi / SP-KeyboardController2.rb
Last active May 12, 2019
computer keyboard input to Sonic Pi (version 2) See article on https://wp.me/P3KOu1-Sx and video on youtube at https://youtu.be/XCIJu8YJTp0 (SP-KeyboardController3.rb allows synth selection)
View SP-KeyboardController2.rb
#SP-KeyboardController2.rb
#experimental program to control Sonic Pi from the keyboard
#developed from an orbianl program written by Robin Newman, April 2016
#you can play notes direct, or initiate any of 10 liveloops
#now updated to use OSC communiation from the key polling program
#set up hash to contain notes
notes=Hash.new
#list of notes
l=[:c4,:cs4, :d4, :ds4, :e4, :f4, :fs4, :g4, :gs4, :a4, :as4, :b4, :c5, :cs5, :d5, :ds5, :e5, :f5, :fs5, :g5]
You can’t perform that action at this time.