|
From: | Germain G. Ivanoff-Trinadtzaty |
Subject: | définition d'un nouveau contexte |
Date: | Fri, 13 Jun 2008 01:30:27 +0200 |
Bonjour,
J'ai deux problèmes en définissant un nouveau contexte \StaffSA, adossé à \Staff.
J'ai pris modèle dans NR 6.2.5 Définition de nouveaux contextes.
Avec la définition ci-dessous :
1) j'ai deux portées qui apparaissent pour un contexte \StaffSA
2) leur instrumentName ne s'affiche
pas.
Où est mon erreur ?
Merci,
Germain
pj : "test-newcontext.png"
%% Test de définition d'un nouveau
contexte
\version "2.11.47"
\include "english.ly" Global = { \key f \major }
NotesDiscantus = { a'4 a'1 } NotesCantus = { f'4 f'1 } NotesFiller = { c'4 c'1 } NotesBassus = { f4 f1 } Words = \lyricmode { Ta __ daa } %---------------%
StaffVoiceNames = %% for Staff context #(define-music-function (parser location n-max-width s-one s-two) (number? string? string?) "Format and print voice names for one staff" #{ \set Staff . instrumentName = \markup { \column { \hcenter-in #$n-max-width $s-one \hcenter-in #$n-max-width $s-two } } #}) %---------------% StaffSAVoiceNames = %% same as above, but for StaffSA context #(define-music-function (parser location n-max-width s-one s-two) (number? string? string?) "Format and print voice names for one staff" #{ \set StaffSA . instrumentName = \markup { \column { \hcenter-in #$n-max-width $s-one \hcenter-in #$n-max-width $s-two } } #}) %---------------%
\layout % commun { \context { \Score \remove Bar_number_engraver
}
\context { \ChoirStaff %% si placé après déf. de StaffSA : idem
\consists Instrument_name_engraver
\override InstrumentName #'self-alignment-X = #LEFT \accepts StaffSA } \context { \Staff
\remove Time_signature_engraver
\override InstrumentName #'self-alignment-X = #RIGHT } \context { \name StaffSA \type "Engraver_group" \alias Staff } } %---------------% \score % 1 { \new ChoirStaff << \set ChoirStaff . instrumentName = "N°1 Commportement étrange :" \new StaffSA << \StaffSAVoiceNames #3 #"S." #"A." %% ne donne rien % \StaffVoiceNames #3 #"S." #"A." %% ne marche pas non plus \clef "G" \Global \new Voice = "one" { \voiceOne \NotesDiscantus } \new Voice { \voiceTwo \NotesCantus } >> \new Lyrics = thewords { s
}
\new
Staff
<< \StaffVoiceNames #3 #"T." #"B." \clef "F" \Global \new Voice { \voiceOne \NotesFiller } \new Voice { \voiceTwo \NotesBassus } >> \context Lyrics = thewords \lyricsto "one" { \Words } >> \layout { indent = 65\mm } } |
test-newcontext.png
Description: PNG image
[Prev in Thread] | Current Thread | [Next in Thread] |