Coder Social home page Coder Social logo

aferral / generating_music Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nikhil-kotecha/generating_music

0.0 2.0 0.0 180.64 MB

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

Jupyter Notebook 97.15% Python 2.85%

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 aferral avatar www avatar

Watchers

James Cloos avatar  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.