lilypond-user
[Top][All Lists]
Advanced

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

Re: Extract notes from chords, with silence when there are none


From: mskala
Subject: Re: Extract notes from chords, with silence when there are none
Date: Thu, 17 Sep 2015 22:05:04 -0500 (CDT)
User-agent: Alpine 2.20 (LNX 67 2015-01-07)

On Thu, 17 Sep 2015, Gilles THIBAULT wrote:
> So Chris, the last change you have to make in the code is to change
>
> line 73 (in \extractNote definition)
> (extract-note music n))
>
> by
>
> (extract-note (event-chord-wrap! music) n))

Assuming you mean me...

I just found a message I thought I'd already sent, in my "postponed
drafts" folder.  Most likely I started to write it, then saw more mail
coming in on this thread, stopped to read that in case it could answer my
problem, and never got back to the original message.  That message is now
obsolete, but in it I described how making your first change just resulted
in the error message "fatal error: cannot find music object: RestEvent
'duration".

Now, I made your second change and continued getting the "fatal error:
cannot find music object: RestEvent 'duration" message.  Then I tried
downloading the file and making the change again, exactly as before, and
got different error messages.  I ran a diff on the files and got this
(as part of longer output)...

40c40
<                 (make-music 'RestEvent 'duration (ly:music-property note 
'duration))))
---
>                 (make-music 'RestEvent 'duration (ly:music-property note 
> 'duration))))

...which is utterly bizarre!  Apparently the same identical line of code,
reported by diff as being different.

However, that was a clue.  After some digging around with hex dump, it
appears that the issue is when I copied and pasted from your message into
the file the first time, some invisible HTML-related garbage (namely, 0xA0
characters) was copied too.  Those characters *look* like spaces, but
LilyPond neither recognizes them as such nor reports them as errors.  It
just produces an incorrect parse.  Probably, the same issue is what causes
all your messages to appear double-spaced on my screen, making them hard
to read.

I wish people would stop using HTML for email.

Anyway, with the second change and the removal of the HTML garbage, the
script seems to do what I was hoping for.  Thanks!

-- 
Matthew Skala
address@hidden                 People before principles.
http://ansuz.sooke.bc.ca/



reply via email to

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