codehack9991 / GenreNet

genre-guided orchestra Generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GenreNet

Aim of project

  • The aim of our project is to generate a musical composition including it's orchestral music, the lyrics and its audio. We intend to generate a system that processes already developed music signals and based on the same generate a music signal of the same genre.
  • The application shall enable its users to choose the genre and kind of music that they wish to listen to and the process the similar kind of music to create new musical compositions

Music Terminology

  • Beam - a straight line connecting two or more notes such as eighth and sixteenth notes.

  • Beat - a musical pulse or unit of time / the steady pulse of music.

  • Chord - a combination of three or more notes sounding at the same time / multiple notes sounding simultaneously (Ex. A C Major chord may consist of the notes C-E-G.)

  • Clef - a symbol placed at the beginning of the staff to indicate names of lines and spaces.

  • Flat - a symbol written to the left of a note that lowers the pitch by a half step.

  • Measure - the space between one bar line and the next.

  • Notes- symbols to represent sounds or pitches and duration of those sounds.

  • Octave - the interval between two adjacent notes of the same name.

  • Orchestra - a large group of instrumentalists consisting of woodwind, brass, string and percussion sections.

  • Staff - horizontal lines on which notes are written. The musical staff has five lines and four spaces.

  • Tempo - the speed of a composition. (The director told the students to play the song at a faster tempo.)

Procedure

Dataset

The Dataset comprises of 100 MIDI files each containing melodies of the piano instrument. The name of the dataset is Classical Piano Interface. The genre of the dataset is jazz music.

Pre-processing of MIDI files

  • Load each file into a Music21 stream object using the converter.parse(file) function. Using that stream object get a list of all the notes and chords in the file. Then append the pitch of every note object using its string notation since the most significant parts of the note can be recreated using the string notation of the pitch. And append every chord by encoding the id of every note in the chord together into a single string, with each note being separated by a dot. These encodings allows us to easily decode the output generated by the network into the correct notes and chords.
  • Create a mapping function to map from string-based categorical data to integer-based numerical data. This is done because neural network perform much better with integerbased numerical data than string-based categorical data.
  • Then create input sequences for the network and their respective outputs. The output for each input sequence will be the first note or chord that comes after the sequence of notes in the input sequence in our list of notes.

Training of Neural Networks

Keras was used to create an LSTM Recurrent Neural Network. The following layers were used:

  • 2 LSTM layer with 128 nodes
  • 3 Dropout layer with 0.3 as rate
  • 2 dense layer of 256 nodes

Softmax activation Function used and 200 epochs

Similarity between Songs

Harmonic Reduction

A single music can have hundreds of notes which makes it harder to analyze it. Which can be simplified based on its harmony to make it easier to understand while losing some details like the melody.
In music, a reduction is an arrangement or transcription of an existing score or composition in which complexity is lessened to make analysis, performance, or practice easier or clearer; the number of parts may be reduced or rhythm may be simplified, such as through the use of block chords. Manually there are several ways of doing that, considering the context on the measure being analyzed, the music’s current key signature and the set of notes on the current measure. In this project we followed these steps:

  • Find the music key signature
  • Each measure contains Four beats. We compute the chord counting the 4 most used notes per measure and try to create a Chord with it.
  • Use Music21 to find the Chord and its function based on the key signature. Function, in music, is the term used to denote the relationship of a chord to a tonal center.
  • Simplify Chord names to avoid names like “bII#86#6#5” and provide the input to Word2Vec algorithm.

About

genre-guided orchestra Generation

License:GNU Lesser General Public License v3.0


Languages

Language:Jupyter Notebook 59.6%Language:HTML 40.2%Language:Python 0.2%