LakhNES
A Transformer-XL that generates four-voice NES chiptunes as event sequences, pre-trained on Lakh MIDI.
Audio and speech · 605 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Audio and speech
- Parameters
- 41.3M
- Operations
- 605
- Framework
- PyTorch
- Recurrent
- No
- Published
- ISMIR 2019
- Cited by
- 73 (as of 27 October 2026)
- Authors
- Chris Donahue, Huanru Henry Mao, Yiting Ethan Li and others
- Source
- GitHub: chrisdonahue/LakhNES
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m17851
- Graph hash
- af733f8e8ba0e0c598177722dfc4f620fce1e7efa5fca336f27fdb519da29593
- Skeleton hash
- e5611675a0c7441060750345edee5b02f092b068e9fc8d898eee56de193f2a19
- Architecture hash
- 1ff2849c8ab4fed0cd2133e62250b42eeac9b87ee8f435d3c08d113134fc0775
- Diagram SHA-256
- a9af45a1afe00569c1070303482e50dfcc0d449a9b61547a8a295f81a9bfca04
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
LakhNES is a deep neural network capable of generating music that can be played by the audio synthesis chip on the Nintendo Entertainment System (NES). It is a language model over musical events: the paper uses only the decoder portion of the Transformer, in the extension called Transformer-XL, which is designed specifically to handle longer sequences.
The NES sound chip has four monophonic instrument voices: two pulse waveform generators, one triangle waveform generator and one noise generator. Each score is converted into a time-ordered sequence of events, with separate note on/off events for each instrument. The final representation consists of 631 events, of which about half encode time-related events and half note-related ones. The paper uses the smaller configuration of Transformer-XL, which has 12 attention layers each with 8 heads, and trains on excerpts of 512 events.
The paper calls the model pre-trained on Lakh MIDI and fine-tuned on NES-MDB LakhNES. To make that possible, the authors heuristically map the arbitrary ensembles of music in Lakh MIDI into the four-voice ensemble of the NES. They report that LakhNES achieves 10% better performance than training with data augmentation alone. LakhNES outputs sequences of musical events, which need to be separately synthesized into 8-bit audio.
Key idea. The paper adapts Transformer-XL to multi-instrumental score generation on NES-MDB and shows that pre-training on a mapped Lakh MIDI dataset improves quantitative and qualitative performance.
- lakhnes
- chiptune generation
- 8-bit music
- nes music
- multi-instrumental music generation
- symbolic music generation
- nes-mdb
- lakh midi
- cross-domain pre-training
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{donahue2019lakhnesimprovingmultiinstrumentalmusic,
title={LakhNES: Improving multi-instrumental music generation with cross-domain pre-training},
author={Chris Donahue and Huanru Henry Mao and Yiting Ethan Li and Garrison W. Cottrell and Julian McAuley},
year={2019},
eprint={1907.04868},
archivePrefix={arXiv},
primaryClass={cs.SD},
url={https://arxiv.org/abs/1907.04868},
}