openlilylib / lilypond-export

LilyPond export API to write Humdrum, MusicXML and more
GNU General Public License v3.0
22 stars 8 forks source link

Use lset functions from SFRI #23

Closed rshura closed 6 years ago

rshura commented 6 years ago

I can easily revert my last commit :-)

On Thu, Nov 8, 2018, 8:34 AM Paul Morris <notifications@github.com wrote:

@PaulMorris commented on this pull request.

In MusicXML.scm https://github.com/openlilylib/lilypond-export/pull/23#discussion_r231968232 :

@@ -267,8 +266,8 @@

   ((NoteEvent)
    (let* ((pitch (ly:music-property m 'pitch))
  • (tie-start (if tie-start-pitches (lset<= equal? (list pitch) tie-start-pitches) #f))
  • (tie-stop (if tie-stop-pitches (lset<= equal? (list pitch) tie-stop-pitches) #f)))
  • (tie-start (if (and tie-start-pitches (member pitch tie-start-pitches)) #t #f))
  • (tie-stop (if (and tie-stop-pitches (member pitch tie-stop-pitches)) #t #f)))

@rshura https://github.com/rshura Yeah, that's better, thanks! My sense is that idiomatic Scheme style would just use the result of the member call as a truthy value rather than using an explicit #t (see: https://www.gnu.org/software/guile/manual/guile.html#Booleans). In that style this could be:

(tie-stop (and tie-start-pitches (member pitch tie-start-pitches)))

But one could argue that having the explicit 'if', #t, and #f is clearer and better. I'm fine with either style.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openlilylib/lilypond-export/pull/23#pullrequestreview-173055036, or mute the thread https://github.com/notifications/unsubscribe-auth/AI_AahEOBTLNjyEzpVkx5hU9F26fRE5kks5utFz6gaJpZM4YU6hZ .

jpvoigt commented 6 years ago

All examples compiled correctly and produced XML that MuseScore loads without a warning :-)