Le 29 nov. 2009 à 16:15, Alexander Kobel a écrit : > I propose using a different separator for \parallelMusic than "|", and allow > to include bar checks in there. > > \parallelMusic as is is very fine and handy, but sometimes you want to enter > a whole phrase of two or three measures in a single go, and include the bar > checks in there for readability and checking later on. > It somewhat disturbs the workflow if you always have to look up where the > voiceN ended up in the last measure, especially if you have larger intervals > in the voices, or reentering the durations if one voice stays in 16, the next > in 8 and the third in 2. > > What about, e.g., ":"? It's fast to type, and AFAICS, it only is used for > chord mode and figured bass. And I don't see a use for those two in > \parallelMusic, since - well, you usually only have one chord at a time, > right? > Another idea: "||", to serve both as bar check and as delimiter. And there's > definitely no use conflict against two bar checks at the same point in time, > right?
Currently, \parallelMusic highjacks the usual meaning of the pipe symbol: When the function finds a BarCheck music element (which is what a pipe is changed into by the parser), it interprets it as: change to the next voice. This was done so that \parallelMusic has no impact on the parser. The main drawback is the one that you point out: bar checks are not possible (at least, not as easily) in parallel music. So if you want to change the voice separator, in order to keep the meaning of the pipe, you will have to introduce another token for voice separation, and modify the parallelMusic function so that it does not interpret BarChecks as the voice separator, but instead use a dedicated music element. For the voice separation syntax, you have two options: - introduce a new token in the lexer and the parser, e.g. "&"; - or use something like that: "s" = #(define-music-function (parser location) () (make-music 'VoiceSeparator)) then the voice separator is \s. Modify parallelMusic, so that when a VoiceSeparator (instead of BarCheck) music element is found, the function switches to the next voice. The parallelMusic function seems well documented, this part should not be difficult. Nicolas _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel