[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How does \musicMap not return music?
From: |
Simon Albrecht |
Subject: |
How does \musicMap not return music? |
Date: |
Wed, 18 Jan 2017 20:10:39 +0100 |
Hello,
surely I overlooked something:
I’m writing a function to truncate MMRs for rehearsal MIDI. This is the
code so far:
%%%%%%%%%%%%%
\version "2.19.53"
truncateRests =
#(define-music-function (mus) (ly:music?)
(let ((trunc-rests (lambda (e) (if (music-is-of-type? e
'multi-measure-rest-event)
(ly:music-set-property! e
'duration (ly:make-duration -1))))))
(musicMap trunc-rests mus)))
\truncateRests { \time 4/2 R\breve*10 }
%%%%%%%%%%%%%%
Now Lily complains on that, saying ‘document.ly:9:1: error: music
function cannot return ##<unspecified>’. I’m puzzled – musicMap is
itself a music function, so how could truncateRests not return music?
TIA, Simon
- How does \musicMap not return music?,
Simon Albrecht <=