It sounds like you want to create or work with an HTML-based chiptune music tracker that supports features like:
- Setting BPM (tempo)
- Patterns with rows per pattern
- Multiple instruments with synth controls, including:
- Custom oscillators
- Volume
- Detune
- ADSR (Attack, Decay, Sustain, Release)
- Filters
- Noise
- Ability to share songs, possibly via URL hashes (
/#)
- Keyboard shortcuts for easier composing
- Looping playback
- No demo audio auto-play (or example demo included)
If your goal is to build such a tracker or find one matching these features, here’s how you can approach it:
1. Existing HTML5 Chiptune Trackers
There are some HTML/JS chiptune trackers out there that might fit most or all of your needs:
-
BeepBox:
An online chiptune editor with BPM control, patterns, multiple instruments, custom oscillator waveforms, filters, volume, detune, ADSR envelopes, noise, keyboard shortcuts, looping, and song sharing via URL hash.
BeepBox is probably the closest match.
Features:
- BPM adjustable
- Patterns with rows (measures)
- Multiple synth instruments with custom waveforms
- Volume, detuning, ADSR, filters
- Noise channel
- Keyboard shortcuts
- Shareable songs via URLs (
/#...)
- Loop patterns
- No autoplay demo; just your song
-
Jummbox (less known):
Another web-based chiptune tracker supporting instrument synthesis and song sharing.
-
Other trackers may exist but BeepBox is the most advanced and popular free online tool.
2. If You Want to Build Your Own Tracker in HTML/JS
To implement all these features by yourself, you need to:
-
Use Web Audio API to synthesize sounds with:
- Oscillators for synth waveforms (sine, square, triangle, custom waves)
- Gain nodes for volume control
- Detune values on oscillators
- ADSR envelopes implemented with Gain node automation
- Filter nodes (lowpass, highpass, etc.)
- Noise created by buffer source with random data or using an oscillator with noise waveform
-
Manage patterns as arrays of notes per instrument, where each pattern has a fixed number of rows (steps).
-
Use a BPM timer (interval or Web Audio Scheduling) to schedule note playback according to BPM and pattern step interval.
-
Allow multiple instruments, each with their own synth config.
-
Implement UI for editing patterns, notes, instruments, and synth parameters.
-
Keyboard event listeners for shortcuts (play/pause, pattern navigation, note input).
-
URL hashing (/#songdata) with encodeURIComponent or compression (like base64 + LZ-string) for sharing songs via links.
-
Loop playback logic over selected patterns or whole songs.
3. Simple Example Skeleton for Synth (Web Audio)
const AudioContext = window.AudioContext || window.webkitAudioContext;
const ctx = new AudioContext();
function createSynth({freq, volume=0.5, detune=0, adsr, filterFreq, noise}) {
const osc = ctx.createOscillator();
const gain = ctx.createGain();
const filter = ctx.createBiquadFilter();
osc.frequency.setValueAtTime(freq, ctx.currentTime);
osc.detune.setValueAtTime(detune, ctx.currentTime);
osc.type = 'square'; // example waveform
// ADSR envelope example:
const now = ctx.currentTime;
gain.gain.setValueAtTime(0, now);
gain.gain.linearRampToValueAtTime(volume, now + adsr.attack);
gain.gain.linearRampToValueAtTime(volume * adsr.sustain, now + adsr.attack + adsr.decay);
gain.gain.setValueAtTime(volume * adsr.sustain, now + adsr.attack + adsr.decay + 0.1);
gain.gain.linearRampToValueAtTime(0, now + adsr.attack + adsr.decay + adsr.release + 0.1);
filter.type = 'lowpass';
filter.frequency.setValueAtTime(filterFreq || 1000, now);
osc.connect(filter).connect(gain).connect(ctx.destination);
osc.start(now);
osc.stop(now + adsr.attack + adsr.decay + adsr.release + 0.2);
}
You’d expand on this by scheduling each note according to BPM and your pattern rows.
4. Useful Libraries
- Tone.js: Makes dealing with timing, instruments, envelopes, filters much easier and supports all these features.
- LZ-string: For compressing pattern data in URL.
- Web Audio API: For low-level audio synthesis.
5. Example of URL Hash Sharing
When you save your song pattern info, convert it to JSON, compress it, encode to base64 and append it to URL hash:
https://yourtracker.html/#<compressedBase64EncodedSongData>
On load, parse and decompress pattern data from the hash.
Summary
- Use BeepBox for ready-made HTML5 chiptune tracker with all the features you listed.
- To build your own, use Web Audio API + Tone.js.
- Manage song data as JSON, save/share via URL hash.
- Add keyboard shortcuts and loop playback in your UI.
- Implement ADSR, filters, custom oscillators, noise, volume, detune per instrument.
If you want, I can help you start building a minimal HTML tracker implementing some of these features, or guide you on integrating existing tools! Let me know!