Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
4 votes
1 answer
88 views

Increment variable in Lilypond function

My Lilypond score consist of repeat snippets a few bars each. I need to show the snippet number as markup. The score is being updated regularly by inserting new snippets, hence the snippet number ...
Stelian Dumitrascu's user avatar
4 votes
1 answer
68 views

Kerning problems regarding stencil combinations in LilyPond

When combining two stencils / shapes in lilypond, is it possible to set the padding between the two shapes based on the actual content of them instead of their bounding boxes? I would like the ideal ...
Van Lee F. X. P.'s user avatar
3 votes
2 answers
191 views

Lilypond: How to modify stencil by automatically getting the current stencil and do something based on it?

In a score I am working on recently, I need to add brackets to certain notation elements such as rests, accidentals and stems. To achieve this purpose I found a quite useful snippet on LSR. This ...
Van Lee F. X. P.'s user avatar
3 votes
1 answer
81 views

FiguredBass with parentheses

I've been struggling with doing some \markups inside \figuremode because I would like to define some commands or functions to include all the boilerplate code inside. For example, trying to put ...
Mike Music's user avatar
4 votes
1 answer
282 views

Create a custom articulation in LilyPond

Could someone provide me with a minimal example of a new, custom articulation in LilyPond? Let's say, for the sake of simplicity, that we use glyph "a" as the articulation, and let's call it ...
Kresimir's user avatar
  • 455
1 vote
0 answers
90 views

Slur shape change

Using LilyPond, I am re-typesetting a score which uses an unusual symbol. Essentially, it is a slur between two adjacent notes, but the slur is mirror-imaged around its longest dimension. ...
Charles Nix's user avatar
1 vote
1 answer
133 views

Scheme function for time signatures in LilyPond

I would like to notate a piece proportionally in LilyPond in which different time signatures are layered polymetrically. To do this, I want to place the time signatures above the staves, or more ...
kleinlosen's user avatar
7 votes
3 answers
130 views

LilyPond - Can I change the scoreTitleMarkup style/content depending on the page number?

Question: Is there a way to change how the score title appears based on whether it’s on an odd or even page? Given: % --- paper.ily \paper { scoreTitleMarkup = \markup \column { \fill-line { ...
Neal's user avatar
  • 3,504
2 votes
0 answers
123 views

How to create a custom markup for chord names in lilypond

I am trying to display chord names left from the chord diagrams in lilypond. Based on answers in this question I was able to offset the positions of the diagrams and respective chord names, but the ...
JAV's user avatar
  • 183
2 votes
1 answer
122 views

Lilypond : Multi bar, multi repeat in one measure

Following Lilypond: Single bar, multiple repeat, I want this for a multi measure repeat. I'm converted (./.) to (.//.) with percperc = \markup\concat{ \raise #0.5 \musicglyph #"dots.dot" ...
Fortissimo's user avatar
2 votes
1 answer
193 views

Iterate through a list argument in Lilypond define-scheme-function

I'm trying to write my first define-scheme-function in Lilypond, and I'm stuck. I'm wanting to output a variable number of handbell 'echo' notations within a single measure. This is working for a ...
Mark's user avatar
  • 123
5 votes
1 answer
415 views

Difference between "Extending LilyPond" and "Scheme (in LilyPond)"

What are the differences between Extending LilyPond and Scheme (in LilyPond)? AFAICS there is on the one side the work of Urs Liska in this github repository that was forked by Jean Abou Samra (see ...
wolfrevo's user avatar
  • 253
2 votes
1 answer
118 views

Documentation of lilypond's scheme classes (Pitch, Score etc.)

Where are lilypond's scheme classes (Pitch, Score etc.) documented? For example the documentation of the scheme-function ly:pitch? says "Is x a smob of class Pitch?". But there is no link or ...
wolfrevo's user avatar
  • 253
4 votes
2 answers
299 views

Applying a given markup to two consecutive syllables in lyrics

Given the following LilyPond MWE: melody = \relative c' { a( b) c } lyra = \lyricmode { Foo bar baz } lyrb = \lyricmode { Foo -- bar baz } lyrc = \lyricmode { Foo __ bar baz } \score { &...
Laércio de Sousa's user avatar
1 vote
1 answer
117 views

Can I create separate variables for duration and pitch in LilyPond and combine them?

How would I go about defining two separate variables where one can be mapped onto the other to produce some typical output? For instance: durations = { 4 8 8 2 } pitches = { e' g' f' a' } \score { ...
Neal's user avatar
  • 3,504
7 votes
1 answer
242 views

Lilypond (v2.24) macro delivers unexpected results

Writing up a piece for guitar I'm not happy with the common strumming tabulature 'stroke up' and 'stroke down' symbols (^\downbow, ^\upbow) and want to replace them with up- and down arrow heads. In ...
HarryH's user avatar
  • 267
5 votes
2 answers
240 views

Re-define lilypond's `format-mark-box-alphabet`

Say I wanted to re-define the format-mark-box-alphabet using a custom scm command. How can this be done? Here is a MWE where I would want both marks to be identical, with the double outline. \version &...
Bastian's user avatar
  • 227
0 votes
1 answer
89 views

Define markup function extension

I have markup extension to create custom linked markup. The function is, shown below: (define-markup-command (refer layout props ts) (number?) (interpret-markup layout props (...
Ken Ledeen's user avatar
3 votes
1 answer
70 views

Adding a page break to a book via Scheme

I am writing a Scheme function to semi-automatically compile a few different books from a source file (with various sets of scores, instruments etc. included in each book). When handling a Book object,...
Circonflexe's user avatar
4 votes
1 answer
145 views

Modify markup with a scheme function

This seems quite straightforward, but I've spent far too much time struggling. I frequently using markup of the form: \markup \with-url#"https:\\youtu.be ..... t=214" {ref} This creates a ...
Ken Ledeen's user avatar
6 votes
1 answer
304 views

How can I engrave consecutive rehearsal marks now that the multi-mark engraver does not work anymore for this purpose in Lilypond 2.24.1?

In 2011, Xavier Scheuer published a code snippet allowing consecutive rehearsal marks using the multi-mark engraver. The code worked until now. In Lilypond 2.24.1 it fails. Here is an example that ...
facetus's user avatar
  • 1,169
3 votes
2 answers
156 views

How to conditionally add dynamics in music function?

I have a moderately complicated, repetitive section in a piece. Thus, I want to use a shortcut to typeset it all. However, the dynamic can change. For example, sometimes I will want to attach a \sf, ...
hsgg's user avatar
  • 33
2 votes
1 answer
133 views

Lilypond: transpose a sequence to modes with different intervallic structure

I am looking for a Lilypond function to transpose sequences of notes between modes that have different intervallic structure (e. g. from major to harmonic minor). My assumption is that the modes have ...
Andrei M's user avatar
7 votes
1 answer
420 views

How to pass duration to lilypond function

I defined a simple function: disdn = #(define-music-function (d) (ly:duration?) #{ <dis ais dis g>#d #}) I am calling it as follows: \disdn #8 I am getting an error: wrong ...
kargirwar's user avatar
  • 650
5 votes
2 answers
545 views

LilyPond: How to avoid pitch-squashed chords ending up as colliding noteheads?

On the guitar it is common, both, to follow staff notation, as well as to strum chords given by their names. Using Lilypond, I am trying to notate explicit notes in staff notation and named chords ...
rfbw's user avatar
  • 361
3 votes
1 answer
243 views

Lilypond: Single bar, multiple repeat

Drum charts are often very repetitive, so frequently a bar will have a repeat count indicated above it. Examples shown here: (from http://www.play-drums.com/Pad/lesson11-repeats.asp) I've been able ...
Chris Glover's user avatar
3 votes
1 answer
90 views

dynamically update lilypond variables (using scheme?)

I have a bunch of organ scores with 4 voices (sopMusic, altoMusic, tenorMusic, bassMusic). Each of those voices consists of two alternating snippets of music. For example, under sopMusic we would find ...
Ryan's user avatar
  • 73
2 votes
1 answer
118 views

Align \markup and fermata in make-music-function?

The end goal is to have some function that takes a rest and optional text and outputs the rest with a fermata, boxed "vocals", and the optional key words. Inspired by this question, I was ...
cjm's user avatar
  • 1,123
2 votes
1 answer
410 views

Using conditionals in LilyPond scheme functions

I have a software development background, but I'm new to LilyPond. I'm trying to create a function that will allow me to pass in a number and then return some text depending on which number is passed ...
Scott Vander Molen's user avatar
1 vote
3 answers
118 views

How does one recall the current context properties for MIDI effects in Lilypond?

After setting the a context property for a MIDI effect, for example \set Staff.midiChorusLevel = #2, how would I save this value into a variable inside a Scheme function, should I want to temporarily ...
twp's user avatar
  • 11
7 votes
1 answer
322 views

How to display Alt chords in Lilypond?

I can get Lilypond to display Alt chords on a lead sheet by explicitly spelling the Alt chord, but this seems like a real nuisance. Here is an example: \version "2.22.2" \header { title =...
user avatar
2 votes
1 answer
172 views

creating a bookpart generating scheme function in lilypond

I am creating a piano book in LilyPond, which I am using for the first time. I am separating each piece into its own \bookpart, and if any of them have multiple movements, then each movement is in a ...
Dubl's user avatar
  • 97
5 votes
3 answers
175 views

Get the current time signature numerator/denominator

I'm transcribing a piece with extremely frequent time changes. Some parts have a lot of full-measure rests. I'm trying to define a function that produces a full-measure rest based on the current time ...
Thom Smith's user avatar
3 votes
2 answers
72 views

Lyluatex Reuse code: Stylesheet or newcommand

I want to color all the stanza numbers of many hymns with red. I would like to keep the color definition in a stylesheet and only pass "the number and dot" of the stanza as a parameter. I ...
hpcolos's user avatar
  • 171
2 votes
1 answer
136 views

Replace note name with variable - lilypond [closed]

nl = \break % it's true, ok! a = \axyz % this is wrong with output time adds 1 2 4 8 16 .. \axyz16 \axyz4 % etc. Is it possible to build variable to replace notes? Maybe with Scheme? I would like to ...
semiono's user avatar
  • 71
3 votes
1 answer
178 views

Create new \score-like context/template in Lilypond

My current project is to create a number of short snippets for doumbek. To create each snippet, I use the following \score block: \header { piece = "Name here" } % different for each ...
cjm's user avatar
  • 1,123
2 votes
1 answer
119 views

Lilypond Scheme Substitution function not using its arguments properly?

I would like to create a Lilypond music function that allows me to express this MWE: { \override Score.SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/30) a b c } as \spn #1 #30 { a b c } ...
Mahanidhi's user avatar
  • 514
4 votes
2 answers
467 views

"Wrong number of arguments to #<procedure #f (music)>" when trying to execute a snippet from Lilypond Documentation

I'm trying to use the code from a snippet found on the official documentation on "Displaying pitches" (scroll down to "Known issues and warnings"): \version "2.18.2" ...
Glorfindel's user avatar
  • 3,644
3 votes
1 answer
322 views

lilypond scheme function optional argument

How do I make an argument in a scheme function optional? This says A Scheme type predicate for which argN must return #t. There is also a special form (predicate? default) for specifying optional ...
Kjara's user avatar
  • 758
3 votes
1 answer
400 views

correctly calling a lilypond scheme function

I have some general questions regarding calling a scheme function which I will ask using the following example code (which gives no errors and produces an output pdf): \version "2.20.0" ...
Kjara's user avatar
  • 758
4 votes
2 answers
168 views

LilyPond: modifying woodwind diagrams

Regarding woodwind diagram in LilyPond such as: \markup { \center-column { \override #'(size . 0.7) { \woodwind-diagram #'flute #'((cc . (oneF two three four five six)) (...
Tommy_tsa's user avatar
  • 425
3 votes
1 answer
328 views

How to change the MIDI tempo with scheme?

I would like to create a function which would automate some tempo changes in my score (it would be hidden on the score with something like \override Score.MetronomeMark #'transparent = ##t, indeed the ...
yolenoyer's user avatar
  • 133
2 votes
0 answers
140 views

Lilypond - Slur arrow-heads changable between left and right side

I found this code for slur-arrows in this question and adapted this answer to make it look nicer. \version "2.22.0" slurArrow = \once \override Slur.stencil = #(lambda (grob) (let* ((...
nath's user avatar
  • 1,989
4 votes
2 answers
240 views

LilyPond: parenthesized hairpin

I found LilyPond code to place a hairpin between parenthesis like this: You can see that the result overlaps with the bar line. The code that does it is some hard-core Scheme hackery. One obviously ...
facetus's user avatar
  • 1,169
3 votes
4 answers
266 views

Custom dynamic mark

I am in the process of engraving a sheet of piano music. I wrote a custom dynamic mark — the look of which I am very happy with, but the behavior, not totally. It is the following: mff = \tweak ...
MacroController's user avatar
4 votes
1 answer
195 views

Include \markup in define-music-function

I want a custom \breathe sign that can be freely positioned, like: I have some shortcut code for this: place = #(define-music-function (parser location xy) (pair?) #{ \...
Patrik's user avatar
  • 143
4 votes
1 answer
244 views

LilyPond: passing music symbols as arguments to a function / markup-command

I am preparing in LilyPond a music book divided into many sections, each having a title. I want to keep the formatting of all titles in a single place, to make future format changes easier, and know ...
Buchuck's user avatar
  • 63
5 votes
1 answer
605 views

Conditionally transpose up versus down in LilyPond?

In version 2.19.x, how can I make LilyPond decide whether – and by how much – to transpose up or down, depending on a target octave/range for one of the transposed notes (I'll call that note the "...
Joan Eliot's user avatar
4 votes
2 answers
241 views

How can I create a rest the same length as a block of music?

I'm typesetting music (a set of versicles and responses), some of which are accompanied and some of which aren't, and I'm using some custom Scheme functions to collect pieces in parallel (and ...
chrylis -cautiouslyoptimistic-'s user avatar
3 votes
2 answers
1k views

How to define a LilyPond function to return set of notes given a pitch?

I'm working on a song with a repetitive rhythm that changes pitch. As this would normally involve a large amount of repeated typing, so I would like to define a LilyPond function to do this for me. I'...
cat40's user avatar
  • 374