Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.15 KB

README.md

File metadata and controls

55 lines (36 loc) · 1.15 KB

Giant Music Transformer

Giant Music Transformer as a PyPi package

Giant-Music-Transformer-Artwork (10)


Install

pip install giantmusictransformer

(Optional) FluidSynth for MIDI to Audio functinality

Ubuntu or Debian
sudo apt-get install fluidsynth
Windows (with Chocolatey)
choco install fluidsynth

Quick-start use example

import giantmusictransformer as gmt

# Load desired Giant Music Transformer model
# There are several to choose from...
model = gmt.load_model('medium')

# Get sample seed MIDI path
sample_midi_path = gmt.get_sample_midi_files()[6][1]

# Load seed MIDI
input_tokens = gmt.midi_to_tokens(sample_midi_path)

# Generate seed MIDI continuation
output_tokens = gmt.generate(model, input_tokens, 600, return_prime=True)

# Save output to MIDI
gmt.tokens_to_midi(output_tokens[0])

Project Los Angeles

Tegridy Code 2024