Giter Club home page Giter Club logo

Comments (3)

lisayan avatar lisayan commented on September 3, 2024

I haven't tried this yet, but music21 supports different instruments https://github.com/cuthbertLab/music21/blob/a78617291ed0aeb6595c71f82c5d398ebe604ef4/music21/instrument.py

from classical-piano-composer.

Skuldur avatar Skuldur commented on September 3, 2024

Hi,

Music21 supports most instruments that you could need so that should cover creating the music.

On the neural network end, there are a few ways you can go about generating full orchestral music.

First is MuseGAN (https://arxiv.org/abs/1709.06298) which uses a GAN to generate the music, this can be fairly tricky since GANs tend to be tough to work with.

Second, expand the network we have in this repository into a multi-input multi-output network, where each input corresponds to separate instrument and each output corresponds to a separate instrument. By using that architecture you will ensure that throughout the majority of the network, it takes into account the input from all of the instruments, while the output layers only focus on generating for a single instrument.

Third (if you're feeling really daring), you could try your hand at implementing MuseNet from OpenAI (https://openai.com/blog/musenet/). ;)

from classical-piano-composer.

jordan-bird avatar jordan-bird commented on September 3, 2024

I have been working on a version of this repo that supports outputting the note/chord, duration, and offset which you can find here
The code is a bit messy right now but the TF2 version runs fine, I need to clean it up when I have some time

So long as you can create a vocabulary of musical instruments with Music21 (similarly to how I expanded it to create vocabs of the durations and offsets), then you could add a third branch which classifies the instrument and in the generator sets the instrument of the output at that step prior to compiling the midi file. I believe then you'd be able to synthesise a whole orchestra.

Although now I think about it, when parsing the file you will also have to separate each instrument as individual entities: i.e. if a C major chord is played on piano and a lower C major chord is played by a double bass at the same time, then you will have to extract them as two seperate chords with the second one being at an offset of 0 - so, then, when a generator creates something like this, it'll offset the first instrument and then have 0 offset for the second one so they effectively play at the same time

from classical-piano-composer.

Related Issues (20)

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.