Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Talk To Rocky — Eridian Translator

A static web app that translates English text into Eridian, the chord-based alien language spoken by Rocky in Andy Weir's Project Hail Mary. Type something in English, see the chord notation on a staff, and hear it played back as polyphonic chords through your speakers.

Live: https://mbarc.github.io/eridian-translator-talk-to-rocky/

How translation works

The novel only specifies a handful of canonical chord mappings (love → F major, I love you → Csus4 → F major → C major, etc.). To handle arbitrary English the translator uses three layers in priority order:

  1. Canonical — chords taken straight from the book.
  2. Curated — ~100 hand-authored chord assignments for Rocky's in-book vocabulary (yes, no, amaze, question, friend, engine, …), following the in-universe rules (basic concepts → fewer notes, emotional words → triads, questions → rising contour, etc.).
  3. Procedural — anything else is hashed into a chord deterministically, so the same word always produces the same Eridian sound.

Each word card is colour-coded by source.

How playback works

  • Web Audio API. No audio assets, no bundler, no build step.
  • One OscillatorNode per note in the chord, all played simultaneously, so you hear true polyphony (Rocky has five vocal bladders).
  • Triangle waveform with a soft attack/release envelope evokes an ocarina/flute timbre.
  • Quarter-note vs eighth-note durations match the long/short distinction Andy Weir transcribes in the novel.

Stack

  • Vanilla HTML/CSS/JavaScript (ES modules).
  • VexFlow loaded from a CDN for the musical staff rendering.
  • Deployed to GitHub Pages via .github/workflows/pages.yml.

Run locally

ES modules can't be loaded over file://, so serve the directory with any static server:

python3 -m http.server 8000
# then open http://localhost:8000

Or:

npx serve .

Project layout

index.html
styles.css
src/
  main.js          UI wiring
  translator.js    English → chord-sequence pipeline
  dictionary.js    canonical + curated mappings
  procedural.js    deterministic hash-based fallback
  audio.js         Web Audio chord playback
  music.js         note ↔ frequency helpers
  notation.js      VexFlow staff rendering
.github/workflows/pages.yml

Attribution

Eridian, Rocky, and Project Hail Mary are © Andy Weir. This is a fan project, not affiliated with the author or the film. Source on GitHub: https://github.com/mbarc/eridian-translator-talk-to-rocky.

About

Web app that translates between English and Eridian, the musical language from Andy Weir's Project Hail Mary.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages