;; heap.sal -- using a heap pattern generator object ;; (c) 2009 by Roger B. Dannenberg define function heap-demo(number-of-notes) begin with pat = make-heap({c4 c5 c6 c7}) return score-gen( score-len: number-of-notes, pitch: next(pat), ioi: 0.2, vel: 100) end exec score-play(heap-demo(20))