Jump to content

Translating notes from one language to another: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
No edit summary
Line 31: Line 31:
</lilypond>
</lilypond>


[[Category:Pitches]]
[[Category:Pitches]][[Category:Snippet]]

Revision as of 23:01, 21 November 2025

To change an input file written in a foreign language to your favorite language use \include "…language….ly" and \displayLilyMusic { \melody }.

The translation is by default written to the log; you can redirect this output to a file of your choice using the command lilypond.exe >yourfile.ly (with windows).

The result of the snippet will be in absolute pitch:

{
  c8 d e f g a b c |
  cflat dflat eflat fflat gflat aflat bflat cflat |
  csharp dsharp esharp fsharp gsharp aflat bsharp csharp |
  \bar "|."
    
}

\version "2.24"

%% http://lsr.di.unimi.it/LSR/Item?id=638

\include "deutsch.ly"

melody = {
  c8 d e f g a h c |
  ces8 des es fes ges as b ces |
  cis8 dis eis fis gis as his cis |
  \bar "|."
}

\include "english.ly"
\displayLilyMusic { \melody }

\paper { tagline = ##f }