Library file format

<- back to doc root

library.json

An exported Audio Forge library is a ZIP archive containing a library.json descriptor and its audio files. The current machine-readable schema is:

Audio Forge library schema v1

JSON integers and decimals are both valid for fields with the number type. For example, "ambianceDuckingPercent": 0 and "ambianceDuckingPercent": 0.0 are equivalent.

The descriptor contains exactly one top-level property. Its name is the library’s display name. The library may contain Music, Ambiance, and the legacy Sound section. Each section maps category names to category objects.

{
  "My Library": {
    "Music": {
      "Battle": {
        "name": "Battle",
        "packName": "user",
        "enabled": true,
        "oneShot": false,
        "iconType": "fontIcon",
        "targetVolume": 1.0
      }
    },
    "Ambiance": {
      "Thunder": {
        "name": "Thunder",
        "packName": "user",
        "enabled": true,
        "oneShot": true,
        "ambianceDuckingPercent": 0
      }
    }
  }
}

Only name is required in a category object. Omitted optional fields use the defaults shown below. A field marked nullable may also be set to null.

FieldJSON typeDefault or meaning
namestringRequired category display name
packNamestring or nullEmpty string
packIdstring or nullNo associated pack
iconinteger or nullMaterial folder icon code point
iconFamilystring or nullMaterialIcons
iconPackagestring or nullNo icon package
iconRefobject or nullRegistry reference with pack, name, and optional integer version
colorinteger or nullARGB color integer; grey when omitted
isDefaultboolean or nullfalse
singleLoopboolean or nullfalse
oneShotboolean or nullfalse; use true for an Echo category
singlePlayTransitionTostring or nullEmpty string
singlePlayTransitionMsinteger or nullTimer duration in milliseconds
singlePlayTransitionTrackCountinteger or null1
singlePlayStopPlaybackboolean or nullfalse
timerEnabledboolean or nullfalse
enabledboolean or nulltrue
indexinteger or null-1
keystring or nullNo marketplace category key
minPauseinteger or nullMinimum pause in milliseconds; 0
maxPauseinteger or nullMaximum pause in milliseconds; 0
crossfadeDurationnumber or nullSeconds; 0. Negative values overlap tracks
transitionsEnabledboolean or nullfalse
nameIntlobject or nullLocale-to-name string map
versioninteger or nullCategory data version
initialVolumenumber or nullInitial internal gain; no override when omitted
targetVolumenumber or nullTarget internal gain; no override when omitted
initialTransitioninteger or nullInitial transition in milliseconds
initialPlaybackSpeednumber or nullPlayback speed multiplier
ambianceDuckingPercentnumber or nullMusic ducking percentage from 0 to 100
iconTypestring or nullfontIcon or customIcon; defaults to fontIcon
customIconPathstring or nullPath of the custom icon inside the library

Category volume fields in library.json use Audio Forge’s internal gain range, where 1.0 is unity and 2.0 is the boosted maximum. This differs from the Local API’s normalized 0.0 to 1.0 display scale.

Archive paths

Audio files use the category names from library.json:

library.json
Music/Battle/battle-theme.ogg
Ambiance/Thunder/thunder.ogg

Custom icon files exported by Audio Forge are stored under user_icons/. Optional transition metadata is stored in transitions/transitions.json, and optional saved states are stored in saved_states.json.

Audio Forge validates the complete descriptor before modifying a library. An invalid field produces an error containing its library, section, category, and field path.