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
Customized accidentals
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!
The following example shows how to obtain customized alterations. It is achieved in three steps: * Replace the alteration with a \markup object (which is printed by the text-interface) * Specify the \markup itself (as we still want an alteration to be printed, we have to use the \musicglyph command) * Add a \postscript simple design in the markup, using simple commands like <code>lineto</code> or <code>moveto</code>. Notice that the coordinates are to be entered ''before'' each postscript command. Such accidentals can be used to print semitones instead of the default LilyPond glyphs. <lilypond version="2.24.0"> %% http://lsr.di.unimi.it/LSR/Item?id=378 upp = #(define-music-function (note) (ly:music?) #{ \once \override Voice.Accidental.stencil = #ly:text-interface::print \once \override Voice.Accidental.text = \markup {\musicglyph "accidentals.sharp" \postscript "gsave 0.17 setlinewidth -1.4 0.5 moveto -1.4 2 lineto stroke grestore gsave 0.1 setlinewidth -1.7 1.4 moveto -1.4 2.18 lineto -1.1 1.4 lineto stroke grestore"} $note #}) dwn = #(define-music-function (note) (ly:music?) #{ \once \override Voice.Accidental.stencil = #ly:text-interface::print \once \override Voice.Accidental.text = \markup {\musicglyph "accidentals.flat" \postscript "0.17 setlinewidth -2 0.5 moveto -0.6 1.8 lineto stroke " } $note #}) \relative c' { d \dwn bes d \upp gis } </lilypond> [[Category:Pitches]] [[Category:Contemporary notation]] [[Category:Symbols and glyphs]] [[Category:Version-specific]]
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
Customized accidentals
Add topic