# Tessella · Beginner's Guide & Interactive Lessons

Welcome to **Tessella**, a 4-track generative virtual synthesizer and sound design lab running right in your web browser. 

Tessella is inspired by the art of mosaics: instead of manually playing every note on a traditional piano keyboard, you configure **4 interlocking musical layers** (called *tracks* or *tessellae*). Each track runs an algorithmic pattern generator that listens, evolves, and harmonizes with the others, creating generative ambient textures, polyrhythmic grooves, and cinematic soundscapes.

---

## 🌟 The 5-Minute Quickstart (First Sound in 10 Seconds)

1. Open the **Tessella Virtual Synthesizer** (the Studio, `/sim/`) in your browser: Chrome, Edge or Firefox.
2. Click the big **SWITCH ON** button in the center of the virtual screen. *(Browsers require a user click before starting audio).*
3. Scroll down to the **Preset & Demo Library** and click **▶ Audition** on **STILL TIDE** or **KOTO GARDEN**.
4. Look up at the **Visualizer**: you will see the waveforms oscillating in real-time alongside stereo VU meters.
5. Hit **SPACE** or click the **PLAY** button on the virtual panel to pause/resume playback whenever you want!

---

## 🧭 The Core Anatomy of Tessella

The virtual panel is divided into four main functional areas:

```
┌─────────────────────────────────────────────────────────────────┐
│                         TESSELLA PANEL                          │
├───────────────────┬─────────────────────────┬───────────────────┤
│   LEFT ENCODERS   │       OLED SCREEN       │  RIGHT ENCODERS   │
│ [MASTER] [SELECT] │  [ 240 x 240 Display ]  │  [KNOB1] [KNOB2]  │
│ [ALGO]  [PRESETS] │  Shows current page &   │  [KNOB3] [KNOB4]  │
│                   │  encoder parameter tags │                   │
├───────────────────┴─────────────────────────┴───────────────────┤
│ NAVIGATION BUTTONS:                                             │
│  [FX]  [SCL] [ENV] [LFO] [EDIT] [GLO]   (Top row: Timbre / Sys) │
│  [HOME][SAVE][ARP] [SEQ] [PLAY] [REC]   (Bottom row: Sequence)  │
├─────────────────────────────────────────────────────────────────┤
│ VIRTUAL KEYBED:                                                 │
│  [OCT-] [OCT+]  |  27 Virtual Keys (F3-G5)  |  Keys: Z-/ & Q-O  │
└─────────────────────────────────────────────────────────────────┘
```

---

## 📚 Guided Lessons: From Novice to Sound Sculptor

### Lesson 1: Navigating the 4 Tracks

Tessella has **4 independent tracks** running in parallel:
- **Track 1 (T1)**: Often assigned to chords, pads, or lead drone.
- **Track 2 (T2)**: Often counter-melody or arpeggios.
- **Track 3 (T3)**: Plucked acoustic instruments, bells, or bass.
- **Track 4 (T4)**: Percussion / drums or rhythmic pulse.

> **How to switch tracks**:
> Turn the **ALGORITHM** knob (or press the **Left / Right arrow keys** $\leftarrow$ $\rightarrow$ on your keyboard).
> Notice how the header on the OLED screen changes to `T1`, `T2`, `T3`, or `T4`. Any adjustments you make to knobs 1–4 now affect only that selected track!

---

### Lesson 2: The Generative Pattern Engines

When you press **SEQ** (or key `0`), the OLED screen opens the **GEN (Generator)** page. 
Turn **KNOB 1 (MODE)** to choose how the track creates its notes:

| Engine Mode | What It Does in Plain English | Best Knobs to Turn |
|---|---|---|
| **STEP** | Classic 16-step sequencer. You set every note deliberately. | Turn KNOB 2 (LENGTH) to change loop length. |
| **TURING** | Looping shift register. Plays a catchy melody that subtly mutates over time. | **PROB** (KNOB 2): At `0%` it locks the melody forever; at `50%` it slowly drifts; at `100%` it's pure randomness. |
| **EUCLID** | Mathematical spacing. Spreads hits as evenly as possible over the bar (used in world music & techno). | **PULSE** (KNOB 2): Number of hits; **ROT** (KNOB 3): Shifts pattern rotation. |
| **MARKOV** | Probability wanderer. A melody that drifts organically based on weighted musical intervals. | **LEAP** (KNOB 2): Small steps vs. big jumps; **DENS** (KNOB 3): Note density. |
| **CHORD** | Generates lush polyphonic chord progressions and swells. | **PROG** (KNOB 2): Chord sequence; **BREATH** (KNOB 3): Swell intensity. |
| **MORPH** | Smoothly morphs between two distinct rhythm snapshots (Snapshot A & B). | **POS** (KNOB 2): `0` is Rhythm A, `127` is Rhythm B. |

---

### Lesson 3: The Magic of "EVOLVE" (Music that Never Repeats)

Static loops can become boring quickly. Tessella solves this with the **EVOLVE** engine:

1. Press **SEQ** (`0`).
2. Turn **SELECT** (or press the **Down arrow key** $\downarrow$) until the screen reads **EVOLVE**.
3. Now look at Knobs 1 to 3:
   * **EVERY (KNOB 1)**: How many bars should pass between automatic musical mutations (e.g. `2 BARS`, `4 BARS`, `8 BARS`).
   * **AMOUNT (KNOB 2)**: How radical the mutation is (`10%` subtle, `80%` wild).
   * **ROLL (KNOB 3)**: Spin this knob to trigger an immediate musical mutation on demand!

---

### Lesson 4: Musical Harmony & Scales (No Wrong Notes)

Worried about playing out of key? Tessella has a built-in scale quantizer:

1. Press **SCL** (or key `2`).
2. The screen shows the **SCALE** page:
   * **ROOT (KNOB 1)**: The key center (`C`, `D`, `F#`, etc.).
   * **SCALE (KNOB 2)**: Over 70 musical scales! Try:
     * `MAJ` (Major) — bright, uplifting.
     * `MIN` (Minor) — contemplative, cinematic.
     * `PEN` (Pentatonic) — impossible to hit a bad note.
     * `HIRA` or `KUMOI` — traditional Japanese instruments.
     * `DOR` (Dorian) — jazzy, retro synthwave.
3. Every generative note and keypress immediately conforms to your chosen scale.

---

### Lesson 5: Shaping Timbre & Studio Effects

1. Press **FX** (or key `1`) to open the master effect chain:
   * **FILTER**: Cutoff frequency and resonance (warm analog sweep).
   * **DELAY / ECHO**: Stereo tape echo with tempo sync.
   * **REVERB**: Huge ambient space processor for creating massive cathedral tails.
2. Press **ENV** (or key `3`) to shape note Attack, Decay, Sustain, and Release:
   * Increase **ATTACK** for blooming pads.
   * Decrease **DECAY** for snappy plucks and percussion.

---

### Lesson 6: Capturing Your Performance to Lossless WAV

When you hear a generative groove or evolving ambient passage you love:
1. Click the **● Record to WAV** button above the visualizer.
2. The button illuminates red, and a live counter displays recording duration (e.g., `REC 01:24.5`).
3. Tweak knobs, switch scales, and let the generative music flow.
4. Click **■ Stop & Export WAV**.
5. A high-fidelity, uncompressed 16-bit 44.1 kHz stereo `.wav` file downloads immediately to your computer, and an instant preview audio player appears on screen.

---

## 🎛️ Keyboard & Computer Controls Reference

| Computer Key | Virtual Panel Control | What It Does |
|---|---|---|
| `Spacebar` / `-` | **PLAY** | Starts / stops generative playback |
| `1` | **FX** | Master effects (Filter, Delay, Reverb) |
| `2` | **SCL** | Musical scale & key quantizer |
| `3` | **ENV** | Amplitude envelope (Attack, Decay, Sustain) |
| `4` | **LFO** | Low-frequency modulation oscillators |
| `7` | **HOME** | Main home dashboard & oscilloscope |
| `8` | **SAVE** | Project save, new song, project load |
| `9` | **ARP** | Arpeggiator configuration |
| `0` | **SEQ** | Sequence generator mode (Turing, Euclid, etc.) |
| `[` and `]` | **OCT- / OCT+** | Shift keyboard octave down or up |
| `←` and `→` | **ALGORITHM** | Switch between Track 1, 2, 3, and 4 |
| `↑` and `↓` | **SELECT** | Scroll between sub-pages on screen |
| `Z` through `/` | **Lower White Keys** | Play notes manually (bottom row) |
| `Q` through `O` | **Upper Black/White Keys** | Play notes manually (top row) |
| `Shift + Click` | **Latch Button** | Holds down any virtual panel button |

---

## 💡 3 Beginner Recipes to Try Right Now

### Recipe A: The Infinite Cyberpunk Rain Drone
1. In the **Preset Library**, audition **STILL TIDE**.
2. Press `←` until you select **T1**.
3. Press `0` (**SEQ**) $\rightarrow$ turn **KNOB 2 (PROG)** to `DRONE`.
4. Press `1` (**FX**) $\rightarrow$ turn **KNOB 3 (REVERB)** up to `85%`.
5. Sit back and watch the green/cyan oscilloscope bloom across your screen.

### Recipe B: Polyrhythmic Math Techno
1. In the **Preset Library**, audition **LOW HARBOUR**.
2. Select **T4** (Drums).
3. Press `0` (**SEQ**) $\rightarrow$ turn **KNOB 1 (MODE)** to `EUCLID`.
4. Turn **KNOB 2 (PULSE)** to `5` and **KNOB 3 (STEPS)** to `16`.
5. Select **T3** (Bass) and set its **PULSE** to `7`. You now have a 5-against-7 polyrhythm!

### Recipe C: Zen Garden Meditation
1. In the **Preset Library**, audition **KOTO GARDEN**.
2. Press `2` (**SCL**) $\rightarrow$ verify scale is set to `HIRA` with Root `D`.
3. Select **T2** $\rightarrow$ press `0` (**SEQ**) $\rightarrow$ turn **KNOB 1** to `MARKOV`.
4. Turn **KNOB 3 (DENS)** down to `40%` for spacious, contemplative flute phrases.
