[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Displaying StaffGroupBar after tweak
From: |
Karim Haddad |
Subject: |
Re: Displaying StaffGroupBar after tweak |
Date: |
Sun, 25 Jun 2023 21:13:26 +0200 |
Dear Jean,
A million thanx. That's great it works like a charm.
You made my day!
Best
Karim
On Sun, Jun 25, 2023 at 08:38:18PM +0200, Jean Abou Samra wrote:
> Le vendredi 16 juin 2023 à 15:24 +0200, Jean Abou Samra a écrit :
>
>
> > >
> > I don't have the time to find a solution right now, but for a start, here
> > is already a more "M" MWE: [...]
>
>
>
> This appears to work better:
>
>
>
> ```
> \version "2.24.1"
>
> #(define (Workaround_engraver context)
> (let ((bars '())
> (staff-symbol #f)
> (new-staff-symbol #f))
> (make-engraver
> (acknowledgers
> ((staff-symbol-interface engraver grob source-engraver)
> (set! new-staff-symbol grob))
> ((bar-line-interface engraver grob source-engraver)
> (set! bars (cons grob bars))))
> ((stop-translation-timestep engraver)
> (for-each (lambda (bar)
> (ly:grob-set-object! bar 'staff-symbol (or staff-symbol
> new-staff-symbol)))
> bars)
> (when new-staff-symbol
> (set! staff-symbol new-staff-symbol)
> (set! new-staff-symbol #f))
> (set! bars '())))))
>
> kHide = {
> \stopStaff
> \override Staff.StaffSymbol.line-count= 1
> \startStaff
> }
>
> \new StaffGroup <<
> \new Staff \with { \consists #Workaround_engraver } { R1 R1 \break \kHide
> R1 R1 }
> \new Staff { R1 R1 R1 R1 }
> >>
> ```
>
--
Karim Haddad
Music Representations Team, IRCAM
Research and development manager.
email : karim.haddad@ircam.fr
webpage : http://karim.haddad.free.fr