# AY-3-8910 instrument editor

the AY-3-8910 instrument editor consists of three tabs.

## Sample

for sample settings, see [the Sample instrument editor](sample.md).

the only differences are the lack of an "Use wavetable" option, and the presence of a "Use sample" one.

note that using samples on AY is CPU expensive!

## Timer Macros
- **Timer FX**: timer effect type sequence. 0- off, 1- tone PWM, 2- envelope distortion, 3- reserved
- **TFX Offset**: PWM speed sequence.
- **Timer Num and Den**: multiplier of a virtual square wave modulator (?)
- **PWM Boundary**: sets the range of a pulse width modulation

note that timer effects might not be supported by VGM players, and are rather CPU expensive!
## Macros

- **Volume**: volume sequence.
- **Arpeggio**: pitch sequence.
- **Noise Freq**: noise generator frequency sequence.
  - note: global!
- **Waveform**: selector of sound type - square wave tone, noise and/or envelope generator.
  - you may select more than one option.
- **Pitch**: fine pitch.
- **Phase Reset**: trigger restart of **envelope**.
- **Envelope**: configures the hardware envelope.
  - **enable**: sets whether envelope is enabled.
  - **direction**: flips the envelope's direction.
  - **alternate**: when enabled, the envelope will change direction once it hits a boundary.
  - **hold**: sets whether the envelope should stop when hitting boundary, or loop.
- **AutoEnv Num**: sets the envelope to the channel's frequency multiplied by numerator.
- **AutoEnv Den**: sets the envelope to the channel's frequency multiplied by denominator.
  - these two must be set in order for AutoEnv to work!
- **Force Period**: sets the tone period (wavelength).
  - overrides Arpeggio and Pitch macros.
- **Env Period**: sets the envelope period.
  - ignored if both AutoEnv macros are set.
