Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
LilyPond wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Key signature and small staff
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Traditionally, smaller staves key signature spacing is slightly different than full size staves ones. Here's a function that automatically calculates the right key signature spacing according to the staff size. <lilypond version="2.24.0" full> %% => http://lsr.di.unimi.it/LSR/Item?id=1094 %% This extends \staffSize as defined in %% "Changing the size of a staff with a music function" %% http://lsr.di.unimi.it/LSR/Item?id=862 staffSize = #(define-music-function (new-size) (number?) #{ \set fontSize = #new-size \override StaffSymbol.staff-space = #(magstep new-size) \override StaffSymbol.thickness = #(magstep new-size) \override KeySignature.padding = #(* 2/3 (- 1 (magstep new-size))) #}) keyTest = { \key cis\major s4*4 \bar "" } \markup\italic "Default output:" << \new Staff \with { fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) } \keyTest \new Staff \keyTest >> \markup\italic "Traditional output:" << \new Staff \with { \staffSize #-3 } \keyTest \new Staff \keyTest >> %{ % For v.2.19 and higher: scaleStaff = #(define-music-function (scaleFac) (number?) #{ \magnifyStaff #scaleFac \override KeySignature.padding = #(* 2/3 (- 1 scaleFac)) #}) sizeTest = #5/7 keyTest = { \key cis\major s4*4 \bar "" } << \new Staff \with { \scaleStaff #sizeTest } \keyTest \new Staff \keyTest >> %} \paper { tagline = ##f } </lilypond> [[Category:Staff notation]] [[Category:Vocal music]] [[Category:Spacing]] [[Category:Contexts and engravers]] [[Category:Tweaks and overrides]] [[Category:Specific notation]] [[Category:Workaround]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Key signature and small staff
Add topic