An open API service indexing awesome lists of open source software.

https://github.com/carlosholivan/music-composition-api

This module contains models an API for music generation with state-of-the-art models.
https://github.com/carlosholivan/music-composition-api

api-rest deep-learning docker flask machine-learning music music-composition

Last synced: 11 months ago
JSON representation

This module contains models an API for music generation with state-of-the-art models.

Awesome Lists containing this project

README

          





Music Composition API, A collection of Deep Learning for Music Generation models deployed as a REST API with Flask and deployed in Docker to Heroku.

[]()

[]()

[]()

[![codecov.io](https://codecov.io/github/carlosholivan/music-composition-api/coverage.svg?branch=master)](https://codecov.io/github/carlosholivan/music-composition-api?branch=master)

## Implemented Models

- MusicVAE: drums

## TODOs

- [ ] Test models
- [ ] Put music2score in werbserver to be able to print a score of a MIDI file
- [ ] Reorganize musicvae.py code
- [ ] Add more musicVAE checkpoints for inference (trios...)
- [ ] Add Music Transformer model
- [ ] Add MMM model

## Documentation

The docs will be released as soon as the pakage version is stable.

## Dependencies

* [Magenta](https://github.com/magenta/magenta)
* [VisualMIDI](https://github.com/dubreuia/visual_midi)
* [pretty MIDI](https://github.com/craffel/pretty-midi)
* [music21](https://github.com/cuthbertLab/music21)
* [Flask cors]()
* [Coverage]()

## Package Structure

[*models/*](models/)

    module containing the code of all the music generation models.

[*checkpoints/*](checkpoints/)

    model's checkpoints to perform inference.

[*notebooks/*](notebooks/)

    tutorial notebooks.

[*tests/*](tests/)

    unittests.

[*examples/*](examples/)

    examples obtained with this package.

## Development

### Conda dev environment

Using conda to setup a dev environment by running

`conda env update -f environment.yml`

In order to activate this environment you will need to running

`conda activate music-composition-api`

### Pip
This package is still in development. To install the current version, clone this repository and run:

`cd path-of-this-package`

`pip install -e .`

### Testing

To run tests: `pytest tests/`

## API Commands
Sending a command to the webserver: `POST /api/command`

It must include a payload:

```
{
"command_name": "..."
}
```

Where `commmand_name` is the name of the command.

### Commands.

#### MusicVAE.

```
{
"command_name": "music_vae"
}
```

## Authors

[**Carlos Hernández-Oliván**](https://carlosholivan.github.io/index.html) (PhD Candidate) - carloshero@unizar.es

**Jorge Abadías Puyuelo** (Bachelor Thesis student)

Department of Electronic Engineering and Communications, Universidad de Zaragoza.