Closed jacopogrecodalceo closed 3 months ago
Abjad containers are things like abjad.Voice
, abjad.Staff
, abjad.Score
.
There are a couple of different ways of initializing Abjad containers.
You can make Abjad notes, rests, chords and pass those into Abjad containers:
note = abjad.Note("c'4")
voice = abjad.Voice([note])
You can also type LilyPond code into a string, and pass that string into an Abjad container:
voice = abjad.Voice("c'4")
This works because the string "c'4"
is valid LilyPond input.
But this breaks ...
voice = abjad.Voice(f's4*##e{onset} {note} 4*##e{dur}')
... because the string f's4*##e{onset} {note} 4*##e{dur}'
isn't valid LilyPond input.
Thank you very much @trevorbaca for your answer!!
Maybe I'm wrong on something, but this lilypond file works for me:
\version "2.24.0"
\score {
\new Voice {
s4*##e0.0 g 4*##e0.534 _"-10.82¢"
}
}
I am currently developing a Csound to score conversion tool using Abjad. The implementation involves using the syntax
f"s4*##e{onset} {note} 4*##e{dur}"
inside Abjad in order to create a proportional notation score. However, attempting to use this syntax results in a parsing error:It seems that Abjad is having trouble parsing the '##' symbol. Could you confirm this issue and provide guidance on resolving or working around this parsing problem? Thanks.
Code exemple: