[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme coding] turning a list into a markup/string
From: |
Kieren MacMillan |
Subject: |
Re: [Scheme coding] turning a list into a markup/string |
Date: |
Tue, 21 Jan 2020 22:02:16 -0500 |
HOLD THE PRESSES!!
I think I have it:
%%%% SNIPPET BEGINS
\version "2.19.83"
some-music = { a'4 bes' b' aes' g' cis' d' ees' fis' f' e' c' }
#(define-markup-list-command (diffints layout props mus) (ly:music?)
(interpret-markup-list layout props
(map (lambda (d) (string-append (if (positive? d) "+" "") (number->string
d)))
(let ((muspst (map ly:pitch-semitones (music-pitches mus))))
(map - (cdr muspst) muspst)))))
\markup \line \with-color #red \diffints #some-music
\markup \line \with-color #red \diffints ##{ c' d' e' c' #}
%%%% SNIPPET ENDS
Comments and code critique appreciated.
Thanks,
Kieren.
________________________________
Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: address@hidden
- Re: [Scheme coding] turning a list into a markup/string, (continued)
- Re: [Scheme coding] turning a list into a markup/string, David Kastrup, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, Kieren MacMillan, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, David Kastrup, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, Kieren MacMillan, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, David Kastrup, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, Kieren MacMillan, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, David Kastrup, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, Kieren MacMillan, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, David Kastrup, 2020/01/21
Re: [Scheme coding] turning a list into a markup/string, Kieren MacMillan, 2020/01/21
Re: [Scheme coding] turning a list into a markup/string, Urs Liska, 2020/01/22