View tomtom_rhythms.rb
#Tomtom rhythms found on wikipedia https://en.wikipedia.org/wiki/Rhythm_in_Sub-Saharan_Africa#/media/File:Standard_pattern,_six_beats.png
#form the basis of this piece coded for Sonic PI by Robin Newman, December 2017
l1=(ring 1,0,1,0,1,0,1,0,1,0,1,0)
l2=(ring 0,1,0,1,0,1,0,1,0,1,0,1)
l3=(ring 0,1,0,0,1,1,0,1,0,1,0,1)
l4=(ring 1,0,1,0,1,1,0,1,0,1,0,1)
l=(ring l1,l2,l3,l4)
set :kill,0 #initialise kill flag
View SonicPiControlsHELMsynth.rb
#program to illustrate interaction between HELM synth and Sonic Pi
#using midi, written by Robin Newman, December 2017
# HELM is a fantastic donateware synth, and you can control its settings
#using midi_cc messages, using HELM's learn midi assignment feature.
#this example uses an arpeggiating synth setting, and adjusts
#the arpeggio rate and the volume, synced to adjusting
#the BPM setting in Sonic Pi.
#The audio from HELM is fed back to Sonic Pi using live_audio
View FanfareForStCecilia'sHall-samples.rb
#Fanfare for St Cecilia's Hall by Andrew Blair, first performed 29th November 2017
#at the official opening of St Cecilia's Hall by HRH The Princess Royal, following a major refurbishment
#coded by Robin Newman, December 2017 with the composer's permission
#I am using code I developed to play samples from Sonatina Symphonic Library, but I have replaced
#the trumpet samples with ones I created myself, using the same file names.
#path to library samples folder (including trailing /)
path="~/Desktop/samples/Fanfare/"
#create array of instrument details
View lightsmedley.rb
#Christmas Medley synced to The PiHut Christmas tree
#coded by Robin Newman, December 2nd 2017
use_osc_logging false
use_debug false
use_osc "127.0.0.1",5005
define :flash do |n|
time_warp rt(0.2) do #time warp to sync leds with sound
osc "/xmas/pulse",n
end
View PraetoriusKindelein.rb
#Michael Praetorius Ein Kindelein so löbelich arranged for Sonic Pi by Robin Newman, November 2017
#use with run_file "path-to-this-filename" as topo long to run from a buffer in Sonic Pi
#use_transpose -4
use_synth :sine
use_synth_defaults attack: 0.05,amp: 0.4
with_fx :reverb,room: 0.8,mix: 0.6 do
a1=[]
b1=[]
a1[0]=[:r,:C6,:C6,:C6,:D6,:E6,:F6,:E6,:F6,:D6,:C6,:r,:r,:r,:G6,:F6,:E6,:E6,:D6,:C6,:D6,:C6,:B5,:C6,:C6,:r,:r,:r,:G6,:F6,:E6,:D6,:D6,:C6,:A5,:D6,:C6,:C6,:B5,:A5,:B5,:C6,:E6,:G6,:E6,:D6,:C6,:B5,:A5,:G5,:A5,:B5,:C6,:r,:r,:r,:C6,:C6,:C6,:D6,:E6,:F6,:E6,:F6,:D6,:C6,:r,:r,:r,:r,:C6,:C6,:C6,:D6,:E6,:F6,:E6,:F6,:D6,:E6,:r,:G6,:A6,:G6,:E6,:Fs6,:G6,:F6,:E6,:D6,:C6,:B5,:C6,:B5,:C6,:r,:r,:r,:G6,:A6,:G6,:E6,:Fs6,:G6,:F6,:E6,:D6,:C6,:B5,:C6,:r,:r,:C6,:A5,:B5,:C6,:G6,:A6,:G6,:E6,:F6,:G6,:E6,:C6,:G6,:r,:C6,:G6,:C6,:G6,:G6,:A6,:G6,:E6,:Fs6,:G6,:r,:r,:r,:C6,:G6,:G6,:A6,:G6,:E6,:F6,:G6,:Fs6,:G6,:r,:r,:r,:G6,:G6,:G6,:A6,:G6,:E6,:D6,:C6,:E6,:E6,:E6,:F6,:E6,:D6,:D6,:C6,:E6,:D6,:D6,:G6,:C6,:B5,:A5,:G5,:G5,:r,:A5,:E6,:C6,:C6
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
View jouyssance.rb
#jouyssance.rb
#Jouyssance Vous Donneray music by Thoinot Arbeau c 1520 - c 1595
#arranged for Sonic Pi by Robin Newman, November 2017
with_fx :reverb,room: 0.8,mix: 0.6 do
with_fx :level do |v|
use_bpm 160
flag=0;bass=0
#change vol after 0,48,96,120,192,216 beats
View GabrieliCanzon8-RF.rb
#Gabrieli - Canzon septimi toni a 8, Ch.171 arranged for Sonic Pi by Robin Newman
#November 2017
define :dl do |b| #function for debugging checking part lengths
l=0
b.each do |v|
l+=v
end
return l
end
View index.html
<?xml version="1.0" encoding="UTF-8"?><layout version="15" mode="0" orientation="vertical"><tabpage name="bm90ZWdlbg==" scalef="0.0" scalet="1.0" ><control name="a2lsbA==" x="121" y="223" w="30" h="30" color="red" scalef="0.0" scalet="1.0" type="push" local_off="false" ></control><control name="bm90ZTE=" x="6" y="125" w="263" h="50" color="red" scalef="-1.0" scalet="1.0" type="faderh" response="absolute" inverted="false" centered="true" ></control><control name="bm90ZTI=" x="8" y="299" w="258" h="50" color="red" scalef="-1.0" scalet="1.0" type="faderh" response="absolute" inverted="false" centered="true" ></control><control name="c3RhcnQ=" x="199" y="223" w="30" h="30" color="green" scalef="0.0" scalet="1.0" type="push" local_off="false" ></control><control name="cmFuZ2U=" x="37" y="33" w="200" h="50" color="purple" scalef="0.0" scalet="1.0" type="multitoggle" number_x="5" number_y="1" ex_mode="true" local_off="false" ></control><control name="cmVzZXQ=" x="42" y="222" w="34" h="31" color="yellow" scalef="0.0"
View SPVisualiserResizable.pde
//Visualiser for use with Sonic Pi 3 written by Robin Newman, September 2017
// based on an original sketch https://github.com/andrele/Starburst-Music-Viz
//THIS VERSION FOR RESIZEABLE SCREEN: CAN BE GRAGGED TO SECOND MONITOR
//Changes: changed to resizable screen, updated for Processing 3, added colour, added rectangle and star shapes
//added OSC input (from Sonic Pi) to alter parameters as it runs, removed slider inputs.
//input OSC: /viz/float updates STROKE_MAX, STROKE_MIN and audioThresh
// /viz/pos updates XY random offset values (can be zero)
// /viz/col updates RGB values
// /viz/shapes sets shapes to be used from S, E and R (or combinations thereof)
// /viz/stardata sets data for star shapes