Back to the World Music Factory

World Music Factory blueprint

The prototype is live: ten instruments from every inhabited continent can be played, studied and assessed today, eight of them with real recorded sound. This document records how it is built, what is fully working, what is a working prototype, and what is still planned, so nothing on the platform claims more than it does.

Feature status

Every feature in the brief is listed with its real state. Fully implemented means it works end to end for students now. Working prototype means it works but needs better assets, testing or a deployed HTTPS site. Planned means it is designed but not built.

FeatureStatusWhat exists today

Architecture

The prototype is a static web app with no server code, so it can be hosted on Cloudflare Pages, AWS S3 or embedded in WordPress, works on ordinary phones, and caches itself for offline use. Everything is plain JavaScript modules loaded in order; the only library is Three.js r128, shipped locally.

Browser (phone, tablet, laptop)index.html · hash router · Instrument page tabs: Play, 3D replica, Knowledge, Lessons, Practice studio, Sources data.jsInstrument recordsCatalogue (31 planned)UI strings: en, hi replicas.jsTen playable SVG replicastouch · mouse · keys · MIDIemit(token) on every sound audio.jsWeb Audio enginesamples + physical modelsmic pitch · recorder · MIDI models3d.jsThree.js procedural modelsraycast part pickingswap for glTF later app.jsLesson engine (10 per instrument) · Exercise engine (follow / timed)Museum · World map · Dashboard · AchievementsProgress in localStorage (device only, today) Planned backendCloudflare Workers + D1 (or Supabase): school and student accounts,teacher dashboard, synced progress, content CMS, R2 for mediaConsent records for under-18 students (DPDP Act 2023)
Solid boxes are built. The dashed box is planned.

Why this stack

No build step, no framework runtime, about 7 MB in total including all recordings and Three.js; each instrument loads only its own sounds. Pages open fast on 4G and keep working offline once loaded.

Adding an instrument

Add a record to INSTRUMENTS (profile, parts, how-to, posture, exercises, quiz, media licences), a replica function in replicas.js, and a 3D builder or glTF file. Lessons, studio, map and museum pick it up automatically.

Languages

UI strings live in I18N keyed by language; Hindi menu labels exist. Content fields are ready for per-language copies (record.t.hi), to be written by native editors.

Audio interaction architecture

All sound runs through one Web Audio graph: instrument voices feed a master bus, a short room reverb, a compressor, the speakers, an analyser (for the live waveform) and a recording tap (for "Record and compare").

InstrumentEngineHow it is playedStatus
PianoReal recordings: VCSL Steinway B, 19 notes C3–C6, pitch-shifted at most one semitone; velocity filterKeys with multi-touch and glissando, sustain pedal, computer keys, MIDIFully implemented
GuitarRecorded nylon and steel guitar samples (FluidR3_GM, CC BY 3.0); Karplus–Strong model while loadingFret on the neck, pluck or swipe-strum across strings, chordsFully implemented
BansuriAir-column model: harmonic oscillators, filtered breath noise, onset "chiff", delayed vibrato, octave by overblowingClose holes, hold to blow, breath strength; microphone breath on HTTPSWorking prototype
ViolinReal solo-violin recordings (VSCO 2 CE, CC0), looped while the bow moves; loudness follows bow speed; real pizzicatoFinger tapes, up and down bowing with bow-length meter, pizzicatoFully implemented
TablaRecorded tabla strokes (Tabla.sf2, credited); bayan bend by playback rate; Raman modal model as fallbackZones for Na, Tin, Tun, Te, Ge, Ke; two-finger Dha and Dhin; slide to bendFully implemented
SitarRecorded sitar samples (FluidR3_GM, CC BY 3.0); meend by bending the recordingCurved frets on a main string tuned to Ma, Da/Ra strokes, drag for meend, chikariFully implemented
MbiraAll 24 keys recorded (VCSL, CC0)Three rows of keys for left and right thumbsFully implemented
DarbukaRecorded Dum, Tek and Ka with round-robin variation (VCSL, CC0)Centre and rim zones for each hand; rhythms with restsFully implemented
DidgeridooRecorded drone loop, barks, toots, taps and phrases (VCSL, CC0)Hold for drone, breath level, calls, circular-breathing guide, microphone breathFully implemented
DjembeHelmholtz bass, membrane modes for tone, noise-rich slapCentre, edge and outer zones; left and right handsWorking prototype

Bansuri and djembe still use physical models because no openly shared recordings were reachable; LibNext recordings of a bansuri and a djembe player would complete the set. To replace a physical model with recordings, record each note or stroke at three dynamics with two round-robin takes, export 44.1 kHz mono MP3 at 96 kbps, and load them through the same sample player as the piano. The replica code does not change.

Instrument database structure

Today the database is js/data.js. The same shape becomes a table set in D1 or Postgres when the CMS is built.

Instrument {
  id, name, hi, local[]                    // names
  country, countries[], region, continent, at[x,y]
  family (Hornbostel–Sachs top class), hs, technique, tradition, period
  summary, documented[], legend[], uncertain[]   // history kept separate from legend
  evolution[], culture, musicians[], materials
  parts[{ id, name, purpose, build }]      // ids shared by 3D meshes and lessons
  sound, science, techniques[], repertoire[], modern, facts[], refs[]
  media { photo, model, audio, video : [status, source + licence] }
  how[[title, text]], posture[], breath[]   // how to play
  notes[], exercises { pattern, melody, melodyName, fast }, quiz[[q, options, answer]]
  status: proto | planned,  t: { hi: {...}, ta: {...} }   // translations
}
Progress (per student) { lessons{n:{done, score, date}}, sessions[{date, level, notes, score}], seconds, badges }

Application wireframes

Home: resonance ring, instruments Play: stage + how-to-play card Lesson: list, body, activities Map: countries, panel
Low-fidelity layouts of the four main screens. On phones the right-hand card always stacks below the main area.

Visual design system

The idea is the concert-hall vitrine: a white hall, each instrument lit on its own stage, with a label card beside it. Indigo carries structure, magenta marks sound and targets, and the instruments bring their own wood and metal colours.

Hall white #FFFFFF
Stage ground #F4F4FA
Raag indigo #2C2A8C
Sound magenta #E0218A
Ink #16152F
Instrument wood #B5713A

Type

Anybody, a variable-width display face, for names and numbers; it is stretched wide for instrument names. Instrument Sans for reading. Noto Sans Devanagari for Hindi.

Rules

Magenta appears only where sound or a target is involved. Every control is at least 44 px. Light and dark themes share one palette. Motion only answers the student's actions, and it switches off under reduced-motion settings.

Tone of voice

Plain English for Class V–XII students. Instructions name the exact movement. Documented history, legend and uncertainty are always labelled.

Beginner lesson content

Each instrument has ten lessons generated from its record, following the brief's sequence. A lesson unlocks when the one before it is passed.

LessonActivities
1 Introduction and recognitionListen to three instruments and pick this one; knowledge check
2 PartsFind three named parts on the 3D replica
3 Posture and holdingPosture and breathing steps; self-check, clearly labelled as not measured
4 Basic movementsMake each basic movement on the replica (all strings, five fingers, each bol)
5 First soundPlay the first note five times; the science of the sound
6 Notes and rhythmEar training (hear a note, play it back) and a timed rhythm tap
7 PatternsPattern in follow mode, with demo; 70% to pass
8 Melody or compositionOde to Joy, Teentaal theka, a Sa–Re–Ga phrase and others; 70% to pass
9 AccuracyTechnique study in timed mode at 72 BPM; 60% to pass
10 AssessmentThree questions plus a timed performance; a full pass unlocks the course achievement

Photographs and short instructional videos for lessons are Planned: each lesson shows where they will go, and the animated replica demo and audio examples stand in for now.

Assessment system

On-screen playing

Every sound emits a token (note, bol or stroke). Follow mode checks the order of notes: 100% minus 8% per wrong note. Timed mode puts each target on a click; each correct note earns 50% and timing earns up to 50%, with full marks within ±350, ±220 or ±140 ms for Beginner, Intermediate and Advanced.

Real instruments

With permission, the microphone gives pitch (autocorrelation, shown in cents) for melodic instruments and voice, and onset timing against a click for drums. This is a Working prototype: accuracy depends on the device and the room.

What is not assessed

Posture, hand shape, embouchure and bow hold are not measured. They appear as self-checks. Camera-based posture feedback is Planned and will be claimed only after testing.

Sources and licences by instrument

Each instrument's "Sources & licences" tab shows the same table to students.

InstrumentAudio3D modelPhotosVideo

Credits

This is a non-commercial educational project for school students. Every outside source is credited here and on each instrument’s Sources tab.

Development roadmap

PhaseWorkOutcome
1 · NowTen-instrument prototype, lessons, assessment, map, dashboardPilot with one or two schools
2 · Authentic mediaRecord a bansuri and a djembe player; host the photographs on LibNext’s own storage; add short videos; expert review of every profile; Hindi contentSamples replace models; content signed off
3 · AccountsCloudflare Workers + D1: school sign-in, teacher dashboard, synced progress, parental consent flowTeachers can assign lessons and see scores
4 · Indian expansionMridangam, veena, harmonium, shehnai, dholak, santoor, sarangi17 playable instruments
5 · World expansionKoto, erhu, oud, kora, steelpan, harmonica, harp and more; glTF photogrammetry models30+ playable instruments
6 · AdvancedIntermediate and advanced courses, camera posture feedback (tested), ensemble play-alongA full music curriculum

Deployment instructions

Cloudflare Pages (recommended)

  1. Unzip the package. Keep the folder structure: index.html, blueprint.html, js/, audio/, sw.js, manifest.webmanifest, icon.svg, _headers.
  2. Commit the folder to the libnext-platform GitHub repository (for example under music-factory/), or use Cloudflare Pages "Upload assets".
  3. Create a Pages project with no build command and the folder as the output directory.
  4. Add a custom domain such as music.libnext.in in the Pages project; DNS is already on Cloudflare.
  5. Open the site over HTTPS. The microphone, MIDI and offline cache need HTTPS; the _headers file allows the microphone and MIDI on your own site only.

AWS S3 or WordPress

Upload the same folder to S3 with public read on these files only, or embed the Pages URL in WordPress with an iframe that has allow="microphone; midi; fullscreen". If you do not want this blueprint public, leave blueprint.html out of the upload and remove its links.

Privacy

No data leaves the device today. The microphone is used only after an explanation screen and the browser's own permission prompt, and nothing is recorded or uploaded. Practice recordings stay in the browser until the student downloads them. When accounts are added, under-18 students will need verifiable parental consent under India's Digital Personal Data Protection Act, 2023.