Piano phase for UVIScript
Here’s a very small script that regenerates Steve Reich’s Piano phase piece for 2 pianos in Falcon using UVIScript to generate the phasing piano parts.
pattern = {64, 66, 71, 73, 74, 66, 64, 73, 71, 66, 74, 73}
vels = {80, 80, 70, 70, 50, 80, 80, 70, 70, 80, 50, 70}
function play(period, channel)
local i=1
while true do
local note = pattern[i]
local vel = vels[i] * (1+0.1*math.random())
playNote(note, vel, beat2ms(period/2), 0, channel)
waitBeat(period)
i = 1+i%#pattern
end
end
spawn(play, 1/3, 1)
spawn(play, ((12*12+1)/(12*12)) * 1/3, 2)
N.B.: It doesn’t follow exactly the instructions: the second piano parts advance continuously by one step every 12 bars, and there’s no real articulation.