M4A files in browser games
M4A is the audio format iPhones and Macs record and export, and you can upload it to Go Bananas as is: the site turns it into an MP3 for your game.
M4A is an audio file in the MPEG-4 container, usually compressed with AAC. It's what iPhone Voice Memos, GarageBand and Apple Music exports often produce. AAC sounds as good as MP3 at a smaller size, so an M4A is a compact, good-quality starting point.
What M4A is good for in games
M4A is handy because it's often the file you already have:
- Recorded sounds. A voice line, a clap or a door slam recorded on an iPhone comes out as M4A. You can use it as a sound effect without converting it first.
- Music. AAC keeps long tracks small, which helps with the 5 MB limit per file.
Some M4A files hold lossless audio (ALAC) instead of AAC. Those are much bigger, closer to a WAV, so they hit the size limit sooner.
On Go Bananas, every audio upload is turned into an MP3, so your game never plays the M4A itself. The format you start from mostly decides how good the audio sounds going in and whether the file fits the 5 MB limit.
Uploading M4A to Go Bananas
You upload audio in the Upload Asset window. Open it from the Assets tab ("Upload Asset") or from the editor ("Upload New", or drag a file onto the editor chat). If you drop an audio file on the create panel, the site opens the same window for you.
You need to be signed in with a verified email. Before the upload, you tick a box confirming you have the right to use the audio: it's your own work, it's licensed to you, or it's in the public domain. A recording you made yourself counts as your own work; a song you bought doesn't.
| Limit | Value |
|---|---|
| File size | 5 MB per file |
| Length | 120 seconds |
| All your audio together | 50 MB per account |
| Embedded tags (such as cover art) | 256 KB |
The site checks the file is real audio it can read, then prepares it for games:
- It sets the loudness to -16 LUFS, so a quiet phone recording and a loud music track play at a similar level.
- It trims silence at the start of the file. Silence at the end stays.
- It removes all metadata, including titles and cover art.
- It saves the result as an MP3 at 44.1 kHz. A clip of 5 seconds or less is treated as a sound effect and saved in mono at 96 kbps. A longer clip is treated as music and saved in stereo at 128 kbps.
The M4A itself isn't kept, only the MP3 made from it. The site warns you if the audio is clipping (distorted) or unusually quiet or loud. You can trim it to the part you want, and games then play only that part. The file isn't cut, so you can change the trim later.
Using M4A in your game
The easy way: ask the AI. In the create or edit box, type @ and pick your sound. Its name is inserted in quotes, for example "welcome", and the AI knows which file you mean. In the editor's Assets tab, attach the sound to your game to set its volume with a slider from 0 to 100.
In code. Every game has a sound helper, window.__audio. Your sound's address is in window.GAME_ASSETS.audio, under the file's name without its extension. The address points to the MP3 the site made:
const welcomeUrl = window.GAME_ASSETS.audio['welcome'].url;
// Browsers, and iPhones especially, only allow sound after a tap or click
startButton.addEventListener('click', async () => {
__audio.init();
await __audio.load(welcomeUrl);
__audio.play(welcomeUrl, { volume: 1 });
startGame();
});
For music, use __audio.playMusic(url, { loop: true }). For 3D games, __audio.play3D(url, x, y, z, camera) makes a sound come from a point in space, quieter the farther away it is.
Pass the full address: a bare name or an asset ID won't play. Use the helper rather than new Audio() or your own AudioContext. It unlocks sound on iPhones, follows the site's mute button, and applies the volume you set in the editor.
Built-in sounds
Every game can also use a free sound pack, released as CC0 (no permission or credit needed). Each sound lives at https://gobananas.co/sfx/<name>.mp3:
gunshot,reload,hit,footstep,pickup,menu_clickzombie_moan,zombie_attack,zombie_deathambient_tension, a music loop of about 10 seconds
Use the full https address in game code. The editor's volume slider doesn't apply to these sounds, so set their volume in the play call.
Tips and common problems
- Voice Memos. Share the memo to Files to get the .m4a, then upload it. Long memos run past the 120-second limit, so trim them first in the Voice Memos app.
- Background noise. The site makes the volume even, but it doesn't remove hiss or room noise. Record somewhere quiet, close to the phone.
- Silence at the end. Only the start is trimmed, and phone recordings often end with a few seconds of nothing. Trim the end in the editor or before uploading.
- The file is over 5 MB. It's probably long or lossless. Shorten it, or export it as AAC at a normal quality.
- A clipping warning means the recording is distorted at its loudest moments, for example from shouting into the microphone. Record it again a little farther away.
- The game can't find the sound. Its name in
GAME_ASSETS.audiois the file name without.m4a. If you rename the asset, game code that uses the old name stops finding it. If two files have the same name, the newest one wins.
From ChatGPT or Claude
Audio can't be sent through the Go Bananas app in ChatGPT or Claude. Ask for an upload link: it takes you to your game's page, where you upload the file from the editor.