;; one-over-f-music.sal -- score using 1-over-f noise generation
;; (c) 2008 by Roger B. Dannenberg
;; this function is from one-over-f.sal, but included here to
;; be self-contained
define function 1-over-f(number)
loop
with the-list
for counter from 0 below number
for blue = random(5) then
#?(counter % 4 = 0,
random(5), blue)
for green = random(5) then
#?(counter % 2 = 0,
random(5), green)
for red = random(5)
for total = blue + green + red
set the-list @= total
finally return the-list
end
begin
with pitches = 1-over-f(10),
dur-pattern = make-cycle(
list(q, q, i, i, q))
exec score-gen(save: quote(1-over-f-music),
score-len: length(pitches),
pitch: 40 + nth(sg:count,
pitches),
vel: 10,
ioi: 0.3 * next(dur-pattern))
end
exec score-play(1-over-f-music)