A modern web-based chiptune tracker for composing on retro sound chips. A project can hold several songs, and each song uses its own chip.
- AY-3-8910 / YM2149F - ZX Spectrum, MSX, Atari ST, and other 8-bit machines
- 2A03 / 2A07 - NES / Famicom. Each song is NTSC, PAL, or Dendy
- SAA1099 (work in progress) - SAM Coupé and Creative Music System / Game Blaster
User documentation lives in docs/ (pnpm docs:dev).
- Canvas-based pattern editor with order list
- Piano roll (experimental): draw, move, and resize notes on a pitch grid, with a lane for the other pattern fields. Turn it on under Settings → Experimental features, then View → Piano roll
- Field-based editing with selection, copy/cut/paste, and magic paste
- Virtual channels - map multiple pattern columns onto a single hardware channel
- Transpose, increment/decrement, and channel swap editing tools
- AY auto envelope and envelope-as-note modes
- Customizable keybindings
- AY/YM instrument editor with tone, noise, envelope, and sample playback
- Timer effects (waveform, PWM, and related AY timer instruments)
- NES instrument editor for the five 2A03 channels: two pulses, triangle, noise, and DPCM
- SAA1099 instrument editor (work in progress) with stereo volume, tone, noise, and envelope macros
- Tables (known as Ornaments in Vortex Tracker 2)
- Built-in instrument presets
- Instrument preview playground
- Play, pause, play from cursor, play pattern, and solo/mute controls
- Real-time channel oscilloscopes
- MIDI keyboard input for note entry
- Open and save Bitphase projects (
.btp) - Import ProTracker 3 (
.pt3), Vortex Tracker 2 (.vt2), TAYM (.taym), and PSG (.psg) - Import FamiTracker (
.ftm) and 0CC-FamiTracker (.0cc) as a 2A03 song, and Dn-FamiTracker (.dnm) when the module is NES or NES plus Sunsoft 5B. A Sunsoft 5B module also adds an AY song. - Import E-Tracker SAA1099 modules (
.cop,.etc,.saa,.sng,.m) as an SAA song - Export WAV for any project, PSG / TAYM / SNDH for AY songs, VGM for AY, NES, and SAA (at most two of each), and NSF when the project has at most one AY song and one NES song (SAA songs are not included in NSF)
- AY timer effects are rendered in WAV and written into TAYM and VGM. PSG and SNDH stay one register frame per interrupt
- Several AY songs export as a ZIP of PSG or TAYM files
- Command-line export:
pnpm btp-to-wav,pnpm btp-to-psg,pnpm btp-to-taym
- Undo/redo with labeled history
- Lua user scripts for batch edits on selections
- Automatic project backup with recovery on reload
- Custom themes and appearance settings
- Node.js (v18 or higher; v20 recommended)
- pnpm (v10.11.0 or higher)
- Emscripten SDK - required for building WebAssembly modules (AY, NES, and SAA)
- Git submodules - the Ayumi emulator lives in
external/ayumi. NES APU sources ship inexternal/nsfplug. SAA1099 sources ship inexternal/saasound
- Download and install Emscripten from emscripten.org
- Set the
EMSDKenvironment variable to point to your Emscripten installation - Ensure
emccis available in your PATH
-
Clone the repository
git clone --recurse-submodules https://github.com/paator/bitphase.git cd bitphaseIf you already cloned without submodules:
git submodule update --init --recursive
-
Install dependencies
pnpm install
-
Start the development server
pnpm dev
This builds the WASM modules (Ayumi, NES, and SAA) and starts Vite. You can also run
pnpm build:wasmon its own when the C sources change. -
Open your browser
Navigate to
http://localhost:5173(or the port shown in the terminal)
pnpm dev- build WASM and start the development server with hot module replacementpnpm build- build WASM, the tracker production bundle, and the docs site intodist/pnpm build:wasm- build only the WebAssembly modules (public/ay/ayumi.wasm,public/nes/*.wasm,public/saa/saasound.wasm)pnpm docs:dev- run the VitePress docs site locallypnpm docs:build- build docs intodist/docspnpm preview- preview the production tracker build locallypnpm check- run TypeScript and Svelte type checkingpnpm test- run tests in watch modepnpm test:run- run tests oncepnpm btp-to-wav- export a.btpproject to WAV from the command linepnpm btp-to-psg- export a.btpproject to PSG from the command linepnpm btp-to-taym- export a.btpproject to TAYM from the command line
bitphase/
├── cli/ # Command-line tools (btp-to-wav, BTP loading)
├── docs/ # User docs (VitePress) and format specs
├── external/
│ ├── ayumi/ # AY-8910 emulator C source (git submodule)
│ ├── nsfplug/ # NES APU C sources compiled to WASM
│ └── saasound/ # SAA1099 emulator C++ sources compiled to WASM
├── public/ # Static assets and runtime audio code
│ ├── audio/ # AudioWorklet processor
│ ├── ay/ # AY runtime and ayumi.wasm
│ ├── nes/ # 2A03 runtime and nes_apu.wasm
│ ├── saa/ # SAA1099 runtime and saasound.wasm
│ ├── tracker/ # Shared tracker playback pipeline
│ ├── fonts/
│ └── worklet/
├── src/
│ ├── app.css # Global styles
│ ├── main.ts # App entry point
│ ├── App.svelte # Root component
│ ├── demo/ # Bundled demo songs (.btp)
│ ├── presets/ # Built-in instrument preset JSON files
│ └── lib/
│ ├── chips/ # Chip implementations and registry
│ │ ├── ay/ # AY-8910 (schema, adapter, renderer, processor)
│ │ ├── nes/ # 2A03 (schema, adapter, renderer, processor)
│ │ ├── saa/ # SAA1099, work in progress
│ │ └── base/ # Shared chip interfaces
│ ├── components/ # Svelte UI components
│ │ ├── AppLayout/
│ │ ├── Menu/
│ │ ├── Song/ # Pattern editor and song view
│ │ ├── Instruments/
│ │ ├── Modal/
│ │ ├── Settings/
│ │ ├── Tables/
│ │ ├── Theme/
│ │ ├── History/
│ │ ├── Details/
│ │ ├── Audio/
│ │ └── ... # Shared UI primitives (Button, Input, etc.)
│ ├── config/ # Menu, keybindings, settings, themes, export formats
│ ├── models/ # Domain models (project, song, history, virtual channels)
│ │ ├── pt3/ # PT3 tuning tables
│ │ └── song/ # Song model utilities
│ ├── presets/ # Preset loading utilities
│ ├── services/ # Business logic
│ │ ├── app/ # Menu actions and app context
│ │ ├── audio/ # Playback and AudioWorklet bridge
│ │ ├── backup/ # Autobackup
│ │ ├── file/ # Import/export (BTP, PT3, VT2, TAYM, PSG, FTM, DNM, E-Tracker, WAV, VGM, SNDH)
│ │ ├── history/ # Undo/redo diff tracking
│ │ ├── midi/ # MIDI input
│ │ ├── modal/
│ │ ├── pattern/ # Pattern editing, navigation, clipboard
│ │ ├── piano-roll/ # Piano roll notes, lanes, and editing
│ │ │ └── editing/ # Field-based editing strategies
│ │ ├── project/ # Project management and migration
│ │ ├── theme/
│ │ └── user-scripts/ # Lua user scripts
│ ├── stores/ # Reactive state (Svelte 5 runes, .svelte.ts)
│ ├── types/
│ ├── ui-rendering/ # Canvas renderers (pattern editor, order list, piano roll)
│ └── utils/
└── tests/ # Tests mirroring src/ structure
├── fixtures/
├── lib/
├── public/ # Tests for public/ runtime scripts
└── psg/
Bitphase is NOT vibe coded. I (Pator) use AI tools as a coding assistant. I design the features, review the changes, and understand all the code that ships. Hand crafted code is still there.
Bitphase is MIT licensed. Third-party software distributed with the app is listed in public/THIRD_PARTY_NOTICES.txt. The running app links to that file from About.
