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

NSynth MaxForLive plugin grid generation #54

Merged
merged 7 commits into from
Nov 19, 2018

Conversation

JCBrouwer
Copy link

Hello,

I've adapted the Open NSynth Audio generation pipeline to generate grids/multigrids that can be used with the NSynth MaxForLive device.

I haven't been able to test it on multiple GPUs (I've only got 1) or with python3 (recompiling CUDA enabled tensorflow on macOS is quite a lot of work...), but I'm fairly sure they should work.

I also wasn't sure how exactly the Apache 2.0 license works in this case, so I've just copied the license statement that was at the top of the files in the repository linked above. Is the short statement at the top of generate.py about the changes made sufficient?

I've uploaded an example multigrid, generated with the included default settings, here.

@jesseengel
Copy link
Collaborator

Thanks for doing this. Sorry I'm a bit delayed in reviewing, I do intend to give it a review when I catch up. Thank you for your patience.

Copy link
Collaborator

@jesseengel jesseengel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, this seems to run okay on my linux machine (generating samples now). Great work!

Some basic comments / things I needed to change:

  1. You have mixed tabs and spaces which doesn't work for my version of python. The google style guide is to use 2 spaces for each level of indentation, could you change to that?

  2. You make several assumptions about file placement that you don't make explicit.

  • Wavenet checkpoint has to be in /magenta/magenta/models/nsynth/wavenet-ckpt/
  • Code has to be run in the magenta-demos/nsynth folder
    These were simple enough to figure out, but since you only use the "magenta_dir" for finding the checkpoint, perhaps "checkpoint_dir" would be clearer and more flexible.
  1. Batch size (embeddings and GPU) should also be in settings to allow for computers with different memory constraints. For example, batch size 512 is pushing the limits of my local GPU.

Hans Brouwer added 2 commits November 18, 2018 15:04
@JCBrouwer
Copy link
Author

Alright, I changed up the whitespace to be 2 space indentations, added options for batch_sizes, and switched the magenta_dir option to checkpoint_dir.

I updated the README to reflect the changes and added a note about running generate.py from the madenta-demos/nsynth directory.

@jesseengel jesseengel merged commit 03c97cf into magenta:master Nov 19, 2018
@trinitronx
Copy link

Sorry if this isn't the right place to ask a question, but this looks awesome! Since learning of NSynth and Magenta projects, I've been interested in generating grids for a while. Does this require a GPU with tensor cores (e.g.: newer Nvidia RTX series?)

@jesseengel
Copy link
Collaborator

The magenta-discuss group is good for these types of questions (https://magenta.tensorflow.org/community). Any nvidia gpu should be able to run the code, but a more modern one (ex. TitanX, P100, V100, GTX1080 etc.) will run much faster. If you have a very small grid (say 5x5) you might get away with a slower GPU.

@jesseengel
Copy link
Collaborator

Hi @JCBrouwer, could you take a look at this issue someone is having with the generation code? #63

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

Successfully merging this pull request may close these issues.

3 participants