[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110854":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":15,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},110854,"vinyl","rauchg\u002Fvinyl","rauchg","A record player simulated from the groove up","https:\u002F\u002Fvinyl-gl.vercel.app",null,"JavaScript",146,32,53,1,0,9,71,5,58.16,"MIT License",false,"main",[],"2026-11-08 20:56:13","2026-11-23 19:17:34","# vinyl\n\nA record player simulated \"from the groove up\" in the browser: **[vinyl-gl.vercel.app](https:\u002F\u002Fvinyl-gl.vercel.app)**.\n\nInstead of playing an audio file, the music is cut into a spiral [groove](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FPhonograph_record), and a simulated [stylus](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FPhonograph#Stylus), cantilever, [tonearm](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FPhonograph#Arm_systems) and [cartridge](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMagnetic_cartridge) read it back on the audio thread. What you hear is the voltage that motion would induce in the cartridge, after phono equalisation.\n\nThis is a _physical simulation_ of a record player's mechanics, which happen to play sound.\n\n## Features\n\n- **\"Real\", procedural flaws**: hiss and crackle are roughness and dust on the groove walls. A scratch ticks once per turn because the needle crosses it once per turn. Treble dulls toward the label because the groove moves slower there. Knock the table and it skips.\n- **Real physics, in real time**: a 2 DOF stylus tip on [Hertzian](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FContact_mechanics#Hertzian_theory_of_non-adhesive_elastic_contact) wall contacts with friction, oversampled inside an `AudioWorklet`, with platter inertia, arm kinematics, [RIAA de-emphasis](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FRIAA_equalization) and three stylus shapes (conical, elliptical, micro-line).\n- **Bring your own audio**: _Cut a file_ runs the lathe on anything you drop in, in a worker, in the browser. _Press again_ makes a dirtier (or cleaner) copy of the same cut.\n- **No dependencies, no bundler**: plain ES modules, WebGL2 and Web Audio. The build copies files.\n\n## Running it\n\n```bash\n$ vercel dev\n```\n\nThat's it. `vercel dev` runs the same build as production (`node build.mjs`, which writes `dist\u002F`) and serves it on [localhost:3000](http:\u002F\u002Flocalhost:3000). It builds once, so restart it after editing.\n\nThere's nothing to install. Node 22+ is enough for the build and the tests:\n\n```bash\n$ npm run build   # dist\u002F: index.html, src\u002F, assets\u002F, records\u002F\n$ npm test        # offline checks of the physics: response, distortion, surface noise, cue, skip\n$ npm run bench   # CPU cost of the engine per second of audio\n```\n\n## How it works\n\n**1️⃣ Cut.** The lathe ([`src\u002Fcut.js`](src\u002Fcut.js)) turns audio into the shape of the two walls of a [45\u002F45 stereo groove](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FPhonograph_record#Stereophonic_sound) at 33⅓ rpm: RIAA pre-emphasis, an acceleration limiter so the cutter could have cut it, and a spiral pitched so the side fits on a 12\" disc.\n\n**2️⃣ Press.** The pressing plant ([`src\u002Fpress.js`](src\u002Fpress.js)) changes the geometry itself: wall roughness, dust, scratches, warp, an off-centre hole, groove echo. Nothing in it is an audio effect. It's seeded, so the same record always presses the same way.\n\n**3️⃣ Play.** The engine ([`src\u002Fengine.js`](src\u002Fengine.js), [`src\u002Fengine-core.js`](src\u002Fengine-core.js), [`src\u002Fgroove.js`](src\u002Fgroove.js)) rides the stylus over those walls. A tip of finite radius can't follow the wall exactly, and that's where tracing distortion, pinch effect and inner-groove loss come from. Too little tracking force and it leaves the wall.\n\n**4️⃣ Draw.** The deck ([`src\u002Frender.js`](src\u002Frender.js), [`src\u002Fshaders.js`](src\u002Fshaders.js)) draws the disc from the cut itself: the actual spiral, lit by how hard each revolution is modulated.\n\n## Records\n\nCutting a whole side takes a while, so the records on the shelf are cut ahead of time and committed to `assets\u002F`. The clean cut ships as 16-bit [DPCM](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FDifferential_pulse-code_modulation) inside FLAC (within a quarter of a nanometre of the cut wall), and the page presses it with the seed. The source audio lives in `records\u002F`, listed in [`src\u002Frecords.js`](src\u002Frecords.js).\n\nTo add a record, or after changing the lathe, re-cut what's out of date (needs `ffmpeg`) and commit `assets\u002F`:\n\n```bash\n$ npm run lathe           # every record that is out of date\n$ node lathe.mjs toccata  # just this one\n```\n\nThe build refuses to deploy a shelf record that was never cut.\n\n## Credits\n\nEvery recording is public domain or freely licensed:\n\n- Gershwin, _Rhapsody in Blue_: George Gershwin, piano, with Paul Whiteman's Concert Orchestra, Victor, 1924 ([LOC](https:\u002F\u002Fwww.loc.gov\u002Fitem\u002Fjukebox-70342\u002F))\n- Beethoven, _Moonlight Sonata_: Paul Pitman, piano, for Musopen\n- Satie, _Gymnopédie No. 1_: Robin Alciatore, piano, for Musopen\n- Chopin, _Nocturne Op. 9 No. 2_: Frank Lévy, piano, for Musopen\n- Debussy, _Clair de lune_: Laurens Goedhart, piano, 2011\n- Grieg, _In the Hall of the Mountain King_: Musopen Symphony\n- Tchaikovsky, _1812 Overture_: US Marine Band, live at Wolf Trap, 2019\n- Bach, _Toccata and Fugue_: Ashtar Moïra, organ\n- Vivaldi, _Summer: Presto_: John Harrison, violin, with the Wichita State University Chamber Players (CC BY-SA 4.0)\n- HoliznaCC0, _Summer Air_ (CC0, [Free Music Archive](https:\u002F\u002Ffreemusicarchive.org\u002Fmusic\u002Fholiznacc0\u002Fsummer-air-lo-fi\u002F))\n\nSources for each are linked in [`src\u002Frecords.js`](src\u002Frecords.js). The _Demo EP_ is synthesised by the page.\n\n## License\n\nThe code is [MIT](LICENSE). The recordings in `records\u002F`, and the records cut from them in `assets\u002F`, keep their own licenses, listed above. _Summer: Presto_ is CC BY-SA 4.0, so its cut is too.\n","这是一个基于物理仿真的黑胶唱机浏览器应用，通过WebGL和Web Audio实时模拟唱针在唱片沟槽中的运动并生成音频信号。核心功能包括：真实建模的机械系统（唱针、悬臂、唱臂、拾音头）、RIAA均衡处理、三种唱针形状支持、可编程沟槽缺陷（灰尘、划痕、翘曲）以及本地音频文件的实时‘刻录’与‘压片’。所有计算在AudioWorklet中以高采样率执行，无外部依赖。适用于数字音频教育、声音物理建模研究、复古音频交互展示及Web端音乐可视化实验等场景。",2,"2026-11-24 04:39:48","CREATED_QUERY"]