lilypond-user
[Top][All Lists]
Advanced

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

Re: LilyPond blog has new home!


From: David Kastrup
Subject: Re: LilyPond blog has new home!
Date: Wed, 10 Jul 2013 11:24:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

address@hidden (Karl Hammar) writes:

>   It seems that
>
> #(define (byteToPfx byte)
>          (map (lambda (bit)
>                       (if (logbit? bit byte) #{ c'64 #} #{ r64 #}))
>               (iota 8 7 -1)))
>
> #@(byteToPfx 34) c'64
>
>   (Is lilypond-mode up to standard indenting thoose things?)
>   is just producing side effects and to be able to return a music
>   expression, I have to use define-music-function, is it so ?
>
> #(define (showByte  byte) (display byte)(newline))
> #(showByte 224)
>
>   works as expected, but for byteToPfx I have to use #@, so is
>   returning something, but what is it returning?

A list of music expressions.  Which is not the same as music.  If you
want to pass the result through a music function, you can wrap
it with

(make-sequential-music ...)

and could unwrap it again (in case you need the single expressions) using

(ly:music-property ... 'elements)

At the current point of time, there is no such thing as multi-valued
music functions.

-- 
David Kastrup




reply via email to

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