Search code examples
tensorflowmagenta

Is there anyone success to generate midi from TFRecode file with magenta?


I got TFRecode file from magenta but it's difficult(and not precise description for me) to get midi file...

whoever solve this issue, share plz.

Known descrioption from Magenta groups(https://groups.google.com/a/tensorflow.org/forum/#!topic/magenta-discuss/)

  1. The output format for the script is not a MIDI file. It is a TFRecord file containing NoteSequence protobufs with equivalent (but more readable and easily modifiable) representations of the input MIDIs.

  2. You should be able to use sequence_proto_to_pretty_midi and then save the PrettyMIDI object as a midi file: https://github.com/tensorflow/magenta/blob/master/magenta/lib/midi_io.py#L164

As an exercise, you might try to use the functions in note_sequence_io.py and midi_io.py to convert this file back to MIDIs.

If i achieve it I will share it for you also!

thx


Solution

  • We've recently added a model that you can train to generate new sequences. Have a look at https://github.com/tensorflow/magenta/blob/master/magenta/models/basic_rnn/README.md.

    Thanks!