salu133445 / musegan

An AI for Music Generation
https://salu133445.github.io/musegan/
MIT License
1.83k stars 372 forks source link

Condition output based on a single midi file in the test phase #70

Closed Razzaghnoori closed 5 years ago

Razzaghnoori commented 5 years ago

I am now capable of converting a directory of midi files to a .npz file and as I understood, by setting data_filename value in the config.yml file, I can train a model based on the provided midis.

However, I'm not sure if that serves as a condition to the pre-trained model or trains the model from scratch.

Eventually, I want to feed a midi file to the algorithm and receive another midi file similar to that for instance in the genre but generally different.

salu133445 commented 5 years ago

Currently we do not support conditional generation. We only implement the unconditional GANs. However, we do have provide the optional arguments for the conditions in the generator and the discriminator objects. If you want to implement the conditional GANs, you might need to modify the code for the training session by providing the genre tags as the conditions, and then retrain the model.

If I understand your idea correctly, it should involve both recognition and generation problems. That is, you need an additional recognition model to predict the genre of the input files and then use the conditional GANs to generate some new samples with the predicted genre.

Razzaghnoori commented 5 years ago

Thanks. I'm working on it.