Reputation:
I'm trying to play a note, however, importing music python library is giving me a headache
from music import *
note = Note(C4, HN)
Play.midi(note)
I also tried
import music
note = Note(C4, HN)
Play.midi(note)
Still got the same error
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-7-1cac5ec470ec> in <module>()
----> 1 import music
2
3 note = Note(C4, HN)
4 Play.midi(note)
/anaconda3/lib/python3.6/site-packages/music/__init__.py in <module>()
1 from .utils import H
----> 2 from . import utils, tables, synths, effects, structures, singing
3 from . import legacy
4
ImportError: cannot import name 'structures'
Upvotes: 0
Views: 1705
Reputation: 81
The problem is that you are trying to run the examples in IPython, which does not support JythonMusic.
You need to download the JythonMusic environment (JEM) which comes bundled with everything. See here -
http://jythonmusic.org/download/
Upvotes: 1