This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

SFXR Profiles

The .sfxrprofile asset — procedural chiptone sound effects as first-class assets, with sfxr.me import and randomized profile pools.

Base — ships in GS_Audio.

.sfxrprofile assets are procedural sound effects built on the DrPetter sfxr model — the classic generator behind coin pickups, laser shots, jumps and explosions. Each profile is a complete sound described entirely by parameters, so it takes no audio files and no disk space worth measuring.

For usage guides and setup examples, see The Basics: GS_Audio.

 

Contents


The Model

One .sfxrprofile is one sound, stored as an explicit parameter set.

There is deliberately no preset enum and no preset-plus-seed mode. The canonical sfxr presets were baked out into asset files instead of kept as a runtime option, so every sound in a project is inspectable and editable the same way — including the ones that came with the gem.

SfxrParamSet carries 24 parameters: the wave type plus 23 floats covering envelope, frequency, vibrato, arpeggio, duty cycle, retrigger, phaser, filters and volume.

Wave typeValue
Square0
Saw1
Sine2
Noise3

The field layout matches the sfxr.me / jsfxr Serialize JSON field for field, which is what makes the import below a straight paste.

Three sfxr parameters are not stored — master volume, vibrato delay, and the filter enable flag — because jsfxr does not export them. The runtime supplies sfxr’s defaults for all three.


Importing from sfxr.me

The asset carries an Import from sfxr.me group with a multi-line paste field.

  1. Design your sound at sfxr.me or any jsfxr-based tool.
  2. Press Serialize and copy the JSON.
  3. Paste it into the import field on the profile asset.
  4. The parameters populate on change. Save the asset.

This is the recommended authoring loop: the browser tool has instant preview and randomize/mutate buttons, and the result lands in your project in one paste.

Three things to know:

  • If the pasted JSON reports oldParams: false, a warning is emitted. Sfxr.me emits true, which is what the framework’s parameter model matches.
  • The inspector may need a reselect to repaint after a paste. The values are imported correctly — this is a display refresh issue, not an import failure.
  • Wave Type is authored as a spin box over 0-3 rather than a named dropdown, because the underlying field is a plain integer.

Profile Pools

Profiles are consumed as pools, not one at a time. Both consumers hold a vector of profile assets and pick one at random per fire:

ConsumerGemNotes
GS_AudioEvent_SfxrBaseFires through a pooled voice with a per-voice random number generator.
Aud_SfxrNodeProThe Audio Event Graph node form, using the node’s own generator.

An empty pool is silent — the event reports that it has no content. A single profile is just a pool of one.

The authoring idiom this enables is the point of the whole system: generate five mutated explosions and drop them all in one pool, and the explosion never sounds identical twice. Mutation is a single button in sfxr.me, so building the pool costs about a minute.


Shipped Profiles

GS_Audio ships 27 profiles in Assets/SFXR Profiles/:

  • 7 canonical presets — Coin, Laser, Explosion, Powerup, Hurt, Jump, Blip.
  • 20 named custom profiles.

These are free-tier gem content. A new project has working sound effects before it has any audio assets of its own.


See Also

For related systems:

For conceptual overviews and usage guides:


Get GS_Audio

GS_Audio — Explore this gem on the product page and add it to your project.