# Re: [abjad-user] Re: Tuplets not showing fraction or bracket

3 views

### Martín Rincón Botero

Dec 29, 2022, 4:48:41 AM12/29/22
Hi Paul,

the extend method appends each of the elements of an object/list containing multiple elements, whereas the append method appends the object/list as one thing. For tuplets you should always use append, so that you can make sure that the whole object (including the tuplet ratio and braces {}) and not only the elements contained —the leaves— is added to the score.

Regards,
Martín.

On Dec 29, 2022 at 6:49 AM, <Paul Marquardt> wrote:

Strange-- this shows the fraction and bracket as desired:
tup_string = r"\times 2/3 { r8 c''4}"
staff1.extend(tup_string)
staff1.extend("r4 r4 r4")
staff1.extend("r4 r4 r8 ds'8 r4")
score.append( staff1 )
staff2.extend("r4 r4 r4")
tup2 = abjad.Tuplet((5, 4), "r8. as''8")
staff2.extend(tup2)
score.append(staff2)

Possibly problem solved... I'll try to run with this solution.

Thanks for taking a look

On Wednesday, December 28, 2022 at 10:34:27 PM UTC-7 Paul Marquardt wrote:
Hi!
I'm trying to understand the Tuplet a little better. I'm using Staff.extend() to add events to a Staff. Here's a very simple example:
tup = abjad.Tuplet((2, 3), "r8 c''4")
staff1.extend(tup)
staff1.extend("r4 r4 r4")
staff1.extend("r4 r4 r8 ds'8 r4")
score.append( staff1 )
staff2.extend("r4 r4 r4")
tup2 = abjad.Tuplet((5, 4), "r8. as''8")
staff2.extend(tup2)
score.append(staff2)

The placement of tuplets in the Staff works out, but I can't seem to get it to show the brackets with "3:2" or "5:4". It's not a show-stopper for me, as the output is mostly  an intermediate step in the final score, but it would help a lot to have them displayed. Is there any documentation link I can read?

Platform: Ubuntu 22.04
Python: Python 3.10.6
Lilypond: GNU LilyPond 2.22.1

Attaching an image of what I get...

Thanks!
Paul Marquardt

--