All docs

SFX Editor

Design sound effects (.vsfx) with ADSR envelope, pitch sweep, noise, and arpeggio — with live audio preview.

The SFX Editor opens when you create or double-click a .vsfx file. It provides a graphical interface for designing one-shot sound effects for the AY-3-8910 PSG, with a live Web Audio preview so you can hear the result instantly.

SFX Editor — envelope visualisation on the left, ADSR and pitch sliders on the right


Presets

Seven built-in presets give you a starting point:

PresetTypical use
LaserFast downward pitch sweep
ExplosionNoise burst with decay
Power-upRising arpeggio
HitShort sharp noise
JumpUpward pitch sweep
BlipShort beep
CoinTwo-tone chime

Click a preset to load it, then adjust the sliders to taste.


Envelope visualiser

The large graph on the left shows the amplitude envelope over time. The curve is colour-coded to match the preset category. A dashed white line overlaid shows the pitch sweep if enabled.


Controls

Basic

ControlRangeDescription
Duration20–2000 msTotal length of the sound effect.
Frequency55–1760 HzStarting pitch of the oscillator.
ChannelA / B / CWhich PSG tone channel plays this effect.
Peak Vol1–15Maximum amplitude at the peak of the envelope.

ADSR envelope

ControlRangeDescription
Attack0–500 msTime to ramp up from 0 to peak volume.
Decay0–500 msTime to fall from peak to sustain level.
Sustain0–15Volume level held after the decay phase.
Release0–1000 msTime to fade from sustain to 0 after the note ends.

ADSR sliders with the envelope shape visible in the visualiser

Pitch sweep

Enable the Pitch Sweep toggle to make the frequency change over the duration of the effect.

ControlDescription
Start multiplierFrequency at the start, as a multiple of the base frequency (0.1×–4×).
End multiplierFrequency at the end (0.1×–4×).

A downward sweep (start > end) sounds like a laser shot or falling object. An upward sweep sounds like a jump or power-up.

Noise mix

Enable Noise Mix to blend white noise into the effect — useful for explosions, hits, and static bursts.

ControlRangeDescription
Period0–31Noise pitch/colour. 0 = highest pitch noise.
Volume0–15Noise amplitude.
DecaymsHow quickly the noise fades out.

Arpeggio

Enable Arpeggio to rapidly cycle through multiple pitches, creating a chord effect.

ControlDescription
NotesUp to 3 semitone offsets added to the base frequency (0–24 semitones).
SpeedHow fast the arpeggio cycles, in milliseconds per step (10–200 ms).

Preview

Click Play in the header to hear the effect through the Web Audio API. The preview uses a square wave oscillator and matches the PSG output closely.


File format

{
  "version": "1.0",
  "name": "jump",
  "category": "jump",
  "duration": 200,
  "oscillator": { "frequency": 440, "channel": 0 },
  "envelope": { "attack": 5, "decay": 20, "sustain": 8, "release": 80, "peak": 12 },
  "pitch": { "enabled": true, "start_mult": 0.5, "end_mult": 2.0 },
  "noise": { "enabled": false, "period": 16, "volume": 8, "decay_ms": 100 },
  "modulation": { "arpeggio": false, "arpeggio_notes": [0, 7, 12], "arpeggio_speed": 40 }
}

In VPy code:

PLAY_SFX("jump")