Skip to content

Instantly share code, notes, and snippets.

@rbnpi rbnpi/CanzonCornetto.rb

Last active Feb 11, 2019
Embed
What would you like to do?
Canzon Cornetto by Samuel Scheidt arranged for Sonic Pi (requires Pi: too long to run on a Mac) sample folder download from http://r.newman.ch/rpi/Cornetto.zip
#Canzon Coronetto by Samuel Scheidt1621, arranged for Sonic Pi by Robin Newman, May 2015
#based on Anton Hoger score for 4 guitars (licence imslp.org/wiki/IMSLP.Creative_Commons_Attribution_NonCommercial_4.0)
# http://javanese.imslp.info/files/imglnks/usimg/7/70/IMSLP336107-PMLP439715-_Scheidt__Samuel_-_Canzon_cornetto_-4Git.pdf
#voiced for 4 trumpets, transposed down 4 semitones.
#needs Pi. Too long for Mac
use_debug false
use_sample_pack_as '/home/pi/samples/Cornetto',:cornetto #adjust location as necessary
#first deal with selecting and setting up the samples
inst0=:cornetto__trumpet_cs5
samplepitch0=:cs5
load_samples [inst0]
s=0 #note duration scale factor
define :pl do |inst,samplepitch,nv,dv,vol=1,pan=0| #plays a sample note
shift=note(nv)-note(samplepitch)
sample inst,rate: (pitch_ratio shift),sustain: 0.8*dv,release: 0.2*dv,amp: vol,pan: pan
end
define :plarray do |inst,samplepitch,narray,darray,shift=0,vol=1,pan=0| #plays note/duration arrays
narray.zip(darray) do |nv,dv|
if nv != :r
pl(inst,samplepitch,note(nv)+shift,dv*s,vol,pan)
end
sleep dv*s
end
end
define :set_bpm do |n| #sets value of s according to desired bpm
s=1.0/8*60/n.to_f
end
#relative note durations (not all used)
dsq = 1.0
sq = 2
sqd = 3
q = 4
qd = 6
c = 8
cd = 12
m = 16
md = 24
b = 32
bd = 48
sf=1.5
#dynamic settings
p=0.06*sf
mp=0.2*sf
mf=0.5*sf
f=1.0*sf
ff=1.3*sf
levlookup=[[p,"p"],[mp,"mp"],[mf,"mf"],[f,"f"],[ff,"ff"]] #allows printing in plct function
define :ct do |ptr,lev,slid=0,timetonext=0,s,flag| #controls level
control ptr,amp: lev,amp_slide: slid*s #times scalefactor for tempo
if flag > 0 then #lets you print level variations
puts "All parts Level change:"
puts "level "+levlookup.assoc(lev)[1]
puts "slide time "+ (slid*s).to_s
puts " " #blank line
end
sleep timetonext*s #scale for tempo
end
define :plct do |pt,am,amsl,amd,s,flag=0| #controls level using values in three arrays
#params pt control pointer,am amp level,amsl amp_slide:,amd delay to next command,s tempo scale factor,flag to print info
am.zip(amsl,amd) do |amv,amslv,amdv|
ct(pt,amv,amslv,amdv,s,flag)
end
end
define :len do |d| #calcuates duration of a part or level control array
tl=0
d.each do |d|
tl += d
end
return tl
end
#set up the part lists
n1=[:a5,:a5,:a5,:fs5,:d5,:e5,:fs5,:g5,:a5,:fs5,:b5,:g5,:a5,:fs5,:g5,:e5,:fs5,:d5,:e5,:d5,:e5,:d5]
d1=[c,q,q,q,sq,sq,sq,sq,sq,sq,sq,sq,sq,sq,sq,sq,sq,sq,q,q,c,b]
n1.concat [:r,:fs5,:d5,:e5,:cs5,:d5,:b4,:cs5,:d5,:cs5,:d5,:cs5,:d5,:e5,:cs5,:d5,:b4,:cs5,:a4,:b4,:cs5,:d5,:cs5,:d5,:a5]
d1.concat [q,sq,sq,sq,sq,sq,sq,q,c,q,cd,q,sq,sq,sq,sq,sq,sq,sq,sq,q,c,q,c,c]
#b7
n1.concat [:a5,:r,:a5,:a5,:a5,:a5,:b5,:g5,:a5,:fs5,:g5,:e5,:fs5,:gs5,:a5,:gs5,:a5,:a4,:d4,:a4]
d1.concat [m,b+q,q,q,q,sq,sq,sq,sq,sq,sq,sq,sq,q,c,q,cd,q,cd,q]
n1.concat [:e4,:a4,:fs5,:fs5,:fs5,:a5,:fs5,:g5,:fs5,:b5,:a5]
d1.concat [m,q,q,q,q,cd,q,q,q,q,q]
#b13
n1.concat [:a5,:r,:a5,:a5,:a5,:fs5,:r,:d5,:e5,:fs5,:g5,:a5,:fs5,:b5,:a5,:r]
d1.concat [m,q,q,q,q,m,q,sq,sq,sq,sq,sq,sq,c,c,m]
n1.concat [:r,:d5,:e5,:f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,:d4,:d4,:g4,:d4,:g3,:d4,:a3,:d4]
d4.concat [cd,q,q,c,q,sqd,dsq,q,q,q,m,q*1.1,q*1.2,q*1.3,q*1.4,q*1.5+q*1.6+q*1.7+q*1.8,b*1.3]
#end
#level control arrays
a=[mf,ff,mf,f,ff,mf,f,mf,f,mf,f,mf,f,ff] #dynamic target
as=[0,0,0,0,0,0,3*b-c,0,4*b,2*b-m,3*b,5*b-m,0,0] #slide times
#ad contains times between each level change
ad=[10*b+m+q,2*b,7*b-m,3*b,b+3*c-q,2*b-m,4*b-c,3*b,13*b,2*b+m,3*b,13*b+q-m,2*b,3*b-q+(3.6*q+0.3*b)] #rit time 3.6*q+0.3*b added
set_bpm(85)
puts "check equal..."
puts len(d1)
puts len(d2)
puts len(d3)
puts len(d4)
puts len(ad)
with_fx :reverb,room: 0.6,mix: 0.4 do #add reverb
with_fx :level do |amp|
in_thread do
plct(amp,a,as,ad,s,1) #control level (with printed output)
end
in_thread do
plarray(inst0,samplepitch0,n1,d1,-4,0.7,-0.7) #trmpt 1
end
in_thread do
plarray(inst0,samplepitch0,n2,d2,-4,0.7,-0.3) #trmpt 2
end
in_thread do
plarray(inst0,samplepitch0,n3,d3,-4,0.7,0.3) #trmpt 3
end
plarray(inst0,samplepitch0,n4,d4,-4,0.7,0.7) #trmpt 4
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.