andreasjansson / music-inpainting-bert

Music inpainting of melody and chords

  • Public
  • 8.6K runs
  • T4
  • GitHub
  • License

Input

*string
Shift + Return to add a new line

Notes in tinynotation, with each bar separated by '|'. Use '?' for bars you want in-painted.

*string
Shift + Return to add a new line

Chords (one chord per bar), with each bar separated by '|'. Use '?' for bars you want in-painted.

integer

Time signature

Default: 4

integer
(minimum: 60, maximum: 200)

Tempo (beats per minute)

Default: 120

integer
(minimum: 1, maximum: 200)

Number of potential predictions to sample from. The higher, the more chaotic the output.

Default: 10

integer

Random seed, -1 for random

Default: -1

Output

mp3

Video Player is loading.
Current Time 00:00:000
Duration 00:00:000
Loaded: 0%
Stream Type LIVE
Remaining Time 00:00:000
 
1x

score

score
Generated in

Run time and cost

This model costs approximately $0.0014 to run on Replicate, or 714 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia T4 GPU hardware. Predictions typically complete within 7 seconds. The predict time for this model varies significantly based on the inputs.

Readme

Music inpainting with BERT

This model generates monophonic melody and chords jointly, by filling in missing pieces.

In the notes and chords inputs, you can use ? to let the machine generate notes and chords for a bar at a time. See and tweak the examples to get a better idea of how it works.

Notes are input in TinyNotation format.

This model was trained on the Wikifonia dataset.