Tag Archives: MIDI note numbers

Marcin was asking about initialising set palettes from…

Marcin was asking about initialising set-palettes from MIDI note numbers instead of note names. The set-palette init method doesn’t (yet) accommodate MIDI numbers but this works fine for creating a set-palette ‘by hand’ via the add method:

(let* ((sp (make-set-palette 'empty nil)))
  (add (make-sc-set '(cs3 d4) :id 1) sp)
  (add (make-sc-set (loop for m in '(10 20 30 40 50 60) collect
			 (midi-to-note m))
		    :id 2)
       sp)
  sp)