UniPack

keySound

The keySound file maps sound files to each button. Write one mapping per line, separated by spaces.

Syntax

chain  x  y  soundFile  [loop]  [wormhole]
FieldTypeRequiredDescription
chainintOChain number (1 ~ chain)
xintOButton X coordinate (1 ~ buttonX)
yintOButton Y coordinate (1 ~ buttonY)
soundFilestringOFile path within sounds/ folder
loopintLoop setting (see below)
wormholeintChain number to jump to after playback

Loop Values

The loop value is internally stored with 1 subtracted.

Written ValueBehavior
Omitted or 1Play once (default)
0Loop indefinitely
N (2 or more)Repeat N-1 times

Example

1 1 1 kick.wav
1 2 1 snare.wav
1 3 1 hihat.wav 0
2 1 1 bass.wav 1 3
  • 1 3 1 hihat.wav 0 — Chain 1, position (3,1), loop hihat.wav indefinitely
  • 2 1 1 bass.wav 1 3 — Chain 2, position (1,1), play bass.wav once then jump to chain 3

Circular Queue (Multi-mapping)

When multiple sounds are mapped to the same chain x y coordinate, they cycle in order each time the button is pressed.

1 1 1 sound_a.wav
1 1 1 sound_b.wav
1 1 1 sound_c.wav

Each press of button (1,1): sound_a → sound_b → sound_c → sound_a → ...

Validation

  • Empty lines and lines with fewer than 3 columns are ignored.
  • Lines with out-of-range coordinates are skipped with a warning.
  • A warning is logged if the referenced sound file is not found in the sounds/ folder.