-
-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Hi,
I have a question about using muspy.metrics.
I'm trying to check pitch_range using the metrics, but having an AttirbuteError.
I defined the music I want to check,
music1 = ('./unconditional_4.mid')
and typed the line as below,
muspy.pitch_range(music1)
but I got an error message.
AttributeError: 'str' object has no attribute 'tracks'
AttributeError Traceback (most recent call last)
/tmp/ipykernel_3330136/2725394534.py in
----> 1 muspy.pitch_range(music1)
~/.conda/envs/muspy/lib/python3.8/site-packages/muspy/metrics/metrics.py in pitch_range(music)
91
92 """
---> 93 if not music.tracks:
94 return 0
95 if not any(len(track.notes) > 0 for track in music.tracks):
AttributeError: 'str' object has no attribute 'tracks'
Any advice would be appreciated!
Thank you.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested