;; chromatic-lick-loop.sal -- using loop to make a chromatic scale ;; (c) 2008 by Roger B. Dannenberg define function chromatic-lick-loop( starting-note, number-of-notes) begin loop with score, dur = 0.5 for i below number-of-notes for start = 0 then start + dur set score @= list(start, dur, list(quote(note), keyword(pitch), starting-note + i, keyword(vel), 100)) finally return score-set-end( score-set-begin(reverse(score), 0), start) end end exec score-play(chromatic-lick-loop(60, 40))