The Patchbay_

Tonal vs Teoria

Both answer music-theory questions in JavaScript. The practical difference is maintenance and API style, and one of them is clearly ahead.

Short answer. Tonal, for essentially all new work — it is modular, actively maintained and functional. Teoria is fine in existing projects but development has been quiet for years.

Side by side

Tonal Teoria
API styleFunctional, immutableObject-oriented
ModularityPer-feature packagesSingle library
TypeScriptYesNo
Bundle impactImport only what you needWhole library
CoverageNotes, intervals, scales, chords, keys, progressionsNotes, intervals, scales, chords
LanguageJavaScriptJavaScript
LicenseMITMIT
PlatformsmacOS Windows Linux WebmacOS Windows Linux Web
First released20152011
MaintainedYesNot actively maintained (last activity 2017)

Where they actually differ

Maintenance decides it

Tonal is actively developed with TypeScript types and regular releases. Teoria has been effectively dormant for years. For a dependency that sits at the centre of a music app, that difference outweighs any API preference.

Functional and modular versus object-oriented

Tonal exposes pure functions over strings and plain objects, and ships as separate packages so you can import only the scale logic if that is all you need. Teoria builds note and chord objects with methods. Both are workable; Tonal’s approach is easier to tree-shake and easier to test.

Tonal covers more ground

Key analysis, progressions, roman numerals and pitch-class set operations are available in Tonal’s package family. Teoria covers the fundamentals well but stops sooner.

Migration is not painful

Both work with note names as strings at the boundary, so replacing Teoria usually means rewriting call sites rather than restructuring your data.

Which should you choose?

Choose Tonal when…

Choose Teoria when…

Tonal detailsTeoria detailsAll ML & generative

← All comparisons