Code Monkey home page Code Monkey logo

music-fader-nets's People

Contributors

gudgud96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

music-fader-nets's Issues

Need for required package versions

Hi,

Can you please provide a requirements.txt file or a list of package versions working?

I am having issue with installing the required packages. The custom magenta package at https://github.com/gudgud96/magenta/ does not install correctly with pip install git+https://github.com/gudgud96/magenta/ .

import magenta

outputs it cannot find magenta though it is installed. I tried with just pip install magenta but then it says it needs sndfile library, which outputs errors when I try to install.
My environment uses:

  • tensorflow 1.15.5
  • pypianoroll 0.5.3
  • music21 6.7.2

PS: Concerning my previous error module 'pypianoroll' has no attribute 'parse', it was solved by downgrading to pypianoroll==0.5.3, so I updated this issue and the title.

Best,
Adam.

random sampling in the latent space of music_attr_vae_reg_gmm

Hi !
Thanks for sharing your codes on the music fader nets paper.

I wanted to try it for doing some random sampling, so I followed your notebook and adapted basic functions from my understanding of the model functioning.

def decode_events(model,z,out_length=100):
out = model.global_decoder(z, steps=out_length)
pm = magenta_decode_midi(clean_output(out))
return pm,out

def random_sample(model,CHROMA_DIMS,c_pitch,out_length,c_mode="major",std=1.):
chroma_dict = {"C": 0, "C#": 1, "D": 2, "D#": 3, "E": 4, "F": 5, "F#": 6, "G": 7, "G#": 8, "A": 9, "A#": 10, "B": 11}
minor_pos = 12
c = chroma_dict[c_pitch]
if c_mode=="minor":
c += minor_pos
c = torch.nn.functional.one_hot(torch.tensor([c]),num_classes=CHROMA_DIMS)
z = torch.cat([torch.normal(0.,std,size=(1, model.latent_dim)), torch.normal(0.,std,size=(1, model.latent_dim)), c], dim=1)
if torch.cuda.is_available():
z = z.cuda()
pm,out = decode_events(model,z,out_length=out_length)
return pm,out

and the midi outputs are nothing like a melody, or sometimes even getting NaNs

(here is a random pianoroll plot)

10__major_C#.pdf

When I run an auto-encode following the process shown in the notebook, I get some more reasonable outputs.

Would you have some insights on how to proceed for random sapling the model please ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.