It sounds like you want a web-based HTML chiptune tracker with the following features:
- Control over BPM
- Multiple patterns and rows per pattern
- Synth per instrument with custom oscillator waveforms
- Control over volume, detune, ADSR envelope, filter, noise
- Ability to share songs
- UI shortcuts including duplicate, delete, loop
- Support for comments or URLs like
"/#" (maybe for permalinks)
- No demo songs included by default (clean slate)
Here's an outline and recommended resources to build or use such a tool:
1. What is a Chiptune Tracker?
A chiptune tracker is a music sequencer inspired by classic “tracker” software, letting you compose music pattern by pattern with step sequencing typically in hex rows and columns.
2. Existing Open Source Projects to Look At
-
BeepBox
A very polished online chiptune tracker — supports patterns, rows, BPM, ADSR, filters, multiple synths, custom oscillator waveforms, sharing via URL, shortcuts, and more.
You can fork or study it on GitHub (MIT License) and modify to remove demos.
-
FamiTracker (Windows app)
Classic NES tracker, inspiration for HTML versions.
-
JummBox
A modern retro-style tracker in JavaScript, open source.
3. Libraries / APIs to Use
-
Web Audio API
For synthesizers, ADSR envelopes, filters, noise generators.
-
Tone.js
High-level Web Audio framework that supports oscillators, filters, envelopes, easy scheduling.
-
Vue, React, or vanilla JS
For UI including patterns, shortcuts, and editing.
4. Basic Feature Implementation Tips
| Feature | How to Implement |
|---|
| BPM | Control playback speed of pattern step events |
| Patterns & Rows | 2D array data structures storing note events and effects |
| Synth per Instrument | Each instrument holds settings: oscillator type, volume, detune, etc. |
| Custom Oscillator Waveform | Use Web Audio PeriodicWave or Tone.js custom waveforms |
| Volume, Detune, ADSR | Control Web Audio node parameters dynamically |
| Filter | Use BiquadFilterNode (lowpass, highpass controls) |
| Noise | Generate white noise buffers for percussion or effects |
| Share Song | Serialize pattern & instrument data to URL hash /#[data] |
| Shortcuts (dup, del, loop) | Keyboard event listeners tied to UI element focus |
| Dupe/Delete | Clone or remove pattern data structures |
| Loop | Playback cursor loops patterns |
/# Support | Use URL hash to store/load song data for sharing |
| No Demo | Provide a clean empty state on load |
5. Example Minimal Setup (Conceptual)
Here’s a super simplified outline in pseudocode (actual full code is quite longer):
const bpm = 120;
const rowsPerPattern = 64;
const instruments = [{
oscType: 'sawtooth',
volume: 0.5,
detune: 0,
adsr: { attack:0.1, decay:0.1, sustain:0.7, release:0.2 },
filter: { type:'lowpass', frequency: 8000 }
}];
// pattern[n][row] = { inst, note, volume, effect }
const patterns = [
Array(rowsPerPattern).fill(null)
];
// Playback loop - scheduled on AudioContext time
function playPattern(pattern, bpm) {
const secondsPerRow = 60 / bpm / 4; // 4 rows per beat example
for (let row=0; row < rowsPerPattern; row++){
scheduleRow(row, secondsPerRow * row);
}
}
function scheduleRow(row, time) {
const event = patterns[0][row];
if(event) {
const inst = instruments[event.inst];
playNote(inst, event.note, time);
}
}
function playNote(inst, note, time) {
const osc = audioCtx.createOscillator();
osc.type = inst.oscType;
osc.detune.value = inst.detune;
// Set up gain with ADSR...
osc.start(time);
osc.stop(time + 0.5);
}
6. Demo / Ready Tools Without Demo Songs
If you want a ready-made tool online without demo songs, your best bet is to fork BeepBox and remove demo presets from the UI.
- Remove demo songs from the "Load" dialog
- Start with empty song data on load
Summary
If you seek a complete tool:
- Use or fork BeepBox
- Customize for UI shortcuts you want
- Remove demo songs for a clean slate
- Implement features via Web Audio or Tone.js
If you want help writing a specific implementation or UI code, let me know!
If you want, I can help write a minimal prototype tracker in pure HTML/JS with these features. Would you like that?