Coder Social home page Coder Social logo

nikhil-kotecha / generating_music Goto Github PK

View Code? Open in Web Editor NEW
27.0 1.0 10.0 181.04 MB

Trained on Bach, used LSTMs to generate new music. (Detailed writeup: "Final Writeup - Generating Music using an LSTM Network.pdf")

Python 1.81% Jupyter Notebook 98.19%
lstm-neural-networks

generating_music's Introduction

Generating_Music

Detailed writeup: "Final Writeup - Generating Music using an LSTM Network.pdf"

The Main.ipynb file is divided into 4 cells to individually run:

1): import Python libraries
	INSTRUCTIONS:
		-run cell to import all the necessary Python libraries (REQUIRED)

2): import .MIDI files
	INSTRUCTIONS:
		- run cell to read in the current working directory and specified MIDI files (REQUIRED)
	USER INPUT:
		- specify list of folders to extract music from
		- specify max # time steps required to retain each MIDI file
		- specify # pieces to set aside for independent validation during training

3): Build model graph
	INSTRUCTIONS:
		- run cell to build the Input Kernel, timewise LSTM, notewise LSTM, loss, and optimizer graphs (REQUIRED)
	USER INPUT:
		- specify hidden sizes for timewise and notewise LSTM stages (a list for each)
		  num_t_units and num_n_units

4): Train model
	DESCRIPTION:
		- runs a specified number of batches for training
		- every 100 batches it runs a validation batch and records validation loss in addition to training loss
		- every 500 batches it
	USER INPUT: 
		- specify # epochs (batches)
		- specify batch size (number of Note State Matrices)
		- specify # time steps to train on (must be less than max #time steps)
		- specify model name to restore (or None)
		- specify name to store model to
		- specify keep_prob = 1 - drop out rate
	
5): Generate Averaged Test and Validation likelihoods

6): Music Generation
	DESCRIPTION:
		- runs a for a specified amount of time steps, generating samples of the form Note_State_Batch, storing them, and feeding
			them back to the input of the next time step
		
	USER INPUT:
		- length of song in 16th note steps
		- batch size of generated music
		- specify keep_prob = 1 - drop out rate

All models, loss graphs, and generated midi files are automatically saved to a folder i.e. Generating_Music/Output/Save_Model_Name where "Generating_Music" is the working directory and the subdirectory "Output" is reserved for all the generated files. models are restored from the same corresponding directories

Latest .MIDI files are under Ouptput/Piano_Midi2

generating_music's People

Contributors

paulyoung48 avatar nikhil-kotecha avatar

Stargazers

 avatar  avatar Florian Herkommer avatar  avatar shubham birmi avatar  avatar Rachana Ravi Shankar avatar Alex Kyllo avatar Bhavesh avatar  avatar SYO1 avatar 同和君Hocassian avatar Tuan Ho avatar Tarik Bir avatar  avatar Daniel avatar Umut Can ALTIN avatar  avatar Shwetank Shrey avatar Mandi C avatar  avatar Sergey Kalutsky avatar Nick Landy avatar Andres avatar  avatar Christian J. Steinmetz avatar  avatar

Watchers

paper2code - bot avatar

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.