[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme coding] turning a list into a markup/string

From: David Kastrup
Subject: Re: [Scheme coding] turning a list into a markup/string
Date: Tue, 21 Jan 2020 23:11:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Kieren MacMillan <address@hidden> writes:

> 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…

The line below it is a 2.21.0 feature that cannot be used from a
LilyPond for which we have an installer.

I wasn't aware that the line above is problematic but I see how it
could.  Maybe write #some-music instead.

David Kastrup

reply via email to

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