Thanks a lot!
On 2014-05-20 00:50, Thomas Morley wrote:
Is it possible to include and use
>'parse-simple-duration' in a local script (without copy and pasting it)?
Well, I would have no problem to c/p 'parse-simple-duration', though
yes, it is possible:
#(define (note-to-moment notestr)
(let ((parsed ((@@ (lily) parse-simple-duration ) notestr)))
(ly:duration-length
(ly:make-duration (car parsed) (cadr parsed)))))
#(write (note-to-moment "4."))
--> #<Mom 3/8>
Though, quoting guile-manual:
— syntax: @@ module-name binding-name
Refer to the binding named binding-name in module module-name. The
binding must not have been exported by the module. This syntax is only
intended for debugging purposes or as a last resort.
!!
Cheers,
Harm
Part of the problem with copy and pasting was that it didn't work. I got
the final piece of the puzzle though by Mark.
I would still prefer this solution, but what you're saying is that it
isn't really suitable to use this kind of syntax and that it is better
to copy-and-paste!?
Best
Peter
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user