Watch and listen to sorting algorithms in your browser, or edit them to experiment with their behavior.

- Live Demo: Try Audio Sort in your browser.
- About: The project’s origins and 2026 modernization.
- Algorithm API: Write custom algorithms using the recording API.
- Sorting algorithm catalog: Compare algorithms, implementation status, and candidates for additions.
- Original project page: The historical project overview and collection of related resources.
- Source Code: Browse the code, issues, and development history on GitHub.
- TODO List: See open feature ideas and maintenance work.
Requires Node.js 24+ and pnpm (version pinned in package.json).
pnpm install --frozen-lockfile
pnpm dev
Open /audio-sort/ on the development server. Build with pnpm run build
(output: dist/audio-sort/). Run checks with pnpm run check.
See development documentation for browser tests and deployment.
- timbre.js: Synthesizes tones and plays soundfont instruments for sorting playback.
- D3: Provides scale, color, path geometry, and array utilities; React renders the SVG charts.
- Jotai: Stores selected audio and sorting settings independently of the UI.
- React: Renders settings, playback controls, and editing/export dialogs.
- TanStack Start: Prerenders the React pages for static hosting.
- Tailwind CSS: Styles the workspace and its reusable components.
- shadcn/ui: Provides buttons, dialogs, tabs, and sliders built on Base UI.
- Lucide: Provides consistent SVG icons for playback and other controls.
- Ace: Powers the algorithm editor with syntax highlighting and JavaScript diagnostics.
- jsmidgen: Encodes sorting playback as MIDI files.
- FileSaver.js: Downloads generated MIDI files in the browser.
- Musical scale data is adapted from subcollider.js.
All 108 scales and the original license notice are preserved in scales.ts.
Interactive visualizations
Videos and visual galleries
Copyright (c) 2013 skratchdot
Licensed under the MIT license.