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

Automatic music generation #510

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Automatic Music Generation/Dataset/data/notes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schu_143_2.mid
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schu_143_3.mid
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schuim-1.mid
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schuim-2.mid
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schuim-3.mid
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schuim-4.mid
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schumm-1.mid
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schumm-2.mid
Binary file not shown.
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schumm-4.mid
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schumm-5.mid
Binary file not shown.
Binary file added Automatic Music Generation/Dataset/schumm-6.mid
Binary file not shown.
438 changes: 438 additions & 0 deletions Automatic Music Generation/Model/LSTM .ipynb

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions Automatic Music Generation/Model/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@


**Automatic Music Generation**

**GOAL**

To generate automatic music from previous notes.

**DATASET**

https://www.kaggle.com/anubhavjin/midi-data-containing-melodies

**DESCRIPTION**

Deep Learning is a field of Machine Learning which is inspired by a human mind and its neural structure. These networks extract features automatically from the dataset and are capable of learning any non-linear function.
This project proposes the use of 2 models, Wavenet and LSTM.


WaveNet is an audio generative model based on the PixelCNN architecture. In order to deal with long-range temporal dependencies needed for raw audio generation, architectures are developed based on dilated causal convolutions, which exhibit very large receptive fields.


LSTM is a novel recurrent network architecture training with an appropriate gradient-based learning algorithm. LSTM is designed to overcome error back-flow problems.

**WHAT I HAD DONE**

WaveNet takes the chunk of a raw audio wave as an input. Raw audio wave refers to the representation of a wave in the time series domain. Given the sequence of the amplitude values, WaveNet tries to predict the successive amplitude value.We can infer from the above that the output of every chunk depends only on the past information ( i.e. previous timesteps) but not on the future timesteps. Hence, this task is known as Autoregressive task and the model is known as an Autoregressive model.I created input and output sequences using music 21 toolkit and passed it through the respective models. The predicted output was then converted to an audio file.

Another approach for automatic music generation is based on the Long Short Term Memory (LSTM) model. The preparation of input and output sequences is similar to WaveNet. At each timestep, an amplitude value is fed into the Long Short Term Memory cell – it then computes the hidden vector and passes it on to the next timesteps.Another approach for automatic music generation is based on the Long Short Term Memory (LSTM) model. The preparation of input and output sequences is similar to WaveNet. At each timestep, an amplitude value is fed into the Long Short Term Memory cell – it then computes the hidden vector and passes it on to the next timesteps.

**MODELS USED**

Wavenet

LSTM

**LIBRARIES NEEDED**

Music 21 toolkit

Numpy

Keras

Pickle

Pandas

**ACCURACIES**

The Wavenet architecture produces more synchronised and melodious music.


**YOUR NAME**

Pranjal Gadge


773 changes: 773 additions & 0 deletions Automatic Music Generation/Model/Wavenet.ipynb

Large diffs are not rendered by default.