NameError: name 'chord' is not defined in 07_01_notation_compose.ipynb
emres opened this issue · comments
NameError: name 'chord' is not defined in 07_01_notation_compose.ipynb:
NameError Traceback (most recent call last)
<ipython-input-5-fbeff2cc0330> in <module>
4 for element in original_score.flat:
5
----> 6 if isinstance(element, chord.Chord):
7 notes.append('.'.join(n.nameWithOctave for n in element.pitches))
8 durations.append(element.duration.quarterLength)
NameError: name 'chord' is not defined
because chord
is missing from the import
s. There's a similar problem with note
:
from music21 import converter