/RESO

A website to generate piano music

Primary LanguageJupyter NotebookMIT LicenseMIT

RESO: Algorithmic and Neural Piano Music Generator

Our server:

http://194.169.163.103:8000/

⚠️ Our server (for now) is too weak for Neural Generation. LSTM models take up to 5 minutes (instead of 30 seconds) per generation. GPT2 models aren't available. Run the server locally to test these models.

Table of Contents

Setup

linux_icon

The instructions below are for Linux only and have been tested on Ubuntu 20.04 or later.

Via Docker:

  1. Build a Docker Image:

sudo docker build -t deploy-reso .

  1. Run a Docker container:

sudo docker run -p 8000:8000 deploy-reso

Without Docker:

  1. Upgrade pip and install Python dependencies:

pip install --no-cache-dir --upgrade -r requirements.txt

  1. Install system-wide packages:

apt-get install -y --fix-missing fluidsynth ffmpeg musescore3 libqt5core5a timidity

  1. Run a local server:

uvicorn main:app --host 127.0.0.1 --port 8000

Usage

  1. Click Start generating for free.
  2. Choose a music engine (algorithmic / neural).
  3. Specify the desired properties of the composion.
  4. Listen to this!

Tests

For local testing (you don't need to run the server beforehand):

python3 run_tests.py --port 8000 --run-server

For more info run python3 run_tests.py --help

Note that we use Selenium, which requires Google Chrome to be installed on your machine. You can install it with the following commands:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install

Examples

No cherry-picking

  • Model: Waltz. Tempo: Fast. Scale: C.
10577062.mp4
  • Model: Etude. Tempo: Normal. Scale: E.
37639085.mp4
  • Model: Calm Music. Tempo: Slow. Scale: F#.
73491010.mp4
  • Model: GPT2-Chopin. Tempo: Normal. Scale correction: no.
57415558.mp4
  • Model: LSTM-Mozart. Tempo: Fast. Scale correction: no.
67959734.mp4