Jump to content

Modifying default values for articulation shorthand notation: Difference between revisions

From LilyPond wiki
No edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
The shorthands are defined in <code>ly/script-init.ly</code>, where the variables <code>dashHat</code>, <code>dashPlus</code>, <code>dashDash</code>, <code>dashBang</code>, <code>dashLarger</code>, <code>dashDot</code>, and <code>dashUnderscore</code> are assigned default values. The default values for the shorthands can be modified. For example, to associate the <code>-+</code> (<code>dashPlus</code>) shorthand with the ''trill'' symbol instead of the default ''+'' symbol, assign the value <code>\trill</code> to the variable <code>dashPlus</code>:
The shorthands are defined in <code>ly/script-init.ly</code>, where the variables <code>dashHat</code>, <code>dashPlus</code>, <code>dashDash</code>, <code>dashBang</code>, <code>dashLarger</code>, <code>dashDot</code>, and <code>dashUnderscore</code> are assigned default values. The default values for the shorthands can be modified. For example, to associate the <code>-+</code> (<code>dashPlus</code>) shorthand with the ''trill'' symbol instead of the default +symbol, assign the value <code>\trill</code> to the variable <code>dashPlus</code>:
 
<lilypond version="2.24" full>
\paper { tagline = ##f }


<lilypond version="2.24">
\relative c'' { c1-+ }
\relative c'' { c1-+ }


Line 12: Line 10:


[[Category:Expressive marks]]
[[Category:Expressive marks]]
[[Category:Expressive marks]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]][[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 14:39, 3 December 2025

The shorthands are defined in ly/script-init.ly, where the variables dashHat, dashPlus, dashDash, dashBang, dashLarger, dashDot, and dashUnderscore are assigned default values. The default values for the shorthands can be modified. For example, to associate the -+ (dashPlus) shorthand with the trill symbol instead of the default “+” symbol, assign the value \trill to the variable dashPlus:

\version "2.24"

\relative c'' { c1-+ }

dashPlus = \trill

\relative c'' { c1-+ }