eo-typewriterjs / TAudioChannelOptions
Type Alias: TAudioChannelOptions
ts
type TAudioChannelOptions = object;Defined in: core/audio/types/audio-channel-options.type.ts:9
Description
Configuration for a single audio channel (typing, delete or move)
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
sfx? | readonly | string | Description Name of the default sfx to use from the sfx pack. When neither sfx nor sfxs is set, samples are drawn from every sfx in the pack. | core/audio/types/audio-channel-options.type.ts:15 |
sfxs? | readonly | readonly string[] | Description Restrict sample selection to this subset of sfx names. When set, only the listed sfxs are eligible for this channel. Overrides sfx when both are present. | core/audio/types/audio-channel-options.type.ts:23 |
strategy? | readonly | TAudioStrategy | Description Sample selection strategy. Defaults to "shuffleBag" for natural variance without repetitive streaks. | core/audio/types/audio-channel-options.type.ts:30 |
avoidImmediateRepeat? | readonly | boolean | Description When true, the manager will never play the same sample twice in a row. Only meaningful for the "random" strategy; shuffle-bag already handles this structurally. Defaults to true. | core/audio/types/audio-channel-options.type.ts:38 |
playbackRateJitter? | readonly | object | Description Playback-rate jitter applied to each sample. The rate also shifts the pitch. Both min and max must be positive. Example: { min: 0.9, max: 1.1 }. Defaults to a channel-specific range: around 1 for typing, lower for delete, higher for move. | core/audio/types/audio-channel-options.type.ts:47 |
playbackRateJitter.min | readonly | number | - | core/audio/types/audio-channel-options.type.ts:48 |
playbackRateJitter.max | readonly | number | - | core/audio/types/audio-channel-options.type.ts:49 |
volumeJitter? | readonly | object | Description Per-play volume factor relative to the resolved channel volume. Range [0, 1] for both min and max. Example: { min: 0.8, max: 1.0 }. Defaults to a channel-specific range; moves are quieter than typing. | core/audio/types/audio-channel-options.type.ts:58 |
volumeJitter.min | readonly | number | - | core/audio/types/audio-channel-options.type.ts:59 |
volumeJitter.max | readonly | number | - | core/audio/types/audio-channel-options.type.ts:60 |
overlap? | readonly | boolean | Description When true, a new audio element is cloned for every play call so rapid typing does not cut off the previous sound. When false, the previous sound is interrupted. Defaults to true. | core/audio/types/audio-channel-options.type.ts:70 |