Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIDI files problem #4

Open
thepsyntist opened this issue Apr 1, 2017 · 9 comments
Open

MIDI files problem #4

thepsyntist opened this issue Apr 1, 2017 · 9 comments

Comments

@thepsyntist
Copy link
Contributor

I downloaded a few midi files from internet but I get this error:
"Track 1 should not contain set_tempo"

@Conchylicultor
Copy link
Owner

Sorry about that, I had to create my own midi parser (midiconnector.py) because of python 3 compatibility issues. The one I have done is really basic so it only support certain type of midi files.

@Eumi
Copy link

Eumi commented Apr 10, 2017

Hey ..i make it like this....first i download a piano midi..usually they have 2 channel tracks ..i copy the second one into the first (in fl studio) so its only one channel...then i export ....than import this in the software GnMidi ...after import i convert it to ASCII text...the text i save and open with notepad...than i erase the tempo marks and other stuff like its in the example midis that come with the code...than i save...put it back in GnMidi...convert the text back to midi ..and than i save midi and put it in data/midi and than the music generater will load it =) ..i know thats alot work ..but it works!

@JingyuQian
Copy link

What kind of midi files should I look for? It always tells me SMTPE timecode not supported. Thanks.

@leitro
Copy link

leitro commented Jun 23, 2017

Hello guys, I copied the "basic_rnn_joplin.mid" from docs/midi to data/midi, and also downloaded a few midi data in the same folder, but when I run "main.py", the error looked like this:

Welcome to DeepMusic v0.1 !

TensorFlow detected: v1.1.0

Current parameters:
glob_step: 0
keep_all: False
dataset_tag: ragtimemusic
sample_length: 40
hidden_size: 512
num_layers: 2
target_weights: linear
scheduled_sampling: none
batch_size: 64
save_every: 1000
ratio_dataset: 0.9
testing_curve: 10
batch_builder: relative
learning_rate: cst
enco_cell: identity
deco_cell: lstm
loop_processing: sample_softmax

Training samples not found. Creating dataset from the songs...
Raw songs not found. Extracting from midi files...
Traceback (most recent call last):
  File "main.py", line 29, in <module>
    composer.main()
  File "/home/kl/code/music/MusicGenerator/deepmusic/composer.py", line 160, in main
    self.music_data = MusicData(self.args)
  File "/home/kl/code/music/MusicGenerator/deepmusic/musicdata.py", line 64, in __init__
    self._restore_dataset()
  File "/home/kl/code/music/MusicGenerator/deepmusic/musicdata.py", line 118, in _restore_dataset
    self._create_raw_songs()
  File "/home/kl/code/music/MusicGenerator/deepmusic/musicdata.py", line 169, in _create_raw_songs
    midi_files = [os.path.join(midi_dir, f) for f in os.listdir(midi_dir) if f.endswith(self.FILE_EXT)]
FileNotFoundError: [Errno 2] No such file or directory: '/home/kl/code/music/MusicGenerator/data/midi/ragtimemusic'

I really wonder why is that? Which folder is correct for midi training data? Thanks a lot:-)

@itsjsbrown
Copy link

itsjsbrown commented Jun 24, 2017

@Eumi I ended up running GnMidi successfully as well and was able to exclude all timecode syntax. Now main.py recognizes original MIDI files. Looking forward to someone making epic updates to MIDI capabilities with Python's libraries soon so we all don't have to go through this trouble. @Conchylicultor this is still epic. Thanks for sharing your explorations!

@johndpope
Copy link

@itsjsbrown - can you share a gist of updated code? gist.github.com

@vinay12121
Copy link

@littlethunder I do have the same problem,
If you find any solution please let me know
Thank's In Advance

@JuruoMP
Copy link

JuruoMP commented Apr 21, 2018

@Conchylicultor Could you please release your midi dataset? Several datasets published on the Internet is not suitable for the midi processor.

@Conchylicultor
Copy link
Owner

@li-yuntao I'm sorry but I don't have the midi I downloaded anymore. I should also warn you that he current version of the code won't produce any good results. It was some failed experiment that I tried about changing the note representation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants