Week 10 – generative music from Melody_RNN

I played with MelodyRNN a little bit

step 1. Convert MIDI files into NoteSequences.

MINE:

convert_dir_to_note_sequences \

  –input_dir=clean_midi/U2 \

  –output_file=notesequences.tfrecord \

  –recursive

2. Convert NoteSequences to SequenceExamples.

melody_rnn_create_dataset \
--config='lookback_rnn' \
--input=notesequences.tfrecord \
--output_dir=./sequence_examples \
--eval_ratio=0.10

3. Train Model.

melody_rnn_train \

–config=lookback_rnn \

–run_dir=/tmp/melody_rnn/logdir/run1 \

–sequence_example_file=./sequence_examples/training_melodies.tfrecord \

–hparams=”batch_size=64,rnn_layer_sizes=[64,64]” \

–num_training_steps=1000

4 open the run1 file

5 Generate some music

melody_rnn_generate \

–config=lookback_rnn \

–run_dir=/tmp/melody_rnn/logdir/run1 \

–output_dir=./generated/melody_rnn/U2/ \

–num_outputs=10 \

–num_steps=128 \

–hparams=”batch_size=64,rnn_layer_sizes=[64,64]” \

–primer_melody=”[60, -2, 60, -2, 67, -2, 67, -2]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s