lilypond-user
[Top][All Lists]
Advanced

[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 16:57:42 -0500

Hi David,

> Of course you can also do
> #(display (let ((res (map ly:pitch-semitones (music-pitches some-music))))
>             (map - (cdr res) res)))
> 
> Namely first convert to semitones and then do the difference.

Ah! Perhaps I was on the right path with the first part of what I gave to Mike 
(which used the ly:pitch-semitones function).

> #(display (let ((res (map ly:pitch-semitones (music-pitches some-music))))
>          (map - (cdr res) res)))
> 
> #(define-markup-list-command (buzz layout props mus) (ly:music?)
>  (interpret-markup-list layout props
>    (map number->string
>      (let ((res (map ly:pitch-semitones (music-pitches mus))))
>        (map - (cdr res) res)))))
> 
> \markup \right-column \with-color #red { \buzz \some-music \vspace #3 }
> \markup \right-column \with-color #red { \buzz { c' d' e' c' } }

I get errors when I try to compile that:

 error: syntax error, unexpected MUSIC_IDENTIFIER
\markup \right-column \with-color #red { \buzz 
                                               \some-music \vspace #3 }
…

Am I missing something? I cut-and-paste your code [from email into Frescobaldi] 
several times…

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]