Richard Shann <rich...@rshann.plus.com> writes: > I have created this function to drop a staff from a \score { } block: > > DropMusic = > #(define-music-function > (parser location arg1) > (ly:music?) > #{ > #} > ) > > This will be useful in Denemo to allow the user to create a staff that > is not typeset, but needs to be present for other purposes (such as > creating the BeamExceptions that David mentioned). > > I imagine this is a function without a purpose for most users but I > mention it here for three reasons > * Perhaps it already exists under a different name, or is not the > best syntax, or doesn't do exactly what I think it does.
\void There are some slight differences in behavior since \void has a predicate of type scheme? rather than ly:music?, and because it does not return music but *unspecified*, but in most use cases they should do pretty much the same. > * and because I am inordinately proud of having managed to create > it. A tribute, in fact, to the quality of LilyPond's > documentation. A very fine line to draw between saying too much > (and losing people's attention) and saying too little. Well, it depends on whether you _synthesized_ your example from instructions that were reasonably comprehensible, or whether you pruned an existing example down using guesswork. The second approach would likely have been faster for this problem and would say little about the quality of the documentation but rather about your guessing skills and the amenability of LilyPond to guesswork (which I consider important). Which is actually rather common: one of the most frequent phenomena of people asking for help because their Emacs broke is "I don't know what this code in my .emacs file does, I just copied it from somewhere". The first approach would be slower, but of course says more about the quality of documentation and your progress on the road to mastering the more powerful depths of LilyPond. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user