# Lilypond tremolo and tuplets

I am inputting a score and struggling with repeated triplets.

In the snippet

• `A` is visually what is in the manuscript
• `B` is my understanding of the musical intention
• `C` is as close as I can get in lilypond.
``````\version "2.20.0"

\score {
\new Staff \relative c'  <<
{
\time 2/4
c8^"A" d8:16[_3 e:_3 f:]_3 |
c8^"B" \tuplet 3/2 8 {d16 d d e e e f f f} |
c8^"C" \repeat tremolo 3 \tuplet 3/2 d16[
\repeat tremolo 3 \tuplet 3/2 e16
\repeat tremolo 3 \tuplet 3/2 f16] |
}
>>
}
``````

Is there a concise way to input this?

I'm also slightly concerned about the dotting in my attempt (`C`) compared to the manuscript (`A`). Is there a preferred style? In case it's relevant the manuscript dates to about 1910.

• What’s wrong with B? Sight reading, I would play it correctly. For both A and C I would stop and scratch my head, and without the explanation here, maybe would never get it right. Part of the problem is —IF B is intended —then A and C beam the second half of the first beat into the second beat. I see three notes sharing a beam, especially with all these “3”s around, and I immediately think they’re eight note triplets. Commented Jan 27, 2023 at 11:19
• Plus, in A, with the “3“s on the note side rather than the beam side, I would mistake them for fingerings. Commented Jan 27, 2023 at 11:24
• @AndyBonner: I think the OP is trying to get exactly the same notation as some old manuscript (for whatever reason), and, as for A, the 3's are fingerings — they just use it to show what they want to have done with the triplets. Commented Jan 27, 2023 at 11:26
• Ramilies is correct - I'm trying to reproduce the old manuscript in lilypond, and A was my attempt at getting lilypond to show what is in the manuscript (I wasn't sure if I was allowed to post the original image, plus 6 sharps and notes all over the place make it complicated). Then I can use source control to keep track of which changes to the original are corrections, my edits (and therefore questionable) and clarifications to notation.
– wtw
Commented Jan 27, 2023 at 11:46
• Personally, even if I was making an "urtext" edition with minimal editing intended, I would fix the beaming (in case it's not clear: break the beam between notes 2 and 3; optionally, beam the first two 8th notes together, even if one is tremolo). I would probably then print one measure in style B, and after that maybe switch to A but place the "3" on the stem side and include the little tiny brackets. If there's any uncertainty about what's intended I would reprint A in a footnote or introduction. Commented Jan 27, 2023 at 14:59

The dots are "correct" in the sense of the following convention: the tremolo notation means to fill the length of the note (here it is 3/16 = 8th with a dot) with notes that correspond to the all beams crossing or touching the stem (here you have 1 + 1 = 2 beams). So you should fill 3/16 with 16th notes for each such note, which is exactly what you wanted to notate.

If you want to get rid of the dots anyway: you can just omit them with `\omit Dots` before the triplet, and `\undo\omit Dots` after it. That looks like the easiest solution for this problem, eventhough it's not general.

To make it easier to input these things, you can, for instance, define a simple music function like this:

``````trem = #(define-music-function
(note)
(ly:music?)
#{
\once\omit Dots
\repeat tremolo 3 \tuplet 3/2 #note
#}
)
``````

This means: `trem` is going to be a function that takes one argument called `note` (the second line). This argument must satisfy the condition `ly:music?` (the third line), i. e. it needs to be a bit of Lilypond music. The function is going to return what follows inside the `#{` and `#}` (you can see that we have used the variable `#note` inside the body on the appropriate place).

Now you can just write `\trem d16 \trem e \trem f` for the three triplets. (If you would like to take it further, e. g. to make it possible to write `\trem{d16 e f}`, then you will have to ask someone else; I can only write the simplest kind of functions in Lilypond.)

If you really want the tuplet numbers down, you can use `\tupletDown` for that (e. g. you can add `\once\tupletDown` into the function). However, I don't think it's a good idea because it's really confusing.

Basically what you want is to print the tuplet but avoid the scaling of the tuplet. I suggest to you three equivalent ways of doing things:

• [D] use a tuplet, but instead of duration `8.` use `8*3/2
• [E] use a tuplet but revert the scaling by using `\scaleDurations 3/2`
• [F] Instead of a 3/2 tuplet use a 3/3 tuplet. This will print as `3` but will not scale the music (if you choose to print tuplet ratios this will affect the print though!)

This is how you’d use that:

``````\score {
\new Staff \relative c'  <<
{
\time 2/4
\tupletSpan 8
c8^"D"
\tuplet 3/2 {
d8*3/2:16[
e:16
f:16]
}
c8^"E"
\tuplet 3/2 \scaleDurations 3/2 {
d8:16[
e:16
f:16]
}
c8^"F"
\tuplet 3/3 {
d8:16[
e:16
f:16]
}
}
>>
}
``````

I like Ramillies’ answer, but based on your opening post and your subsequent comment, I’d like to offer something even more concise.

## The “why”

…trying to reproduce the old manuscript in lilypond, and A was my attempt at getting lilypond to show what is in the manuscript

(Emphasis mine.)

Okay, so you’ve already done that in A. Never mind what it means in LilyPond yet; your goal here was to put on your screen what you see on the page. Does it look the same? Good.

So the point becomes what to use B for. If B is going to be “this is how I interpret that this measure is to be played,” and you want to display that somehow to a reader, then there are multiple ways to do this:

• a comment in the source code
• a footnote with the figure written out, like you often see with Baroque ornamentation
• an ossia staff above the measure in question with the figure written out
• an entirely separate manuscript with your interpretation replacing the original layout
• etc

Personally, if I were learning this piece, I would prefer one instance of the interpretation and leave the rest untouched—that way, I know that everywhere I see this particular figure, it is to be performed in the way indicated by the editorial remark.

## The “how”

Going on the assumption that conciseness and clarity are your goals:

Is there a concise way to input this?

I can use source control to keep track of which changes to the original are corrections, my edits (and therefore questionable) and clarifications to notation.

(Emphasis mine.)

Then I’m going to piggy-back off of Ramillies’ answer to show you one way to achieve this. The major issue you seem to want to solve is how to stop so much redundancy; in other words, turn this:

``````\repeat tremolo 3 \tuplet 3/2 d16[
\repeat tremolo 3 \tuplet 3/2 e16
\repeat tremolo 3 \tuplet 3/2 f16]
``````

into this:

``````\my_function d e f
``````

Bonus points if we can control what happens when using `\my_function`.

Well, Ramillies was 93.8% of the way there. I can get you an additional 0.4% of the way there:

#### How the manuscript looks:

``````c'8 d8:16[_3 e:_3 f:]_3
``````

``````c'8
\tuplet 3/2 { \repeat unfold 3 { d16 } }
\tuplet 3/2 { \repeat unfold 3 { e } }
\tuplet 3/2 { \repeat unfold 3 { f } }
``````

``````  c'8
\omit Dots
\tuplet 3/2 \repeat tremolo 3 { d16[ }
\tuplet 3/2 \repeat tremolo 3 { e }
\tuplet 3/2 \repeat tremolo 3 { f] }
\undo \omit Dots
``````

## Let’s extract these to functions:

#### The manuscript function:

There’s really no point in separating this one out. It’s about as simple as you can expect to make it, in my opinion. But if you must do so, read the next two to find out how you can do it.

#### The interpretation function:

``````trem = #(define-music-function
(ant bee cat dog)
(ly:music? ly:music? ly:music? ly:music?)
#{
#ant
\tuplet 3/2 { \repeat unfold 3 { #bee } }
\tuplet 3/2 { \repeat unfold 3 { #cat } }
\tuplet 3/2 { \repeat unfold 3 { #dog } }
#}
)
``````

#### The correction function:

``````trem = #(define-music-function
(ant bee cat dog)
(ly:music? ly:music? ly:music? ly:music?)
#{
#ant
\omit Dots
\tuplet 3/2 \repeat tremolo 3 { #bee[ }
\tuplet 3/2 \repeat tremolo 3 { #cat }
\tuplet 3/2 \repeat tremolo 3 { #dog] }
\undo \omit Dots
#}
)
``````

## Let’s use these functions:

Depending on which one you picked, this:

``````music = \relative {
\time 2/4
\trem c'8 d16 e f
\trem g8 a16 b c
\trem f8 c16 g d
}
\score {
\new Staff \music
}
``````

Will look like either of these two: