Is it expected for --primer_midi to fail with polyphonic file?
See original GitHub issueHi, I am experiencing an error when I try to run melody_rnn_generate
and passing a polyphonic midi file to --primer_midi
:
Traceback (most recent call last):
File "/home/brannondorsey/miniconda2/envs/magenta/bin/melody_rnn_generate", line 11, in <module>
sys.exit(console_entry_point())
File "/home/brannondorsey/miniconda2/envs/magenta/lib/python2.7/site-packages/magenta/models/melody_rnn/melody_rnn_generate.py", line 235, in console_entry_point
tf.app.run(main)
File "/home/brannondorsey/miniconda2/envs/magenta/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "/home/brannondorsey/miniconda2/envs/magenta/lib/python2.7/site-packages/magenta/models/melody_rnn/melody_rnn_generate.py", line 231, in main
run_with_flags(generator)
File "/home/brannondorsey/miniconda2/envs/magenta/lib/python2.7/site-packages/magenta/models/melody_rnn/melody_rnn_generate.py", line 208, in run_with_flags
generated_sequence = generator.generate(input_sequence, generator_options)
File "/home/brannondorsey/miniconda2/envs/magenta/lib/python2.7/site-packages/magenta/music/sequence_generator.py", line 226, in generate
return self._generate(input_sequence, generator_options)
File "/home/brannondorsey/miniconda2/envs/magenta/lib/python2.7/site-packages/magenta/models/melody_rnn/melody_rnn_sequence_generator.py", line 126, in _generate
assert len(extracted_melodies) <= 1
AssertionError
Can anyone confirm if this is indeed because the file has more than one instrument and therefore melody and so melody_rnn_generate
simply refuses to process the file? If this is in fact the case a friendly error message might be helpful to new users. Or at least some documentation in the --primer_midi
flag description that specifies that the file must be monophonic. I am happy to take a stab at adding this but I wanted to make sure that this is indeed the case before doing so.
More about magenta + polyphonic here.
Cheers, Brannon
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Is it expected for --primer_midi to fail with polyphonic file? #296
I've tested this with multiple midi files and it consistently fails whenever there is more than one track with a monophonic melody (which...
Read more >Polyphonic WAV Files - YouTube
Join us for an overview of the polyphonic WAV files generated by your Sound Devices mixer-recorder and how to work with them in ......
Read more >Why and How to use Polyphonic WAV Files (in FCPX)
Polyphonic WAV files can make your workflow a lot easier, if you know how to manipulate them. Here's why and how I do....
Read more >Mono vs. Poly WAV Files: What's the Difference?
Some high-end professional audio recorders have options for either WAV, WAV Mono and WAV Poly (polyphonic) files. What's the difference and ...
Read more >WAV Mono vs. WAV Poly - Sound Devices
Q: The 7-Series recorders have two options for WAV files, WAV mono and WAV poly. What's the difference between these two WAV file...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great, I’m a bit swamped this week but should be able to get on this and hopefully make a PR by early next week.
Looks like things are at the same point since I get
assert len(extracted_melodies) <= 1
for file having multiple voices?