View answeringchords.rb
#answeringchords.rb by Robin Newman, June 2018
#I was playing around with some chords and hit on a sequence I really liked
#It developed into this piece which I find somewhat hypnotic
#I love the thick textures which worked well with the blade synth
#The sequence is repetitive, moving to differnt pitches
#I used my Sonic Pi polysynth program with a keyboard to compose this.
use_synth :blade
use_bpm 120
with_fx :level,amp: 0 do |v|
control v,amp: 1, amp_slide: 8 #fade in at start
View BWV2018mix.rb
#BWV1068 arranged for Sonic Pi by Robin Newman, June 2018
#play it using run_file "path/to/file/BWV2018mix.rb"
s=0 #set starting tempo index Used for adjusting final rit timings,set to 1
with_fx :level,amp: 0.8 do
with_fx :reverb, room: 0.6,mix: 0.7 do
use_synth :tri
#Tune part
a1=[]
View BobbieShaftoe.rb
#Bobbie Shaftoe arranged for Sonic Pi glockenspeil by Robin Newman June 2018
use_osc "localhost",8000
use_debug false
define :notenum do |n|
nl=(scale :c6,:major,num_octaves: 2)[0..9]+[note(:fs6)]
return nl.index note(n)
end
use_synth :pluck
use_bpm 240
View ThereminPlus.rb
#Theremin plus, controlling pitch and ixi_techno phase by Robin Newman May 2018
#I control a continously playing note (length 2000)
use_debug false
define :putsPretty do |n,p|
num=(n*10**p).round/(10**p).to_f
return num
end
define :scalev do |v,l,h|
View FibonacciMomentum.rb
#Fibonacci Momentum by Robin Newman May 2018
#This piece generates number in the Fibonacci Sequence where each new number
#is the sum of the previous two. The numbers are converted to binary
#using a recursive function and then these are then used to control the playing of two notes.
#The binary digits are read progressively from each end of the binary number.
#If the digits are the same the first note plays, if they are different the second note plays.
#The pitch of the first note is controlled by its position from the start of the number.
#The pitch of the 2nd note is controlled by its position from the end of the number.
#In each case the pitches are taken from a ring based on notes from either
#the :e2 :minor_pentatonic or :harmonic_minor scales.
View arpeggios_on_a_tb303_bass.rb
#Arpeggios on a tb303 bass by Robin Newman, April 2018
#I first wrote the percussion live loops, liked them, and then thought it would be nice to have a melody on top of this.
#I found a list of chord progressions in :c at https://www.secretsofsongwriting.com/2012/04/10/creating-chord-progressions-that-always-work-in-any-key/
#and started to play with them, ending up with the program below. The triad chords in each progression are played as arpeggios
#with the first note added as a fourth note an octave below throughout the duration of the arpeggio.
#Each progression has a transpose offset applied in a sequence of 0,5,7,-5 and the tonic note of the sequence
#is played an octave lower using :tb303 synth acting as a pedal note. To add interest, the cuttoff value
#is cycled 4 times during the progress of each chord progression.
#The sequence is repeated 5 times with the volume faded up or down in each sequence.
View debrisplustomtoms.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
#version 2, more interesting bass. Best with a pair of decent speakers with good bass response!
# here played together with my piece Debris
t=Time.now
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)
View PachabelCanonAndGigue-RF.rb
#PachabelCanon-RF.rb
#arranged for Sonic Pi by Robin Newman, March 2018
s=0.8;r=1-s
with_fx :reverb,room: 0.6,mix: 0.6 do
with_fx :level,amp: 0.6 do
use_synth :blade
a1=[]
b1=[]
a1[0]=[:r,:r,:Fs5,:E5,:D5,:Cs5,:B4,:A4,:B4,:Cs5,:D5,:Cs5,:B4,:A4,:G4,:Fs4,:G4,:E4,:D4,:Fs4,:A4,:G4,:Fs4,:D4,:Fs4,:E4,:D4,:B3,:D4,:A4,:G4,:B4,:A4,:G4,:Fs4,:D4,:E4,:Cs5,:D5,:Fs5,:A5,:A4,:B4,:G4,:A4,:Fs4,:D4,:D5,:D5,:Cs5,:D5,:Cs5,:D5,:D4,:Cs4,:A4,:E4,:Fs4,:D4,:D5,:Cs5,:B4,:Cs5,:Fs5,:A5,:B5,:G5,:Fs5,:E5,:G5,:Fs5,:E5,:D5,:Cs5,:B4,:A4,:G4,:Fs4,:E4,:G4,:Fs4,:E4,:D4,:E4,:Fs4,:G4,:A4,:E4,:A4,:G4,:Fs4,:B4,:A4,:G4,:A4,:G4,:Fs4,:E4,:D4,:B3,:B4,:Cs5,:D5,:Cs5,:B4,:A4,:G4,:Fs4,:E4,:B4,:A4,:B4,:A4,:G4,:Fs4,:Fs5,:E5,:r,:D5,:Fs5,:B5,:A5,:B5,:Cs6,:D6,:D5,:Cs5,:r,:B4,:D5,:D5,:D5,:D5,:G5,:E5,:A5,:A5,:Fs5,:G5,:A5,:Fs5,:G5,:A5,:A4,:B4,:Cs5,:D5,:E5,:Fs5,:G5,:Fs5,:D5,:E5,:Fs5,:Fs4,:G4,:A4,:B4,:A4,:G4,:A4,:Fs4,:G4,:A4,:G4,:B4,:A4,:G4,:Fs4,:E4,:Fs4,:E4,:D4,:E4,:Fs4,:G4,:A4,:B4,:G4,:B4,:A4,:B4,:Cs5,:D5,:A4,:B4,:Cs5,:D5,:E5,:Fs5,:G5,:A5,:Fs5,:D5,:E5,:Fs5,:E5,:D5,
View levibackingtrack.rb
#backingtrack inspired by Levi Niha's video https://youtu.be/QGLPinGZhfg
#developed by Robin Newman, March 2018
use_bpm 72
#next section of code deals with stopping the track cleanly
#"at" command used for timing
#triggering the final drums and chord
no_cycles=3 #adjust for length required
set :kill,false
sleep 0.5
at no_cycles*16 do
View playPurcell-RF.rb
#playPurcell-RF.rb
#run using: run_file "path-to-the-file/playPurcell-RF.rb"
with_fx :reverb,room: 0.8,mix: 0.6 do
use_synth :piano
use_synth_defaults stereo_width: 0.6
a1=[]
b1=[]
a1[0]=[:C3,:B2,:G2,:r,:r,:Bf3,:Ef3,:D3,:B2,:C3,:Ef3,:F3,:G3,:G5,:G5,:r,:D3,:r,:G5,:F5,:G5,:Af5,:G5,:F5,:Ef5,:D5,:C5,:r,:F3,:r,:Bf5,:Af5,:r,:B3,:r,:Af5,:G5,:r,:A3,:r,:G5,:D5,:Ef5,:F5,:G5,:Ef5,:D5,:C5,:C3,:C3,:B2,:G2,:r,:r,:Bf3,:Ef3,:D3,:B2,:r,:Ef4,:r,:r,:C4,:r,:G3,:r,:F3,:r,:Bf3,:r,:C4,:r,:B3,:r,:r,:G3,:Ef4,:D4,:C4,:r,:C3,:r,:r,:G4,:r,:C4,:Ef4,:r,:r,:F4,:Ef3,:D3,:B2,:C3,:Ef3,:F3,:G3,:r,:r,:r,:r,:r,:G3,:r,:C3,:r,:r,:G4,:r,:C4,:Ef4,:r,:r,:F4,:Ef3,:D3,:B2,:r,:r,:G3,:r,:r,:r,:r,:r,:B2,:G2,:r,:r,:Bf3,:Ef3,:D3,:B2,:r,:G5,:G5,:G5,:F5,:F5,:F5,:Ef5,:Af5,:G5,:F5,:Bf5,:Af5,:G5,:Af5,:G5,:F5,:G5,:F5,:Ef5,:D5,:Ef5,:C3,:B2,:G2,:r,:r,:Bf3,:Ef3,:D3,:B2,:C3,:Ef3,:F3,:G3,:r]
b1[0]=[2.0,1.5,0.5,2.0,1.0,1.0,2.0,1.5,0.5,0.5,0.5,0.5,0.5,1.0,1.0,0.5,0.5,0.5,0.5,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.25,0.5,0.5,0.5,0.25,0.25,0.5,0.5,0.5,0.25,0.25,0.5,0.5,0.5,