Jingles

Jingles are short audio clips that play when you hover over a game on your grid. Think of the 3DS home menu or the PS Vita, where each game has its own little sound. Cocoon’s jingle system works the same way, with options for per-game clips, per-platform fallbacks, and a global default.

Getting Started

Head to Settings > Library & Data > Jingles to set everything up. This is where you manage your jingle repositories, tweak playback settings, and set your fallback jingles.

If you just want something playing for every game without fussing over individual assignments, set a Global Default jingle and you’re done. Every game that doesn’t have its own jingle will use that one.

How Jingles Play

When you land on a game tile, Cocoon waits about 600ms before playing anything. This prevents jingles from firing while you’re scrolling through your library quickly.

Once the delay passes, Cocoon looks for a jingle in this order:

  1. Per-game jingle - set specifically for that game.
  2. Per-platform default - a fallback for all games on that platform (e.g. all GBA games play the same clip).
  3. Global default - the catch-all fallback for anything without the above.

If nothing is set at any level, no jingle plays. Background music ducks automatically while a jingle is playing, then fades back in when it finishes.

Jingle Repositories

Repositories are GitHub repos that host collections of jingles organized by platform and game. Instead of tracking down audio files yourself, you can add a community repo and pull jingles from it directly.

Adding a Repository

  1. Go to Settings > Library & Data > Jingles.
  2. Under Repositories, tap Add New Repository.
  3. Enter the repo in owner/repo format (e.g. inssekt/cocoon-jingle-repo).
  4. The repo now shows up as a source in the jingle picker for every game.

You can add as many repos as you want. Remove one by pressing the X button next to it.

How Matching Works

Repos contain an index.json that maps game names to audio files. Each entry has a name (display name) and an optional regex field for matching:

  • Dedicated regex field — when present, this is the highest-priority match. Write a proper regex pattern without polluting the display name.
  • Name-as-regex fallback — if no regex field exists, the name itself is tried as a regex pattern.
  • Bidirectional substring matching — if regex doesn’t match (or the name isn’t a valid regex), Cocoon falls back to case-insensitive substring matching in both directions. "Mario Kart" matches "Super Mario Kart" and vice versa.

Regex patterns longer than 200 characters are skipped as a safety guard (ReDoS protection). Invalid regex silently falls through to substring matching, so typos won’t break anything.

Matching entries are sorted to the top of the picker so you don’t have to scroll through hundreds of entries.

Making Your Own Repository

Fork the example repo template on GitHub. Your repo needs an index.json in the root. It can be organized two ways:

Flat (all platforms mixed):

{
  "name": "My Jingle Pack",
  "entries": [
    { "name": "Super Mario Bros", "file": "jingles/smb.mp3" },
    { "name": "Zelda - A Link to the Past", "file": "jingles/zelda.mp3", "regex": "zelda.*(link|alttp|past)" }
  ]
}

Organized by platform:

{
  "name": "My Jingle Pack",
  "n3ds": [
    { "name": "Animal Crossing", "file": "jingles/n3ds/animal-crossing.mp3" }
  ],
  "snes": [
    { "name": "Super Metroid", "file": "jingles/snes/metroid.ogg" }
  ]
}

Platform keys match Cocoon’s internal platform IDs (like n3ds, snes, psx, gba, etc.). Any JSON key that isn’t "name" and holds an array is treated as a platform.

Audio files are fetched from the repo via GitHub’s raw content URLs. Cocoon tries the main branch first, then falls back to master. File paths with spaces or special characters are URL-encoded automatically, so you don’t need to worry about them.

Entry Fields

Each entry in index.json supports these fields:

FieldRequiredDescription
nameYesDisplay name shown in the jingle picker. Also used for matching if no regex is provided. Legacy repos can use game as an alias.
fileYesPath to the audio file relative to the repo root.
regexNoRegex pattern for matching against the user’s current game name. When present, this is tried first (highest priority). If absent, the name field is used for matching instead.

Using the regex Field

The optional regex field lets you write a dedicated matching pattern without cluttering the display name. This keeps your picker looking clean while still supporting flexible matching.

{ "name": "Zelda - A Link to the Past", "file": "zelda_alttp.ogg", "regex": "zelda.*(link|alttp|past)" }

The display name reads nicely in the picker, while the regex handles the actual game matching.

Common patterns:

{ "name": "Fire Emblem", "file": "fire-emblem.mp3", "regex": "fire.?emblem" }

Matches any game with “Fire Emblem” or “FireEmblem” — Fire Emblem Awakening, Fire Emblem: Three Houses, etc.

{ "name": "Mario Kart", "file": "mario-kart.mp3", "regex": "mario.kart.*(ds|wii|7|8)" }

Matches Mario Kart DS, Mario Kart Wii, Mario Kart 7, and Mario Kart 8.

{ "name": "Pokémon", "file": "pokemon.mp3", "regex": "pok[eé]mon" }

Character classes handle accent variations — matches both “Pokemon” and “Pokémon”.

{ "name": "Super Mario Bros", "file": "smb.mp3", "regex": "^(super )?mario bros\\.?$" }

Anchors (^ and $) match from start to end. Matches “Mario Bros”, “Mario Bros.”, “Super Mario Bros”, but won’t match “New Super Mario Bros”.

If you don’t provide a regex field, the name itself is tried as regex, then as substring. So entries without regex still work — "Super Mario Bros" matches any game with that text in its name.

How matching works under the hood:

  1. If the entry has a regex field, it’s compiled as a case-insensitive regex and checked first.
  2. If no regex field, the name value is tried as a case-insensitive regex.
  3. Regex matching is partial (using containsMatchIn). "Mario" matches any game with “Mario” anywhere in the name. Use ^ and $ anchors for exact matching.
  4. If the regex is invalid (bad syntax), matching silently falls back to bidirectional substring.
  5. Patterns longer than 200 characters are skipped as regex and treated as plain substring.

Tips for Repo Authors

  • Use the regex field when you need flexible matching — keep name clean for display.
  • Keep regex patterns under 200 characters — longer patterns are silently treated as plain text for safety.
  • Invalid regex patterns are fine — they fall through to substring matching.
  • Remember that matching is partial by default. "Mario" matches every game with “Mario” in the name. Use ^ and $ anchors if you need precision.
  • Escape special regex characters with \\ in JSON. For example, \\. matches a literal dot (. alone matches any character).
  • Legacy repos using game instead of name still work — Cocoon falls back to game if name isn’t present.
  • Organize by platform when your collection grows large; it helps Cocoon surface better matches.
  • MP3 and OGG are the most common formats, but any Android-supported audio format works.

Assigning Jingles to Games

From the Jingle Picker

Open a game’s properties (long press on a game/Y Button, Edit) and look for the jingle option.

Controls:

ButtonAction
XToggle preview (play/pause)
ADownload and assign to this game
YEdit search term
BGo back

Each jingle entry shows animated action buttons when highlighted — X toggles preview (turns green while playing) and A downloads the jingle.

Uploading a Local File

If you have your own audio files, pick “Upload File” in the left pane of the jingle picker. This opens your device’s file picker where you can choose any audio file. The file gets copied into Cocoon’s media folder and assigned to the game.

Fallback Jingles

Fallbacks save you from having to assign a jingle to every single game individually.

Global Default

Set one audio file as the global fallback. Any game without a per-game or per-platform jingle will use this. Great if you just want a consistent sound across your whole library.

Per-Platform Defaults

Set a different default for each platform. For example:

  • All SNES games play a SNES startup chime.
  • All PS1 games play the PlayStation boot sound.
  • All GBA games play a Game Boy jingle.

To set these up, go to Settings > Library & Data > Jingles > Per-Platform Defaults. You’ll see a list of every platform that has games in your library. Press A to set a jingle, X to clear it.

Per-platform defaults take priority over the global default but are overridden by per-game jingles.

Playback Settings

Auto Fade Out

Long jingles can overstay their welcome. Auto Fade Out gradually lowers the volume after a set number of seconds, then stops playback cleanly. The fade is a smooth 30-step ramp over the remaining duration. The threshold is adjustable from 3 to 30 seconds. Enabled by default at 10 seconds.

Volume Normalization

Audio files from different sources can have wildly different volume levels. Volume Normalization decodes up to ~10 seconds of PCM audio, finds the peak sample level, and adjusts the gain so everything plays at a consistent loudness. This happens transparently — louder files get scaled down, quieter files get boosted. Enabled by default.

Volume

Jingle volume has its own dedicated slider (default 30%), separate from SFX and background music volume. Adjustable in Settings > Sounds > Jingle Volume.

Jingle volume is included in theme exports, so theme authors can set a recommended jingle level that gets applied when someone installs the theme.

Background Music Interaction

When a jingle starts playing, background music automatically ducks (fades down over ~300ms). When the jingle finishes, BGM fades back in over ~800ms. On dual-screen setups, jingles are routed to the main display’s audio output.

Cleanup

The Clear All Jingles option in the jingles settings wipes every per-game jingle assignment and deletes all downloaded jingle files. Useful if you want a clean slate. Your fallback settings (global and per-platform) are kept.

If a jingle file is deleted externally (e.g. clearing app data), Cocoon detects the missing file and silently skips playback — no error is shown.

Supported Formats

MP3, OGG, WAV, FLAC, AAC, M4A. Basically any audio format your Android device can handle.