Hi Thomas, thank you for your corrections!
If I may ask, where are functions like event-chord-pitches documented? I have only found a list of functions with their name starting with "ly:". I assumed those were named that way to differentiate Lilypond exclusive functions from Scheme's own, but it is evident that is not the case.
Now that I've touched on this subject I guess I'll take the opportunity to ask about the following. I have a lot of trouble understanding how things are related to each other by their naming. As an example, I find very confusing that ly:music? accepts chords and sequences of notes (or one-note chords and one-note sequences) but not single notes, even when examining the scheme representation of a single note with \displayMusic portrays it as "(make-music 'NoteEvent ... )". Searching through the (uncategorized) list of Scheme functions in the documentation for anything whose name ends with the character "?" I find ly:event? and, since I was trying to write a function that accepted both NoteEvent and EventChord, I try that one out. But it turns out it's for other things (I'm not even sure what). And fortunately I already had an example that showed that single notes go with ly:pitch? because I don't know how I would have found about that otherwise.
What can I read to learn about these things instead of having to waste time and energy like this? Because right now, to an uneducated reader like me, it feels like trying to find the piece that goes into the triangle-shaped socket by trial and error instead of by picking the triangle-shaped piece, only that the triangle shaped-piece in reality goes into the square-shaped socket for some unapparent reason.
Thank you again for all your help,