Skuldur / Classical-Piano-Composer

MIT License
596 stars 317 forks source link

music21.exceptions21.StreamException: #48

Open ChenSun-YP opened 2 years ago

ChenSun-YP commented 2 years ago

The following comes to me when I try to train, how can I solve this? My system is macOS , python3.9.1.

music21.exceptions21.StreamException: failed to find TimeSignature in meterStream; cannot process Measures

Traceback (most recent call last): File "", line 1, in File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/Users/bytedance/Downloads/binds/Classical-Piano-Composer/lstm.py", line 124, in train_network() File "/Users/bytedance/Downloads/binds/Classical-Piano-Composer/lstm.py", line 18, in train_network notes = get_notes() File "/Users/bytedance/Downloads/binds/Classical-Piano-Composer/lstm.py", line 34, in get_notes midi = converter.parse(file) File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/converter/init.py", line 1168, in parse return parseFile(valueStr, number=number, format=m21Format, File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/converter/init.py", line 1037, in parseFile v.parseFile(fp, number=number, format=format, forceSource=forceSource, keywords) File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/converter/init.py", line 571, in parseFile self.parseFileNoPickle(fp, number, format, forceSource, keywords) File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/converter/init.py", line 504, in parseFileNoPickle self.subConverter.parseFile(fp, number=number, keywords) File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/converter/subConverters.py", line 1136, in parseFile midiTranslate.midiFilePathToStream(fp, self.stream, keywords) File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/midi/translate.py", line 2602, in midiFilePathToStream return midiFileToStream(mf, inputM21, **keywords) File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/midi/translate.py", line 2773, in midiFileToStream midiTracksToStreams(mf.tracks, File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/midi/translate.py", line 2513, in midiTracksToStreams midiTrackToStream(mt, File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/midi/translate.py", line 1996, in midiTrackToStream s.makeMeasures( File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/stream/base.py", line 6477, in makeMeasures return makeNotation.makeMeasures( File "/Users/bytedance/Downloads/binds/venv/lib/python3.9/site-packages/music21/stream/makeNotation.py", line 544, in makeMeasures raise stream.StreamException( music21.exceptions21.StreamException: failed to find TimeSignature in meterStream; cannot process Measures

nayeunk commented 2 years ago

Did you solve this problem? I am struggling with the same problem.

AceHack commented 2 years ago

Same here, any solution?

ChenSun-YP commented 2 years ago

i did not