Comments (3)
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.
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.
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)
- Release without data? HOT 1
- A few issues (with solutions)
- Only one track, playing HOT 7
- Using weights trained on anohter computer HOT 1
- Nevermind
- Predicting the same note HOT 3
- randomSeed
- data file HOT 1
- ValueError(Shape error)
- ValueError(Shape error) while running predict.py iam getting this error. Anyone can help me,Thanks in advance HOT 15
- Can't Run with Tensorflow-gpu HOT 3
- Question about Parts used from the midi files
- Stuck on I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version HOT 2
- Accepting PRs?
- Alternate Instruments HOT 4
- np_utils is not defined
- music21.exceptions21.StreamException: HOT 3
- failed to find TimeSignature in meterStream; cannot process Measures HOT 1
- MIDI generated is just one note repeated HOT 4
- offset should be += 1 not += 0.5 in predict.py
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from classical-piano-composer.