netpi / compound-word-transformer-tensorflow

AI 音乐 - compound-word-transformer,用 Tensorflow 实现
https://eurychen.me/post/music/ai-compose-music/
138 stars 24 forks source link

How can I run this project to generate MIDI #1

Open dedededefo opened 2 years ago

dedededefo commented 2 years ago

Is it according to demo.Ipynb steps?

netpi commented 2 years ago

@dedededefo You can run this colab to train a model and generate midi. Or use this Trained Model | Step28500 with parameters below:

emb_sizes = [64, 256, 768, 256, 512, 256, 256, 256]
config = {
    "vocab_sizes": vocab_sizes,
    "emb_sizes": emb_sizes,
    "d_model": 512,
    "dff": 1024,
    "num_layers": 12,
    "num_heads": 4,
    "dropout_rate": 0.1,
    "length": 1024,
    "rpr": True,
    "dataset": f'{database_name}_{train_seq_length}',
}
dedededefo commented 2 years ago

@dedededefo You can run this colab to train a model and generate midi. Or use this Trained Model | Step28500 with parameters below:

emb_sizes = [64, 256, 768, 256, 512, 256, 256, 256]
config = {
    "vocab_sizes": vocab_sizes,
    "emb_sizes": emb_sizes,
    "d_model": 512,
    "dff": 1024,
    "num_layers": 12,
    "num_heads": 4,
    "dropout_rate": 0.1,
    "length": 1024,
    "rpr": True,
    "dataset": f'{database_name}_{train_seq_length}',
}

Sorry to bother you again. I downloaded the pre training model, but I'm not sure how to use it. Do I need the file path TF log? I tried to run the generation according to collab, but it seems that I can't use the pre training model

netpi commented 2 years ago

@dedededefo a new Colab to generate MIDI with step28500

https://colab.research.google.com/drive/1-r5IpQgOoZgkOGof8EdjBkQzb6H6e64J?usp=sharing

LqNoob commented 2 years ago

@dedededefo a new Colab to generate MIDI with step28500

https://colab.research.google.com/drive/1-r5IpQgOoZgkOGof8EdjBkQzb6H6e64J?usp=sharing

Hi, @netpi . I have a question about music generation is that how to generate audible audio files in other formats after generating MIDI files because MIDI files are not a common audio format.

netpi commented 2 years ago

@dedededefo a new Colab to generate MIDI with step28500 https://colab.research.google.com/drive/1-r5IpQgOoZgkOGof8EdjBkQzb6H6e64J?usp=sharing

Hi, @netpi . I have a question about music generation is that how to generate audible audio files in other formats after generating MIDI files because MIDI files are not a common audio format.

hi @LqNoob Generating raw audio(Singing) is another field (SVS). You can search Singing Voice Synthesis to see more. Or you can use magenta.js if you just want to show midis on websites.

LqNoob commented 2 years ago

Thanks for your kind reply. @netpi