[email protected] (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 _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
