| [ << Anotaciones editoriales ] | [Top][Contents][Index] | [ Texto >> ] |
| [ < Colorear objetos ] | [ Up: Dentro del pentagrama ] | [ Corchetes para material optativo > ] |
7.1.6 Resaltados en el pentagrama
Para un propósito de análisis o pedagógico, puede ser de utilidad
“resaltar” pasajes musicales, por ejemplo para mostrar una
región tonal. Esto se puede hacer usando la instrucción
\staffHighlight, que recibe un color como argumento. Para
conocer todas las formas de introducir colores, see Colorear objetos. El resaltado se finaliza usando
\stopStaffHighlight.
\relative { \time 2/4 c'4 4 \staffHighlight "lightsteelblue" g'8( fis g4)-. \stopStaffHighlight c2 }![]()
Si hay varios resaltados seguidos, no es necesario escibir
\stopStaffHighlight, porque \staffHighlight también
termina implícitamente el resaltado en curso, si hay uno. De
forma similar, no es necesario escibir \stopStaffHighlight
al final de la pieza. Esto es especialmente práctico si se
quieren resaltar todos y cada uno de los compases.
\relative { \time 2/4 \staffHighlight "lightpink" c'4 4 \staffHighlight "lightsteelblue" g'8( fis g4)-. \staffHighlight "lightpink" c2 }![]()
De forma predeterminada, los pentagramas se resaltan por separado.
music = { \time 2/4 \staffHighlight "lightpink" c'4 4 \staffHighlight "lightsteelblue" g'8( fis g4)-. \staffHighlight "lightpink" c2 } << \new Staff \music \new Staff \music >>![]()
Sin embargo, se pueden resaltar varios pentagramas al mismo tiempo
trasladando el grabador Staff_highlight_engraver a un
contexto más elevado que Staff (o RhythmicStaff, o
similar). Esto se hace usando las instrucciones \consists
y \remove; See Modificar los complementos (plug-ins) de contexto para más
información. Por ejemplo, si el grabador se traslada a
Score, los resaltados se comparten por parte de todos los
pentagramas.
\layout { \context { \Staff \remove Staff_highlight_engraver } \context { \Score \consists Staff_highlight_engraver } } music = { \time 2/4 \staffHighlight "lightpink" c'4 4 \staffHighlight "lightsteelblue" g'8( fis g4)-. \staffHighlight "lightpink" c2 } << \new Staff \music \new Staff \music >>![]()
También se puede trasladar el grabador
Staff_highlight_engraver a contextos de nivel intermedio
como StaffGroup.
music = { \time 2/4 \staffHighlight "lightpink" c'4 4 \staffHighlight "lightsteelblue" g'8( fis g4)-. \staffHighlight "lightpink" c2 } << \new StaffGroup \with { \consists Staff_highlight_engraver } << \new Staff \with { \remove Staff_highlight_engraver } \music \new Staff \with { \remove Staff_highlight_engraver } \music >> \new Staff \music >>![]()
Se puede usar la propiedad StaffHighlight.shorten-pair para
trucar el comienso y final horizontales del objeto de extensión
del resaldado.
{ c'1 \once \override Staff.StaffHighlight.shorten-pair = #'(1.0 . 1.0) \staffHighlight lightsteelblue c'1 }![]()
Instrucciones predefinidas
\staffHighlight,
\stopStaffHighlight.
Véase también
Referencia de la notación: Colorear objetos, Modificar los complementos (plug-ins) de contexto.
Referencia de funcionamiento interno: StaffHighlight, staff-highlight-interface, Staff_highlight_engraver, StaffHighlightEvent, staff-highlight-event.
Advertencias y problemas conocidos
El comportamiento de los resaltados puede no ser el esperado en
las barras de inicio de una repetición. Se puede usar la
propiedad shorten-pair mostrada anteriormente para resolver
el problema.
{ \staffHighlight "lightsteelblue" c'1 \stopStaffHighlight \repeat volta 2 { c'1 } c'1 }![]()
| [ << Anotaciones editoriales ] | [Top][Contents][Index] | [ Texto >> ] |
| [ < Colorear objetos ] | [ Up: Dentro del pentagrama ] | [ Corchetes para material optativo > ] |
![[image of music]](../54/lily-bce338ec.png)
![[image of music]](../9a/lily-8e4bc514.png)
![[image of music]](../ab/lily-29072cb7.png)
![[image of music]](../7b/lily-56165aa1.png)
![[image of music]](../b1/lily-d47d7ca7.png)
![[image of music]](../37/lily-3ef04f1c.png)
![[image of music]](../79/lily-113a1b1a.png)