Xenpaper is a text-based microtonal sequencer. That is, you can type text, whigh can play microtonal music. 

How it works
Create tunes by typing in the text area. Press play to hear what you've written.
Notes
Typing a number will create a note. Notes can be separated by spaces or commas.
e.g.

0 4 7 12

Notes can be held for longer with hyphens ---, and rests can be added with dots ....
e.g.

0.2.3...3-2-0--.

Spaces, new lines and bars | can be placed anywhere between notes. Bars can also be placed during a note.
e.g.

0 8 7-|0 8 7-|-5 4--

Notes can be written in many ways.
- as scale degrees starting from zero 0,2,4,
- as ratios 3/2,5/4,1/1,
- as cents 702c,
- as divisions of an octave 11\19,
- as divisions of an octave with a specific size (e.g. 3) 5\13o3
- as cycles per second 432Hz
e.g.

0 7 1/1 3/2 0c 702c
0\19 11\19 220Hz 330Hz

Notes can be shifted up or down octaves. ' shifts the following note up 1 octave, " shifts the following note up 2 octaves, and ` shifts the following note down an octave.
e.g.

0-3-'0-'3-"0-'"0-`0-``0-

Chords can be played by using [ and ] around a comma-separated pitches.
e.g.

[3,7]-[5,8]-[0,3,7]--.[1/1,6/5,3/2]--.

Chords can also be played using colon-notated ratios 4:5:6
e.g.

10:12:15---

Comments
Comments can be added using # at the start of a line
e.g.

# a 7th chord
[0,4,7,10]--..

# a harmonic 7th chord
4:5:6:7--..

Scales
The scale can be changed at any time. A scale is denoted by { and }. These dictate what pitches any subsequent scale degrees correspond to. The default is 12 equal divisons of the octave 12edo.
e.g.

[0,4,7]--- {31edo}[0,10,18]---

Equal division equave size can be changed by replacing the "o" with a number or fraction 13ed3.
e.g.

{13ed3}0 1 2 3 4

Scales can be comprised of individual pitches.
e.g.

{1/1 9/8 5/4 4/3 3/2 5/3 15/8}
0 1 2 3 4 5 6 7-

Scales comprised of individual pitches can also set their equave size using ' after the last pitch. Defaults to 2/1
e.g.

{1/1 5/4 4/3 3/2'}
0 1 2 3 4 5 6 7 8-

Scales can use colon-notated ratios
e.g.

{12:14:16:18:21}
0 1 2 3 4 5 6 7-

Harmonic series segments can be specified by using the :: symbol inside a colon-notated ratio scale. 4::7 is the same as 4:5:6:7.
e.g.

{4::7}
0 1 2 3 4-

Scales can also reference the scale degrees at the moment they are encountered. This can be useful for creating a subset of a scale.
e.g.

{19edo}{0 3 6 8 11 14 17}
0 1 2 3 4 5 6 7-

Modes can be set using {m and }.
e.g.

{12edo}{m2 1 2 2 1 2 2}
0 1 2 3 4 5 6 7-

All pitch values other than cycles-per-second are relative to a root note. This can be changed with {r...}. It can be given any pitch value to use as the new root. It defaults to {r440Hz}
e.g.

0 2 4-{r432Hz}0 2 4-

As each change to the root pitch is relative to the current root, multiple roots can be chained after each other
e.g.

4 0-{r2}4 0-{r2}4 0-

This can also be used to switch octaves for a time.
e.g.

4 0-{r'0}4 0-{r`0}4 0-

Setters
Setters are a type of statement that are used to set various parameters as a tune progresses, such as (bpm:100) or (osc:sine). A setter is denoted by ( and ), and can be placed anywhere between notes or on new lines. Multiple setters can be combined into a single statement using a semicolon (bpm:100; osc:sine)
Timing
Tempo can be changed using the tempo setter (bpm:...). Defaults to (bpm:120)
e.g.

(bpm:200)7 5 4 2 0...

Tempo can also be set using milliseconds per beat (bms:...).
e.g.

(bms:1000)3 2 0

Divisions of the beat can be set using the division setter (div:...). These can also be shortened to (...), like (4) or (1/4). Defaults to 2 divisions per beat (eighth notes) (div:2)
e.g.

0 2 3 7(3)0 2 3 7(4)0 2 3 7(1/2)0 2 3 7

Sound
The oscillator can be changed using the oscillator setter (osc:...). Defaults to (osc:triangle)
e.g.

(osc:sine)0 4 7.
(osc:sawtooth)0 4 7.
(osc:square)0 4 7.

Valid values are sine, sawtooth, square and triangle. Any of these can be optionally prefixed with fm, amor fat. Any of these can be suffixed with an integer from 1 to 32 to indicate the number of partials to use.
e.g.

(osc:fmsine)0 4 7.
(osc:fatsquare)0 4 7.
(osc:sawtooth5)0 4 7.

The envelope can be changed using the envelope setter (env:...). This accepts 4 digits corresponding to attack, decay, sustain and release, where 0 is fast / small, and 9 is slow / big. Defaults to (env:2856)
e.g.

(env:0158)0-.....
(env:6860)0---...

All oscillator and envelope options are made possible by tonejs.
Ruler
The Ruler button displays a pitch ruler. Played notes will appear on it. Click and drag to pan, use the mouse wheel to zoom. Touch devices are not yet supported.
The current scale can be plotted by calling (plot). Calling it multiple times will render multiple scales. To see this demo, you must click Ruler after you click Demo.
e.g.

(plot){19edo}(plot)

Can you give me an example of a compositon for Xenpaper?