# Transient shaper

> Boosts or softens the attack and sustain of each hit, independent of level, with a floor, mix and output trim.

Source: https://docs.tune.toys/nodes/std.transient/

A transient shaper changes the shape of each hit rather than its level: more snap or less, a longer ring or a tighter one.

## What it does

Each channel keeps a level that holds every peak for 10 ms, so tones above 50 Hz read as steady, and two followers of it. One rises slowly and falls instantly, so it lags only while a hit grows: that gap is the hit's attack. The other rises instantly and falls slowly, so it stays above only while a hit decays: that gap is its sustain. Attack and Sustain set the gain, in decibels, applied in proportion to each gap, reaching their full value when a gap is 12 dB. The gain follows the shape of the sound, not its loudness, so soft and loud hits change alike, and a held tone with no onset or decay passes unchanged.

The fast follower attacks in 1 ms and releases in 20 ms; Speed multiplies those times for the slow side. Below Floor the shaping fades out over 6 dB, so quiet noise between hits is not boosted. Mix blends the shaped signal with the dry one, and Output trims the result. With Attack and Sustain at zero the node passes audio bit for bit.

## When to use it

Use it to add punch to drums or plucks, to soften harsh attacks, to bring out a room's ring or to dry it up, all without setting a threshold. To control level instead of shape, use the [Compressor](https://docs.tune.toys/nodes/std.compressor/); to silence the gaps, use the [Gate](https://docs.tune.toys/nodes/std.gate/).

## Ports

<!-- ports:start -->

| Port    | Direction | Signal | Lanes                   |
| ------- | --------- | ------ | ----------------------- |
| `audio` | Input     | Audio  | Inferred from the cable |
| `audio` | Output    | Audio  | Inferred from the cable |

<!-- ports:end -->

## Parameters

<!-- parameters:start -->

| Parameter | Label   | Range     | Default | Unit | Scale  | Notes                                                                                           |
| --------- | ------- | --------- | ------- | ---- | ------ | ----------------------------------------------------------------------------------------------- |
| `attack`  | Attack  | -24 to 24 | 0       | dB   | linear | Gain on onsets: positive adds punch, negative softens hits.                                     |
| `sustain` | Sustain | -24 to 24 | 0       | dB   | linear | Gain on decays: positive brings out tails and room, negative tightens them.                     |
| `speed`   | Speed   | 2 to 20   | 8       | ×    | log    | Ratio of the slow to the fast follower times; higher treats longer spans as attack and sustain. |
| `floor`   | Floor   | -80 to 0  | -60     | dBFS | linear | Below this level shaping fades out, so quiet noise is not boosted.                              |
| `mix`     | Mix     | 0 to 1    | 1       |      | linear | Dry/shaped blend.                                                                               |
| `output`  | Output  | -24 to 24 | 0       | dB   | linear | Gain after shaping.                                                                             |

<!-- parameters:end -->

### Attack (`attack`)

Gain on onsets, from −24 to 24 dB. Positive values add snap; negative values soften hits.

### Sustain (`sustain`)

Gain on decays, from −24 to 24 dB. Positive values bring out tails and room; negative values tighten them.

### Speed (`speed`)

The ratio, from 2 to 20, between the slow and fast follower times. Higher values treat a longer stretch of each onset as attack and of each decay as sustain.

### Floor (`floor`)

The level, from −80 to 0 dBFS, below which shaping fades out.

### Mix (`mix`)

Blend of the dry signal (0) and the shaped signal (1).

### Output (`output`)

Gain after shaping, from −24 to 24 dB.

## Tips

- Boosting Attack raises peaks: lower Output or follow with a [Limiter](https://docs.tune.toys/nodes/std.limiter/).
- A negative Sustain is a quick way to dry up a boomy drum.
- Raise Floor when a Sustain boost lifts the noise between hits.

## See also

[Compressor](https://docs.tune.toys/nodes/std.compressor/), [Gate](https://docs.tune.toys/nodes/std.gate/), [Envelope](https://docs.tune.toys/nodes/std.envelope/).
