Wow! It works! Thank you so much! I had to put it with the music ( \relative c'' { \set Score. etc) , not in my \layout \context { \Score \set barNumberVisibility etc. block, for some reason, but I don't care - it works. :-D
Lia On Sep 21, 2010, at 12:31 PM, -Eluze wrote: > > there is also this (quite hidden & undocumented, but working!): > > \override Score.BarNumber #'break-visibility = #end-of-line-invisible > \set Score.barNumberVisibility = #(modulo-bar-number-visible 2 1 ) > > cheers! > > > Lia Zito wrote: >> >> Hello, >> >> I'm trying to get bar numbers to print on every odd measure: 1,3,5 etc. >> >> The \set Score.barNumberVisibility = >> #(first-and-every-nth-bar-number-visible 2) command puts out even numbered >> bar numbers every time. I even used the directions on how to print the >> 1st and every nth bar number (see below) and lilypond reverts right back >> to even numbers whenever the value is 2 (or 4, etc.). >> >> I tried inserting an invisible measure at the beginning, then resetting >> the bar number to 1 at the 2nd measure - and that \set >> Score.barNumberVisibility function went and skipped ahead a measure to >> display only the even numbers again! >> >> I tried the barnum music function (see below) even though I don't >> understand it at all - but it did the same thing. I get 1, 2, 4, 6, etc. >> >> Does anybody know how to get it to print just the odd numbered bar >> numbers? With or without the 1st bar number, that doesn't matter so much, >> I just want to see 3, 5, 7, 9 etc. on the page. >> >> I'm using Lilypond 2.12.3-1 with OLy 0.4 and OpenOffice 3.2.1 on OS X >> 10.6. >> >> >> Thank you! >> >> Lia Zito >> >> Here's the email with the directions I tried: >> >> http://lists.gnu.org/archive/html/lilypond-user/2008-09/msg00403.html >> >> From: Trevor Daniels >> Subject: Printing first and every n bar numbers >> Date: Fri, 12 Sep 2008 14:21:54 +0100 >> Valentin >> >> Are these worth a snippet (or two?) for Rhythms? >> >> \relative c'' { >> % Print the first and every fifth bar numbers >> \set Score.barNumberVisibility = #(every-nth-bar-number-visible 1) >> \override Score.BarNumber #'break-visibility = #all-visible >> \bar "" >> c1 >> \set Score.barNumberVisibility = #(every-nth-bar-number-visible 5) >> \repeat unfold 9 { c1 } >> } >> >> The alternative is Neil's music function: >> >> #(define ((first-and-every-nth-bar-number-visible n) barnum) >> (or >> (= 1 barnum) >> (= 0 (modulo barnum n)))) >> >> \relative c'' { >> \override Score.BarNumber #'break-visibility = #end-of-line-invisible >> \set Score.barNumberVisibility = #(first-and-every-nth-bar-number-visible >> 5) >> \bar "" >> \repeat unfold 10 { c1 } >> } >> >> Trevor >> >> >> _______________________________________________ >> lilypond-user mailing list >> lilypond-user@gnu.org >> http://lists.gnu.org/mailman/listinfo/lilypond-user >> >> > > -- > View this message in context: > http://old.nabble.com/printing-bar-numbers-on-every-odd-measure-tp29772262p29773456.html > Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. > > > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > http://lists.gnu.org/mailman/listinfo/lilypond-user _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user