Fwd: abjad proportional notation

21 views
Skip to first unread message

Trevor Bača

unread,
Jan 26, 2024, 5:35:44 PM1/26/24
to abjad...@googlegroups.com


---------- Forwarded message ---------
From: <cord...@disroot.org>
Date: Fri, Jan 26, 2024 at 8:09 AM
Subject: abjad proportional notation
To: <trevo...@gmail.com>


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)



--
Reply all
Reply to author
Forward
0 new messages