0
我试图创建一个函数,其中对于一个例子,\generateNote #3 #4
将产生F4映射数字来说明 - 这将有助于编写函数快速生成秤等LilyPond的:我怎样才能有计划
generateNote =
#(define-music-function
(parser location note)
(number?)
(define notes
'((0 . "c4")
(1 . "d4")
(2 . "e4")
(3 . "f4")
(4 . "g4")
(5 . "a4")
(6 . "b4")))
#{ #(cdr (assoc (modulo note 7) notes)) #}
)
这不起作用,因为error: music function cannot generate f4
。但是,以下,但是,工作:
generateF =
#(define-music-function
(parser location)
#{ f4 #}
)
任何想法,为什么这不工作?
我已经试过将" "
换成{ }
和#{ #}
无济于事。