Strange-- this shows the fraction and bracket as desired:
score = abjad.Score(name="Score 1")
staff1 = abjad.Staff(name="Line 1")
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 = abjad.Staff(name="Line 2")
staff2.extend("r4 r4 r4")
tup2 = abjad.Tuplet((5, 4), "r8. as''8")
staff2.extend(tup2)
score.append(staff2)
abjad.show(score)
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:
score = abjad.Score(name="Score 1")
staff1 = abjad.Staff(name="Line 1")
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 = abjad.Staff(name="Line 2")
staff2.extend("r4 r4 r4")
tup2 = abjad.Tuplet((5, 4), "r8. as''8")
staff2.extend(tup2)
score.append(staff2)
abjad.show(score)
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
Abjad: 3.14
Lilypond: GNU LilyPond 2.22.1
Attaching an image of what I get...
Thanks!
Paul Marquardt
--
You received this message because you are subscribed to the Google Groups "abjad-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
abjad-user+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/abjad-user/aee5e609-d486-48ed-9443-11f67cbc605fn%40googlegroups.com.