# Instruments

An **instrument** turns notes into sound. Every instrument track has one; pick and adjust it in the inspector on the right. Flesance has three kinds: a synth that builds sound from simple waves, drums built the same way, and sampled instruments made of recordings of real ones. Instruments made by other companies are chosen the same way; see [Plugins](/manual/plugins).

![The inspector showing a synth](/manual/images/inspector.png)

The **Instrument** row at the top of the inspector names the instrument of the selected track. Click it to open the list: the synth sounds first (Warm Bass, Sub Bass, Pluck, Electric Keys, Soft Pad, Bright Lead, Brass Stab, Glass Bell), then the recorded instruments in groups (Keys, Strings, Winds and brass, Mallets, Plucked, Drums and percussion, where **Synth Drums** is listed too), then any plugin instruments. Each entry has a line saying what it sounds like. Choosing another instrument keeps the track's notes and is one step to undo.

Every knob works the same way:

- **Drag** it up and down; hold <KeyCaps combo="shift" /> for fine steps. <KeyCaps combo="Esc" /> during the drag puts it back.
- **Double-click** it to type an exact value, then <KeyCaps combo="Enter" />.
- <KeyCaps combo="primary" />-click resets it. A synth that started from a preset (Warm Bass, Soft Pad and the others in the instrument list) resets to that preset's value, so you can explore freely and always find the way back to the sound you chose.
- With the knob focused (click it or reach it with <KeyCaps combo="Tab" />), the arrow keys step it, <KeyCaps combo="Page Up" /> and <KeyCaps combo="Page Down" /> take bigger steps, and <KeyCaps combo="Home" /> and <KeyCaps combo="End" /> go to the ends.

Changes are heard immediately, even while the song plays. Right-click a knob to see when it was last changed and the values it had before, and to go back to one of them. **Alt**-click a knob to give it a curve that changes over the song; see [Automation](/manual/automation).

## Synth {#synth}

A **synthesizer** makes sound from scratch: it starts from a bright, simple wave and shapes it. This one is *subtractive*: it begins with a sound rich in overtones and removes what you do not want with a filter. It is how most classic basses, leads and pads are made.

The path of the sound is: two **oscillators** make the wave, a **filter** darkens it, and an **envelope** shapes its loudness over time.

## Waveform {#waveform}

The **Shape** selector chooses the oscillator's wave, which decides the basic colour of the sound:

- **Saw**: bright and buzzy, full of overtones. The usual start for basses, strings and leads.
- **Square**: hollow and woody, like a clarinet or an old video game.
- **Triangle**: soft, with a few quiet overtones. Flute-like.
- **Sine**: a pure tone with no overtones at all. Round and deep; used for sub basses.

<AudioSet title="Waveforms" hint="The filter is fully open here, so you hear the waves as they are. Levels are matched." :examples="[['waveform-saw', 'Saw'], ['waveform-square', 'Square'], ['waveform-triangle', 'Triangle'], ['waveform-sine', 'Sine']]" />

## Cutoff {#cutoff}

The filter lets low frequencies through and removes the ones above the **cutoff** frequency, in hertz (Hz); the knob goes from 20 Hz to 18 kHz. Low cutoff: dark, muffled, like music through a wall. High cutoff: bright and open. Turning the cutoff while a note plays is one of the most recognisable sounds of electronic music.

<AudioSet title="Cutoff" hint="Levels are matched, so the difference you hear is brightness, not loudness." :examples="[['cutoff-300', '300 Hz'], ['cutoff-1500', '1.5 kHz'], ['cutoff-6000', '6 kHz'], ['cutoff-sweep', 'Sweep from 150 Hz to 12 kHz']]" />

## Resonance {#resonance}

**Resonance** boosts the frequencies right at the cutoff. A little adds bite; a lot adds a whistling, vocal peak that follows the cutoff as it moves.

<AudioSet title="Resonance at 900 Hz" :examples="[['resonance-low', 'None'], ['resonance-high', 'High']]" />

## Filter envelope {#filter-envelope}

The filter envelope, the **Envelope** knob, opens the filter at the start of each note and lets it close again, by the number of octaves you set (up to 6 on the knob). It gives each note a bright "pluck" that fades, instead of the same brightness all the way through. It follows the same decay as the amplitude envelope.

<AudioSet title="Filter envelope" :examples="[['filter-envelope-off', 'Off'], ['filter-envelope-on', '3.5 octaves']]" />

## Attack {#attack}

The next four controls, **attack, decay, sustain and release** (together called **ADSR**), shape how a note's loudness changes over time, from the moment a key goes down to after it comes up.

**Attack** is how long the note takes to reach full volume. Short: it starts instantly, like a pluck or a piano. Long: it fades in, like strings or a pad.

<AudioSet title="Attack" :examples="[['attack-short', '5 ms'], ['attack-long', '350 ms']]" />

## Decay {#decay}

**Decay** is how long the note then takes to fall from its peak to the sustain level.

## Sustain {#sustain}

**Sustain** is the level the note stays at while the key is held, as a fraction of full volume. At 100 % the note holds steady; at a low level it fades after the attack, like a plucked string.

<AudioSet title="Decay and sustain" :examples="[['decay-sustain-high', 'Sustain 100 %'], ['decay-sustain-low', 'Sustain 15 %, decay 300 ms']]" />

## Release {#release}

**Release** is how long the note takes to fade out after the key comes up. Short: notes stop dead. Long: they ring on and blur into each other.

<AudioSet title="Release" :examples="[['release-short', '50 ms'], ['release-long', '1.2 s']]" />

## Detune {#detune}

The synth has two oscillators, and **detune** tunes them slightly apart, in cents (hundredths of a semitone). The two waves drift in and out of step, which makes the sound wider and livelier, like two players on the same part. A few cents is subtle; fifteen is lush; much more sounds out of tune. The knob goes up to 50 cents.

<AudioSet title="Detune" :examples="[['detune-zero', '0 cents'], ['detune-fifteen', '15 cents']]" />

## Drums {#drums}

The drum instrument is a synthesized kit, **Synth Drums** in the instrument list. Each key of a keyboard plays one drum, following the General MIDI standard that most drum software uses; the inspector lists the same keys:

| Key | Pitch | Drum |
|---|---|---|
| C2 | 36 | Kick |
| D2 | 38 | Snare |
| D♯2 | 39 | Clap |
| F♯2 | 42 | Closed hi-hat |
| A♯2 | 46 | Open hi-hat |

A closed hi-hat cuts off an open one, as on a real kit where closing the pedal stops the cymbals ringing. In the [note editor](/manual/note-editor) a drum track opens as a grid of pads, one row for each drum.

<AudioSet title="The kit" :examples="[['drums-kit', 'Kick, snare, clap, closed and open hat'], ['drums-beat', 'A simple beat']]" />

Two knobs shape the whole kit: **Decay**, how long the drums ring, and **Tone**, how dark or bright the snare, clap and hats are.

<AudioSet title="Drum decay and tone" :examples="[['drums-decay-short', 'Decay short'], ['drums-decay-long', 'Decay long'], ['drums-tone-dark', 'Tone dark'], ['drums-tone-bright', 'Tone bright']]" />

## Sampled instruments {#sampled}

A **sampled instrument** is made of recordings of a real instrument: every few keys, at several strengths. When you play a note, it picks the recording closest to that key and to how hard you played, and adjusts it to the exact pitch. That is why a sampled piano changes character between soft and hard notes, not just volume: it really is a different recording of a softer strike.

Sampled instruments are large (the grand piano is about 50 MB), so their recordings are not part of the app. They download once, the first time a track plays one, and are kept on your computer, shared by every project. The [status bar](/manual/getting-started#status-bar) shows **Downloading** with the progress, and the download can be cancelled there; the instrument is then fetched again the next time a track asks for it. Each download is checked against the library's list before it is used, and a damaged one is refused. After the download the recordings load, which the status bar shows as **Loading**: the instrument can be played within a second or two, and the softer and louder recordings arrive a little later.

From then on the instrument plays without a connection. Only an instrument that has never been on this computer needs one. If the library cannot be reached, the inspector says so, the status bar says **Instrument library offline**, the track stays silent until its instrument has arrived, and the rest of the song plays. The app keeps trying by itself. **Storage** in the settings shows how much room the downloaded instruments take; the app never clears them. The inspector shows where the recordings come from and under which licence (click the licence to read it); they are free to use in your music.

Export waits for instruments: while one is still loading, the export is refused with a message, and an instrument that is not on this computer is left out of the file, which the message says.

Some instruments reproduce more than notes. The grand piano, for example, has dampers that stop a string when you let go of a key (except in the top octaves, which have none, as on a real piano), the soft thump of the hammer returning, and the sustain pedal with its own mechanical noise. Play it with [musical typing](/manual/note-editor#musical-typing) or a [MIDI keyboard](/manual/note-editor#midi) to feel the difference.

The recorded **Acoustic Drums** behave like a real kit in the same way the synthesized one does: the hi-hat is one instrument, so a closed hit (F♯2) or the pedal (G♯2) stops an open hat (A♯2) still ringing, quickly and without a click, and an open hit stops a closed one. Other cymbals ring on over anything. Drummers call this **choking** the hat.

Instruments differ most in what happens when you let go of a key: a piano's dampers, a violin that fades, a marimba that rings on, a drum that always plays to the end. The [library article](/manual/library#how-notes-end) lists every instrument by how its notes end, and marks the recommended ones.

The whole collection, with sound previews and licences, is listed in the [instrument library](/library). Every instrument in it is already in the instrument list of the app.
