Felix' Workshop

Chiptune Tracker

— BPM

The order plays patterns by number. A pattern can appear in it as often as it likes; there is only ever one of it.

Click a column to put the cursor in it, then play the keyboard: ZM is one octave, QU the one above. stops a ringing note. In the other columns type hex digits, and in the effect column a letter first.

A sequence is read one value per video frame — sixty a second — and holds its last value forever unless it is given a loop point, which is the difference between a note that decays and one that sustains. Drag across a sequence to draw it; click the strip beneath to set where it loops.

Everything you hear is computed here, one sample at a time, from a model of the Ricoh 2A03 — the chip in the NES. Two pulse channels with four duty cycles, a triangle with 32 fixed levels and no volume control at all, and noise off a 15-bit shift register. No sockets are opened and nothing is uploaded; the song is held in this browser and saved to a file you keep. The WAV you download is the same buffer the page just played, so it cannot differ from what you heard.

A pitch on this chip is not a frequency but an integer divider off one 1.789773 MHz clock, so most notes are slightly wrong and the error grows as you go up: middle C is under two cents flat and the top of the range reaches a fifth of a semitone. The readout beside the pattern prints the error for the note under the cursor. The pulse channels run out of divider at A-1 and the triangle an octave below that.

The noise channel has no pitch, only sixteen periods. A note picks one and the octave is ignored, so a run up the keyboard is a run through sixteen timbres that starts over every twelve keys.

Tempo is quantised. A row lasts a whole number of video frames at 60.0988 Hz and nothing finer, which is why the speed control is in frames and the BPM beside it is a readout rather than an input: speed 6 is 150.2 BPM, speed 7 is 128.8, and there is nothing in between.

The mix is not a sum. The console drives two resistor ladders that are deliberately non-linear, so two channels at half volume are louder than one at full. The measured curves are used here, along with the analog filters on the console's output — high-passes at 90 Hz and 440 Hz and a low-pass at 14 kHz — which are most of why NES audio sounds thinner than a bare square wave.

ColumnWhat it does
KeyAction
Z S X D C V G B H N J MThe octave shown in the Octave box, from C upwards.
Q 2 W 3 E R 5 T 6 Y 7 UOne octave above it. The rows carry on through , L . ; / and I 9 O 0 P.
Note off: stop whatever that channel is holding.
StepThe cursor drops by the step after a note and after nothing else, so a two-digit column can be typed in one place.
0–9, A–FDigits, in the instrument, volume and parameter columns. In the effect column, the letter of an effect; entering one moves across to its parameter.
SpacePlay, or stop if already playing.
EnterPlay from the row the cursor is on.
Arrows, TabMove the cursor. Tab moves a whole channel.
Page Up / Page DownSixteen rows at a time. Home and End go to the ends.
Delete, BackspaceClear the column under the cursor. Backspace steps up first.
[ and ]Drop or raise the entry octave.
Ctrl+Z, Ctrl+Shift+ZUndo and redo, fifty deep.

Note entry wants a physical keyboard. On a phone the pattern can be read and played but not usefully typed into, and the page says so here rather than pretending otherwise.