# magenta/magenta-js

Magenta.js: Music and Art Generation with Machine Learning in the browser

Repository: https://github.com/magenta/magenta-js
Canonical: https://ross.abutalabs.com/products/magenta-js
Homepage: https://magenta.tensorflow.org
Language: TypeScript
License: Apache-2.0
License Family: permissive
Last push: 2026-06-22T20:40:59+00:00

## Health v2 (maintenance only)
Score: 72/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 88, release rhythm 35, longevity 100
- inputs: {"age_days": 3082, "days_push": 72, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2125, forks 337 (observed 2026-08-28T04:06:16.851998+00:00)

## What it is
Magenta.js is a collection of TypeScript libraries for running inference with pre-trained Magenta machine learning models directly in the browser via TensorFlow.js. It provides npm packages for music generation (MusicVAE, MelodyRNN, DrumsRNN), sketch drawing (SketchRNN), and image style transfer.

## Use cases
- generate music melodies in the browser with machine learning
- run MusicVAE or MelodyRNN models client-side
- create AI-assisted sketch drawings with SketchRNN
- apply neural style transfer to images in a web app
- build interactive creative AI demos in JavaScript
- generate drum patterns with machine learning in the browser

## When to choose
- you want to run pre-trained generative music or art models entirely client-side in the browser
- you need TensorFlow.js implementations of Magenta models via npm packages
- you are building creative coding or interactive AI music/art web applications

## When to avoid
- you need to train models from scratch rather than run inference with pre-trained ones
- you need server-side or high-performance native ML inference outside the browser
- you need the latest Magenta models like RealTime/Lyria, which live in other Magenta projects

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, audio-processing, image-processing, graphics
- domain: machine-learning, deep-learning, artificial-intelligence, image-processing, web-development
- platform: browser
- tags: tensorflowjs, music-generation, sketch-generation, style-transfer, generative-art, pretrained-models, npm-packages, creative-coding, audio, nodejs, javascript, typescript, web

## Member repositories
- magenta/magenta-js (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:16.851998+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:52:41.035497+00:00, confidence not recorded.
  - readme: https://github.com/magenta/magenta-js (fetched 2026-08-28T04:06:16.851998+00:00, sha f8d4ee2cd196)
  - homepage: https://magenta.tensorflow.org (fetched 2026-08-29T10:32:55.745339+00:00, sha e0ea7cd92c27)
- Data as of 2026-08-30T08:39:29.467469+00:00.
