Jump to content

Help talk:Score/Archive 2

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1Archive 2

still broken?

 { \set Staff.midiInstrument = #"trumpet" \set Score.tempoHideNote = ##t \tempo 4 = 110 \key d \major d''4. a'8 b' a' r4 }

Hi, I thought this was fixed, but I've run into trouble here. Do I need to add any parameters or something to fix this, or is this still broken? (I know I need to rewrite the notes into proper LilyPond notation, but I'd like to know if the score system is still broken altogether). Thank you, Dr. Vogel (talk) 23:36, 17 July 2021 (UTC)

It's still broken. Only (some) old <score> material can be shown. But there's hope; see phab:T257066 and the announcement there on 10 July 2021, and https://test.wikipedia.org/wiki/Score. -- Michael Bednarek (talk) 02:02, 18 July 2021 (UTC)
Thanks for your help. I've been playing at the test site that you pointed me to, and I've managed to learn enough of the language to put together the horn solo that I was trying to write down for the corresponding wikipedia article - hopefully showing soon. Dr. Vogel (talk) 13:51, 18 July 2021 (UTC)
After a little more than one year, <score> seems to be working now. -- Michael Bednarek (talk) 01:27, 20 August 2021 (UTC)

Audio playback is not supported in your browser

Yes audio works, but I get the message: Audio playback is not supported in your browser. You can download the audio file. (Opera 78.0.4093.147) Grimes2 (talk) 06:34, 20 August 2021 (UTC)
Which operating system? Does it work in other browsers? For Opera, I found this advice: "Got to Menu - Settings - Advanced. Look under Privacy and Security - Site Settings - Additional Content Settings - Sound - Click on the button to Allow Sites to Play Sounds." I don't have Opera to test that. -- Michael Bednarek (talk) 10:21, 20 August 2021 (UTC)
I've enabled a few scores from within Firefox running under AlmaLinux 8.4 When I checked The God of Abraham Praise for example it ran perfectly also under the Chromium browser. sorry though, I don't have opera on this machine. Martin of Sheffield (talk) 10:26, 20 August 2021 (UTC)
Also works with Firefox and Microsoft Edge under Windows 10. Martin of Sheffield (talk) 10:33, 20 August 2021 (UTC)
I've just installed Opera on the Win10 machine and it works for The God of Abraham Praise. The only setting I changed was to move the search engine from Google (which I avoid) to DuckDuckGo. Have you followed Michael's advice? Martin of Sheffield (talk) 10:43, 20 August 2021 (UTC)
OK, last test. I've now installed Opera under AlmaLinux with only the search engine change, and it works. Martin of Sheffield (talk) 10:54, 20 August 2021 (UTC)
I said already, that it works. But under every bar is the annoying message. Advice doesn't help. Grimes2 (talk) 13:06, 21 August 2021 (UTC)
No messages under any of the tests I did for you. Mind you, if you don't want help, why are you asking here? Martin of Sheffield (talk) 14:00, 21 August 2021 (UTC)
Thank you. But did you try Symphony No. 3 (Bruckner)? Grimes2 (talk) 14:08, 21 August 2021 (UTC)
@Michael Bednarek: . Brilliant news though. Martin of Sheffield (talk) 08:13, 20 August 2021 (UTC)

I get that message now too, on random pages. I fixed a LilyPond syntax problem on Symphony No. 3 (Bruckner) and enabled sound for all LilyPond score there, and now they all display that message, but the playback works. This is under Windows with Firefox and Chrome. But this doesn't happen for all pages, e.g. not on The God of Abraham Praise, Die Gedanken sind frei, or indeed on this page (the Hallelujah above), or on the Help page proper overleaf. I'm baffled. -- Michael Bednarek (talk) 13:03, 21 August 2021 (UTC)

Can confirm it. Grimes2 (talk) 13:14, 21 August 2021 (UTC)
This is being discussed at phab:T266307. -- Michael Bednarek (talk) 13:30, 21 August 2021 (UTC)
I investigated. The problem seems to be the indent (colon) before
:<score sound="1">
Grimes2 (talk) 14:28, 21 August 2021 (UTC)
I can confirm that. Under Firefox/Linux I see the message, but if I remove the colon it works in preview. I've just done the first movement, and will work down doing the others now. Martin of Sheffield (talk) 15:27, 21 August 2021 (UTC)
Thank you, Grimes, for finding that. It's a most mysterious interaction. A warning should be added the Help page overleaf. -- Michael Bednarek (talk) 01:08, 22 August 2021 (UTC)
phab:T266307 today announced that this will be fixed next week. -- Michael Bednarek (talk) 04:21, 25 August 2021 (UTC)

It seems the indentation problem is now fixed; see:

 {\set Score.tempoHideNote = ##t \tempo 4 = 144 c'' g'8 g'8 a'4 g'4 r4 b'-> c''-> r4}

I'm going to remove the warning about it in the documentation. -- Michael Bednarek (talk) 12:57, 3 September 2021 (UTC)

I don't know whether it was always possible two have two or more <score> tags in the same line, or whether this is new behaviour:
 { \set Staff.midiInstrument = #"trumpet" \set Score.tempoHideNote = ##t \tempo 4 = 110 \key d \major d''4. a'8 b' a' r4 }
 {\set Score.tempoHideNote = ##t \tempo 4 = 144 c'' g'8 g'8 a'4 g'4 r4 b'-> c''-> r4}
 { \set Staff.midiInstrument = #"trumpet" \set Score.tempoHideNote = ##t \tempo 4 = 110 \key d \major d''4. a'8 b' a' r4 }
This will only work when there's only white space, including line breaks, between the blocks. -- Michael Bednarek (talk) 14:01, 3 September 2021 (UTC)

Import help

Hi all! For Monymusk, I have a LilyPond score I'd like to import from here. However, when pasting it here and adding the score tags, it produces this:


\version "2.18.2"
<< <<
\new Staff { \set Staff.midiInstrument = "violin" \clef treble  \key g \major \numericTimeSignature \time 2/2 \partial 2 \relative g'' { 
        \mark \default g8 [ g8 ] g8 [ e8 ]  \repeat volta 2 {
        d8 [ g,8 b8 g8 ] d'8 [ g,8 c16 e8. ] | % 3
        d8 [ g,8 b8 g8 ] a8. [ b16 c16 e8. ] | % 4
        d8 [ g,8 b8 g8 ] d'8 [ g,8 c16 a'8. ] | % 5
        b,16 [ g'8. a,8. c16 ] b16 [ g8. c8. e16 ] \break | % 6
        d8 [ g,8 b8 g8 ] d'8 [ g,8 c16 e8. ] | % 7
        d8 [ g,8 b8 g8 ] a8. [ b16 c16 e8. ] | % 8
        d8 [ g,8 b8 g8 ] d'8 [ g,8 c16 a'8. ] | % 9
        b,16 [ g'8. a,8. c16 ] b16 [ g8. e'8 fis8 ] \break | \barNumberCheck #10 }
    \repeat volta 2 {
        \mark \default g8 [ d8 e16 fis16 g8 ] d8 [ g8 b,8. a'16 ] | % 11
        g16 [ d8. c8 a'8 ] b,8. [ g'16 a,8. fis'16 ] | % 12
        g8 [ d8 e16 fis16 g8 ] d8 [ b8 c8 a'8 ] | % 13
        b,8 [ g'8 a,8 c8 ] b8 [ g8 e'8 fis8 ] \break | % 14
        g8 [ d8 e16 fis16 g8 ] d8 [ g8 b,8. a'16 ] | % 15
        g16 [ d8. c8 a'8 ] b,8. [ g'16 a,8. fis'16 ] | % 16
        g8 [ d8 e16 fis16 g8 ] d8 [ b8 c8 a'8 ] | % 17
        b,8 [ g'8 a,8 fis'8 ] g8 [ a8 g8 e8 ] }
} }
>> >>
\layout { indent = #0 }
\midi { \tempo 4 = 100 }

I've tried tinkering with it, but LilyPond is fantastically complex, so I haven't made any progress. If that file doesn't work for some reason, alternatives are here or (in .mscz) here and here. Could anyone help? Cheers, {{u|Sdkb}}talk 23:46, 27 October 2021 (UTC)

@Sdkb: Simpler is usually better: I've fixed it into something that works with the current format of lilypond here on Wiki. Cheers, RandomCanadian (talk / contribs) 00:01, 28 October 2021 (UTC)
@RandomCanadian, perfect; much thanks! {{u|Sdkb}}talk 00:15, 28 October 2021 (UTC)

Annoying/slow play bar rendering

If a page contains both sound output from <score>...</score> (|sound=1) and from mw:Extension:TimedMediaHandler, the Lilypond play bar will reformat which can take considerable time. An extreme example can be seen at Mode (music). This behaviour is discussed at phab:T295514 and phab:T245377. A resolution might be some time off. -- Michael Bednarek (talk) 01:36, 23 November 2021 (UTC)

vorbis="1" deprecated

In "Help:Score" text, the parameter vorbis="1" is used. I think, its better to replace with sound="1". Grimes2 (talk) 11:10, 18 December 2021 (UTC)

Some Renaissance notation bits don't seem to be working

I can't seem to make a few documented Lilypond functions, which I need to transcribe a 1651 book, work. I may just be doing something stupid, but here are minimal examples. Any advice welcome!

Can't change default neutral stem direction (fixed)

<score>
\relative c'' {
  a b c b
  \stemUp
  a b c b
  \stemDown
  a b c b
}
</score>

\relative c'' {
  a b c b
  \stemUp
  a b c b
  \stemDown
  a b c b
}
<score>
\relative c'' {
  a b c b
  \override Stem.neutral-direction = #up
  a b c b
  \override Stem.neutral-direction = #down
  a b c b
}
</score>

\relative c'' {
  a b c b
  \override Stem.neutral-direction = #up
  a b c b
  \override Stem.neutral-direction = #down
  a b c b
}

The desired effect is that the A and B notes be stem-up, and the C notes stem-down, without having to set the stem direction manually each time the melody crosses the center of the staff. THe music to be transcribed consistently has a neutral stem direction (stem direction on the center line) of down. HLHJ (talk) 19:14, 24 January 2022 (UTC)

<score>
\relative c'' {
  a b c b
  \override Stem.neutral-direction = #UP
  a b c b
  \override Stem.neutral-direction = #DOWN
  a b c b
}
</score>

\relative c'' {
  a b c b
  \override Stem.neutral-direction = #UP
  a b c b
  \override Stem.neutral-direction = #DOWN
  a b c b
}

I just needed to all-capsize the vars! HLHJ (talk) 19:17, 24 January 2022 (UTC)

Can't change final barline (partially diagnosed)

<score>
\relative c'' { \defineBarLine "||||" #'("||" "   " "||") 
  a b c b \bar "||||" 
  a b c b \bar "||||" 
}
</score>

\relative c'' { \defineBarLine "||||" #'("||" "   " "||") 
  a b c b \bar "||||" 
  a b c b \bar "||||" 
}

I wanted a space between those two finalis marks, too, ideally, but "\finalis" does not render at all:

<score>
\relative c'' { 
  a b c b \finalis
  a b c b
}
</score>

Unable to compile LilyPond input file:

line 3 - column 11:
unknown escaped string: `\finalis'
--------
line 3 - column 11:
string outside of text script or \lyricmode

Changing to a single barline at the end works:

<score>
\relative c'' { 
  a b c b \bar "||" 
  a b c b \bar "|" 
}
</score>

\relative c'' { 
  a b c b \bar "||" 
  a b c b \bar "|" 
}

Having two barlines in succession doesn't work, but in this case I don't have evidence in the docs that this is supposed to work:

<score>
\relative c'' { 
  a b c b \bar "||" \bar "||" 
  a b c b \bar "||" \bar "||" 
}
</score>

\relative c'' { 
  a b c b \bar "||" \bar "||" 
  a b c b \bar "||" \bar "||" 
}
It seems the "finalis" mark isn't working because I need '\include "gregorian.ly" ' in my Lilypond file. See Wikipedia talk:WikiProject Music theory#\include "gregorian.ly". In modern notation there is no call for such succcessive bar lines, so it makes sense that they can't be rendered in standard mode. HLHJ (talk) 18:33, 12 February 2022 (UTC)

Can't get mensural glyphs (diagnosed)

For mensural-style sharps and flats:

<score>
\new Staff {\key f \major
  \override Staff.Accidental.glyph-name-alist = #alteration-mensural-glyph-name-alist
  \override KeySignature.glyph-name-alist = #alteration-mensural-glyph-name-alist
  \relative c'' { 
    ais b c bes
  }
}
</score>

\new Staff {\key f \major
  \override Staff.Accidental.glyph-name-alist = #alteration-mensural-glyph-name-alist
  \override KeySignature.glyph-name-alist = #alteration-mensural-glyph-name-alist
  \relative c'' { 
    ais b c bes
  }
}

Alas, the all-caps trick does not seem to work here. HLHJ (talk) 19:24, 24 January 2022 (UTC)

<score>
\new Staff {\key f \major
  \override Staff.Accidental.glyph-name-alist = #ALTERATION-MENSURAL-GLYPH-NAME-ALIST
  \override KeySignature.glyph-name-alist = #ALTERATION-MENSURAL-GLYPH-NAME-ALIST
  \relative c'' { 
    ais b c bes
  }
}
</score>

\new Staff {\key f \major
  \override Staff.Accidental.glyph-name-alist = #ALTERATION-MENSURAL-GLYPH-NAME-ALIST
  \override KeySignature.glyph-name-alist = #ALTERATION-MENSURAL-GLYPH-NAME-ALIST
  \relative c'' { 
    ais b c bes
  }
}
Does anyone know the name of this mystery glyph? Apparently it's a breath mark, 1651, London

Finally, if anyone knows if Lilypond has a glyph for these strikethru-fermata breathing marks, or even knows what they are called, that would be very useful knowledge. HLHJ (talk) 02:09, 23 January 2022 (UTC)

It seems this isn't working because I need '\include "gregorian.ly" ' in my Lilypond file. See Wikipedia talk:WikiProject Music theory#\include "gregorian.ly". HLHJ (talk) 18:32, 12 February 2022 (UTC)

Sound frequency

What is the pitch standard of the generated audio? Is it A440? bdijkstra (talk) 15:51, 26 March 2022 (UTC)

@Bdijkstra: I guess that's the case. The only mention in the documentation that I could find is that, implicitly, lilypond tuning and pitches are designed with common practice era (i.e. western classical music) in mind. If you absolutely want to display a difference in pitch, it likely is easier using another software (MuseScore allows for altering the pitch of each note individually, as well as the overall tuning pitch); unless it's an easy interval (say, the difference between A440 and A415), although seemingly it is also possible to do it on Lilypond. Cheers, RandomCanadian (talk / contribs) 16:06, 26 March 2022 (UTC)

Unfold-repeats midi (fixed)

According to the relevant section of the Lilypond docs, the only way to have a MIDI file that repeats the score's notated repeat sections is to have two separate /score blocks (one for the visual score and one for the midi sound), and unfold all the repeats in the MIDI block. On-wiki, that would be two separate <score> blocks, but while getting the visual score block to not display a MIDI file is easy, I don't know of any method to make the MIDI score block not display the score. One could upload the MIDI as a sound file to Commons, but I'm hoping for a slightly less slow and kludgy method of playing repeats correctly. The notation is archaic and it's not going to be obvious otherwise. Something like a "sound=unfold" parameter would be ideal. Does anyone have suggestions? HLHJ (talk) 00:49, 1 February 2022 (UTC)

This works:

\header { tagline = "" }
\score {
  \relative c' \repeat volta 2 {c d e f}
  \layout { }
}
\score {
  \unfoldRepeats {
    \relative c' \repeat volta 2 {c d e f}
  }
  \midi { }
}
-- Michael Bednarek (talk) 02:50, 1 February 2022 (UTC)
Thank you, Michael Bednarek! I tried something like that, and I must have messed it up somehow, as it didn't work. Now I have a working example I should have no problems. Much obliged. HLHJ (talk) 00:37, 2 February 2022 (UTC)
Excellent, I was struggling with this! I added your example to the help page, Help:Score#Repeated_sections_and_MIDI Skierpage (talk) 01:15, 22 May 2022 (UTC)

SVG output, backgrounds in dark mode

Is there any progress in getting this to output SVG images instead? This might help with another problem: when looking at Wikipedia with a dark theme, the transparency in the existing PNG images produces unreadable music in dark mode (e.g. File:Score PNG output in dark theme.png). Are there options to enable a white background?—Jon (talk) 01:19, 11 June 2022 (UTC)

XML

Is there any possibility to get a musical score encoded with GNU LilyPond or ABC markup syntax from existing xml format? A1 (talk) 19:36, 10 June 2022 (UTC)

I think there is a lilypond-to-MusicXML format conversion available (think even comes with basic lilypond, might be wrong), but the other way round I'm not sure RandomCanadian (talk / contribs) 23:42, 10 June 2022 (UTC)
I thought the same too, but unfortunaltely no. Some google search like this leds to 404 ot empty pages. A1 (talk) 21:49, 18 June 2022 (UTC)

Bug with Quarter Tone Chord Playback

Microtonal chords don't seem to play back correctly. For instance, here is an excerpt formerly from the Quarter tone page:


\relative c' {
\omit Staff.TimeSignature
\set Score.tempoHideNote = ##t
<c dih f gih bes>1 \bar "|" <c f gih bes dih>1 \bar "|."
}

Note that the chords are, for whatever reason, being rendered in 12 equal with no quarter tones at all. The rendered notes are C D F Ab Bb, C# F# A B D#. This indicates some kind of bug in the rendering software when rendering microtonal chords.

This does render correctly if we play them one note at a time:


\relative c' {
\cadenzaOn \omit Staff.TimeSignature
\tempo 1 = 90 \set Score.tempoHideNote = ##t
c dih f gih bes \bar "|" c, f gih bes dih \bar "|."
}

although you can still hear pitch bends shifting in the release tail, which makes me think that the source of the problem is that the different MIDI notes are all being played on MIDI channel #1, and thus there are multiple conflicting pitch bend messages (typically microtonal chords have each note played on different channels for this reason, so that one can tune the different notes individually). :::: — Preceding unsigned comment added by 2601:42:702:9F90:50CB:C35E:58B:CC6D (talk) 20:01, 30 October 2022 (UTC)

This limitation (microtonal chords) is noted in the current (2.22) LilyPond documentation, "Unsupported notation for MIDI". — Jon (talk) 23:47, 28 November 2022 (UTC)

Recreate Russian anthem

I recreated the Russian National anthem using the score feature:


 \relative c' {
   \key es \major
   \time 4/4
   \tempo 4=75
   es2. r8 bes es4 bes8. c16 d4 g,8 g c4 bes8. aes16 bes4 es,8 es f4 f8. g16 aes4 aes8. bes16 c4 d8 es8 f4. bes,8 g'4 f8. es16 f4 d8 bes8 es4 d8. c16 d4 g,8 g c4 bes8. aes16 bes4 es,8 es es'4 d8. c16 bes2 g' f8 es d es f4. bes,8 bes2 es2 d8 c bes c d4. g,8 g2 es'4 c8. d16 es4 c8. d16 es4 c8 es aes2 aes g8 f es f g4. es8 es2 f es8 d c d es4. c8 c2 es4 d8. c16 bes4 es,8 es es'4 d8. c16 bes4. bes8 es4 bes8. c16 d4 g,8 g c4 bes8. aes16 bes4 es,8 es f4 f8. g16 aes4 aes8. bes16 c4 d8 es8 f4. bes,8 g'4 f8. es16 f4 d8 bes8 es4 d8. c16 d4 g,8 g c4 bes8. aes16 bes4 es,8 es es'4 d8. c16 bes2 g' f8 es d es f4. bes,8 bes2 es2 d8 c bes c d4. g,8 g2 es'4 c8. d16 es4 c8. d16 es4 c8 es aes2 aes g8 f es f g4. es8 es2 f es8 d c d es4. c8 c2 es4 d8. c16 bes4 es,8 es bes'2 c4 d es1
  }

2601:C6:D281:6710:914B:28A0:A21E:46A3 (talk) 14:43, 31 August 2023 (UTC)

Time signature

How do I actually get the time signature to properly appear when it’d otherwise wouldn’t? 2601:C6:D281:6710:C8A8:BCDF:36EE:6A13 (talk) 23:32, 25 August 2023 (UTC)

Why wouldn't it? It always appears unless it's suppressed: <score> c' </score> gives
 c'
-- Michael Bednarek (talk) 02:17, 26 August 2023 (UTC)
But look at the Wikipedia page for the diminished triad (Diminished triad), the syntax gives:

{
\override Score.TimeSignature #'stencil = ##f
\relative c' {
   \clef treble 
   \time 4/4
   \key c \major
   <b d f>1
} }
2601:C6:D281:6710:914B:28A0:A21E:46A3 (talk) 14:27, 31 August 2023 (UTC)
The time signature in that snippet doesn't appear because it's deliberately suppressed by \override Score.TimeSignature #'stencil = ##f. -- Michael Bednarek (talk) 02:12, 1 September 2023 (UTC)