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 / TheTwelveDaysOfChristmas
Last active Sep 21, 2019
Extended 12 days of Christmas Sonic Pi Project based on https://projects.raspberrypi.org/en/projects/code-a-carol adding harmony
View TheTwelveDaysOfChristmas
#12 days of Christmas
#based on https://projects.raspberrypi.org/en/projects/code-a-carol
#tune altered slightly, based on https://sheetmusic-free.com/download/6888/
#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
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
rbnpi / README.md
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 https://youtu.be/coDyIySAZbw
View README.md

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 https://patreon.com/samaaron 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
rbnpi / ReadME.md
Created Aug 9, 2019
Mesmeric Arpeggios. Sonic Pi on a Pi4 with Arturia MatrixBrute
View ReadME.md
@rbnpi
rbnpi / FurEliseMusicaBox.rb
Last active Jul 17, 2019
Beethoven's Fur Elise rendered with a sampled Musical Box voice on Sonic Pi. Listen at https://soundcloud.com/scrbn/fur-elise-musical-box-generated-by-sonic-pi. Samples can be downloaded from http://r.newman.ch/rpi/MusicalBox.zip
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
nlist=[
[52,0,-22],[53,0,-21],[54,0,-20],[55,0,-19],[56,0,-18],
[57,0,-17],[58,0,-16],[59,0,-15],[60,0,-14],[61,0,-13],
@rbnpi
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 https://youtu.be/fusMa2yVp_8
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
rb=[buffer[:b1,32],buffer[:b2,32],buffer[:b3,32],buffer[:b4,32]]
Track=1 #track number for recording (using 4 buffers here)
recording=true
@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 / 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=[]
You can’t perform that action at this time.