[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Scheme question
From: |
Jacques Menu |
Subject: |
Scheme question |
Date: |
Tue, 25 Dec 2018 21:18:55 +0100 |
Hello folks,
I don’t succeed in using ‘#:concat’ to compute the second argument to ‘#(:note’
in the following Scheme code, where HERE occurs.
What should I use instead? The aim is to use half the value of ‘den’ instead of
4 in the previous line.
Thanks for your help!
JM
--
#(define-public (format-time-sig-dotted-note-horizontally grob)
(let* ((frac (ly:grob-property grob 'fraction))
(num (if (pair? frac) (car frac) 4))
(den (if (pair? frac) (cdr frac) 4))
(m (markup #:override '(baseline-skip . 0.5)
#:line (#:number (number->string (/ num 3))
#'"/"
#:override '(style . default)
#:raise 0.6 (#:note (number->string den) UP)
#:raise 0.6 (#:note #'"4." UP)
#:raise 0.6 (#:note (#:concat #'"4" #'".") UP)
;; HERE
)
)
)
)
(grob-interpret-markup grob m)))
Starting lilypond 2.19.82 [NotesInTimeSignatureExample.ly]...
Processing
`/Users/menu/Documents/LaTeX/PartitionsLilypond/NotesInTimeSignatureExample.ly'
Parsing...
Interpreting music...[8]
Preprocessing graphical
objects.../Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/markup-macros.scm:368:18:
In procedure car in expression (car expr):
/Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/markup-macros.scm:368:18:
Wrong type (expecting pair): "4"
Exited with return code 1.
- Scheme question,
Jacques Menu <=