Hi Trevor,
I am currently working on building a simple Csound to score conversion tool using Abjad and have encountered an issue. I find Abjad particularly interesting for this purpose.
I’m using a simple trick in order to obtain some notes from onset, pitch and duration variables: s4*##e{onset} {note} 4*##e{dur}
When I’m trying to use this syntax inside a Abjad I'm facing a problem:
File "/opt/homebrew/lib/python3.11/site-packages/abjad/parsers/scheme.py", line 340, in p_variable__IDENTIFIER
raise Exception(p, "AAA")
Exception: (<ply.yacc.YaccProduction object at 0x102e3a410>, 'AAA’)
I think that the issue is that it cannot parse the ‘##’ symbol, am I right?
Do you know a way to solve this?
Your help is greatly appreciated. Thank you in advance for your assistance.
Best regards,
The code:
import abjad
onset = 1.14
note = abjad.Note(60, (1, 2)).written_pitch.name
dur = 3
voice = abjad.Voice(f's4*##e{onset} {note} 4*##e{dur}')
staff = abjad.Staff([voice])
score = abjad.Score([staff])
abjad.show(score)