Subject: Partition non mesurée

From: Laurent Richard <[email-masked]>
Date: Fri, 22 May 2009 17:42:50 +0200

J'ai besoin à nouveau de votre aide à propos des partitions non
mesurées,

je ne comprends pas pourquoi avec le code ci-dessous, j'ai encore un "C"
à l'armure. S
Si quelqu'un pouvait m'expliquer parce que là, j'ai beau chercher dans
la doc partout, le bloc "
\layout {
    \context {
      \Score
      \remove "Bar_number_engraver"
    }
  }

est bien placé je pense.

Voici le code donc:

\version "2.12.2"
increaseBarNumber = \applyContext
#(lambda (x)
  (let ((measurepos (ly:context-property x 'measurePosition)))
   ; Only increase bar number if not at start of measure.
   ; This way we ensure that you won't increase bar number twice
   ; if two parallel voices call increaseBarNumber simultanously:
   (if (< 0 (ly:moment-main-numerator measurepos)) ; ugh. ignore grace
part
    (begin
     (ly:context-set-property!
      (ly:context-property-where-defined x 'internalBarNumber)
      'internalBarNumber
      (1+ (ly:context-property x 'internalBarNumber)))
     (ly:context-set-property!
      (ly:context-property-where-defined x 'currentBarNumber)
      'currentBarNumber
      (1+ (ly:context-property x 'currentBarNumber)))
     ; set main part of measurepos to zero, leave grace part as it is:
     (ly:context-set-property!
      (ly:context-property-where-defined x 'measurePosition)
      'measurePosition
      (ly:make-moment 0 1
       (ly:moment-grace-numerator measurepos)
       (ly:moment-grace-denominator measurepos)))))))

% Named Increasing BAR
nibar = #(define-music-function (parser location x) (string?)
#{
  \bar $x
  \increaseBarNumber
#})

% Increasing BAR
ibar = \nibar "|"

global = {
  \key g \minor

}

soprano = \relative c'' {
  \global
  g4
  
}

alto = \relative c' {
  \global
  g
  
}

tenor = \relative c' {
  \global
  g
  
}

bass = \relative c {
  \global
  g
  
}

verse = \lyricmode {
  bla
  
}

\score {
  \new ChoirStaff <<
    \new Staff \with {
      
      midiInstrument = "acoustic grand"
      instrumentName = \markup \center-column { "" "" }
    } <<
      \new Voice = "soprano" { \voiceOne \soprano }
      \new Voice = "alto" { \voiceTwo \alto }
    \new Lyrics \lyricsto "soprano" \verse
    \new Staff \with {
      midiInstrument = "acoustic grand"
      instrumentName = \markup \center-column { "" "" }
    } <<
      \clef bass
      \new Voice = "tenor" { \voiceOne \tenor }
      \new Voice = "bass" { \voiceTwo \bass }
  \layout {
    \context {
      \Score
      \remove "Bar_number_engraver"
    }
  }
  \midi {
    \context {
      \Score
      tempoWholesPerMinute = #(ly:make-moment 100 4)
    }
  }
  \header {
  subtitle = "Préface"
  % Enlever le pied de page par défaut
  tagline = ##f
}
}

---

From: Martial <[email-masked]>
Date: Fri, 22 May 2009 17:58:18 +0200

> J'ai besoin à nouveau de votre aide à propos des partitions non mesurées,
> pourquoi j'ai encore un "C"

\layout {
     \context {
        \Score
        \remove "Bar_number_engraver"
     }
	\context {
		\Staff
		  \remove "Bar_number_engraver"
	\remove "Time_signature_engraver"
	}
   }

-- 
Martial

---

From: Laurent Richard <[email-masked]>
Date: Fri, 22 May 2009 18:09:25 +0200

Quel idiot!!!! 

J'ai mis Bar_number_engraver au lieu de Time_number_engraver

Désolé pour cette idiotie

Merci Martial!

>         \remove "Time_signature_engraver"

------------------------------------------------------------- 
La pensée du jour du Chat 
-------------- 

Une jupe, c'est un pantalon à une seule jambe