lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How apply \magnifyStaff to full StaffGroup?


From: Mats Bengtsson
Subject: How apply \magnifyStaff to full StaffGroup?
Date: Sun, 7 Apr 2024 18:45:34 +0200
User-agent: Mozilla Thunderbird

Hi,

In the piano scores for piano quartets, and similarly, I haven't managed to find a way to apply \magnifyStaff to all the staves of the remaining instruments, using a single \with statement on the StaffGroup level. I can achieve what I want, using a \with{...} statement for each separate Staff, but the .ly file would look nicer and it would save some typing (well, some copy/pasting) to be able to apply the settings to the full StaffGroup at once.

Trying the most obvious thing, results in an ugly error message
===============
/home/matben/lilypond-2.25.13/share/lilypond/2.25.13/ly/init.ly:66:2: error: Guile signaled an error for the _expression_ beginning here
#
 (let ((book-handler (if (defined? 'default-toplevel-book-handler)
In procedure ly:context-property: Wrong type argument in position 1 (expecting Context): #f
===============

Here's an example file, showing my failed attempt that gave the above error message, as well as the more verbose code that gives the desired output:

\version "2.25.12"

v = \fixed c' {
  c4 d e f
}

LH = \fixed c' {
  <c e g>1
}

RH = \fixed c {
  \clef bass
  c1
}


% Gives error message:
\score{
<<
  \new StaffGroup \with{ \magnifyStaff #5/7 }
  <<
    \new Staff \v
    \new Staff \v
    \new Staff \v
  >>
  \new PianoStaff <<
    \new Staff \LH
    \new Staff \RH
  >>
>>
}

% Desired layout:
\score{
<<
  \new StaffGroup <<
    \new Staff \with{ \magnifyStaff #5/7 } \v
    \new Staff \with{ \magnifyStaff #5/7 } \v
    \new Staff \with{ \magnifyStaff #5/7 } \v
  >>
  \new PianoStaff <<
    \new Staff \LH
    \new Staff \RH
  >>
>>
}

Any suggestions? In the full score, I will also need to include the workaround mentioned at the bottom of https://lilypond.org/doc/v2.25/Documentation/notation/setting-the-staff-size, which makes the verbose version of the .ly code even more verbose and repetitive.

    /Mats


reply via email to

[Prev in Thread] Current Thread [Next in Thread]