Skip to content

williamwang0/MusicGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Music Generation

Overview

Music Generation analyzes the midi files of various pieces and generates a piece composed in a similar style. The project uses a Markov Decision Process (MDP) to determine how notes transitions from one to another.

In main.py, a naive Markov chain is implemented, only utilizing information about the previous note to determine which note to play next.

In main2.py, multiple previous notes are kept track of, resulting in a melody. In addition, major triads are artificially added.

Setup

Prerequisites

  • Python 3.5+
  • numpy
  • mido

Training

Naive method: python3 main.py

Chord Heuristics and Hindsight: python3 main2.py

Results

Naive

  • TrialOne.mid
  • TrialTwo.mid
  • TrialThree.mid

Chord Heurisitcs and Hindsight

  • NewCode.mid

Team

William Wang Albert Zhang Colton Nishida
William Wang Albert Zhang Colton Nishida
github.com/williamwang0 github.com/albertczhang github.com/coltonnishida

About

Employs a MDP to generate music with a similar style to given training songs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published