Hi Rogério,
I get an error trying to parse your lilypond code so I changed it:
import abjad staff = abjad.Staff( r"{ \times 2/3 { c'8 \times 2/3 { c'16 c'8 } c'8 } c'32 c'16 c'32 \times 2/3 { c'8 c'16 } c'8 c'2 c'8 }", lilypond_type='RhythmicStaff')
In this case, the first element in staff (staff[0]) is a container because of the brackets "{}", the first one inside this container (staff[0][0]) is also a container because it is a tuplet. You cannot attach time signatures to a container. Check abjad.attach documentation: https://abjad.github.io/api/abjad/bind.html?highlight=attach#abjad.bind.attach
You can attach time signatures to a leaf. I would use abjad.select to do that:
first_leaf = abjad.select.leaf(staff, 0) abjad.attach(abjad.TimeSignature((5, 4)), first_leaf) print(abjad.lilypond(staff))
\new RhythmicStaff { { { \tweak edge-height #'(0.7 . 0) \times 2/3 { \time 5/4 c'8 } { \tweak edge-height #'(0.7 . 0) \times 2/3 { c'16 } c'8 } c'8 } c'32 c'16 c'32 { \tweak edge-height #'(0.7 . 0) \times 2/3 { c'8 } c'16 } c'8 c'2 c'8 } }
I'm using abjad 3.10 and lilypond 2.23.6.
Best regards,
Davi
--
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/a45ae023-5a43-49ee-bd77-bbdc1c8a7fcan%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/abjad-user/CABcTPwPj_iO9zYAaCZgKRD%2B7pmZb-60e_4%2BYS_1DP50_n7iA9Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/abjad-user/CAH%3DKYLxTaPbZbhKfCfppg9UQT4h0gx%3DVdEzhhNAfBcRtKvDyGw%40mail.gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "abjad-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/abjad-user/2URYTnvB6Z4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to abjad-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/abjad-user/cbae711a-6c01-4d97-96cf-d23ffd60e1b5%40iPhone-von-Martin.