AppleyAppley Docs
Docs/Audio

Volume Control

Manage individual and group volume.

5 min read Beginner Updated 2026-07-01 v2.0 ~15 min to complete

Introduction

Manage individual and group volume. This page provides a complete guide to volume control in Appley, covering everything from setup to advanced techniques.

Audio is a core area of Appley. Understanding volume control will help you build better games and use the platform more effectively. This documentation is designed for beginner level users.

Requirements

Before working with volume control, ensure you have the following:

  • Audio files (MP3, WAV, OGG)
  • An Appley project
  • Basic understanding of game audio
  • Optional: Freesound API key for sound search

Estimated Completion Time

This guide takes approximately 15 minutes to complete. The estimated reading time is 5 minutes. Difficulty level: Beginner.

Step-by-Step Guide

Follow these steps to work with volume control in your Appley project:

1

Prepare audio files

Obtain or create audio files in MP3, WAV, or OGG format for volume control.

2

Import audio

Upload the audio files through the Asset Browser in Creator Studio.

3

Configure audio source

Set the audio properties: loop, volume, pitch, 3D spatial, and channel.

4

Script playback

Use the audio API in Appley Scripting to play and control sounds.

5

Mix and test

Adjust volume levels and test the audio mix. Use the Audio Manager.

FluxScript Example

Below is an Appley Scripting (Flux Scripting) code example demonstrating volume control:

Volume Control — Appley Scripting
// Audio — Volume Control
on start {
  audio.playLoop("ambient_wind")
  audio.setVolume("ambient_wind", 0.3)
  bgm = audio.play("bgm", { volume: 0.7, loop: true })
}

on collision(other) {
  if other.type == "coin" {
    audio.play("collect", { pitch: 1.0 + math.random(0.2) })
  }
  if other.type == "enemy" {
    audio.play("hit", { volume: 0.9 })
    audio.setPitch("hit", 0.8)
  }
}

on event("gameOver") {
  audio.fadeOut("bgm", 1.5)
}

Node Script Example

The same logic can be implemented using Node Scripting. Here is the equivalent node graph:

Volume Control — Node Graph
[On Collision] ──► [Branch: type]
            ├─ "coin" ──► [Play: "collect", random pitch]
            └─ "enemy" ──► [Play: "hit", volume 0.9]

[On Event "gameOver"] ──► [Fade Out: "bgm", 1.5s]

Interchangeable Systems

FluxScript and Node Scripting compile to the same runtime. You can mix both in a single project — use whichever is best for each task.

Common Mistakes

Avoid these frequent mistakes when working with volume control:

Using uncompressed WAV files for long music

Use MP3 or OGG for background music to reduce file size.

Playing too many simultaneous audio sources

Limit to 8-10 concurrent sounds. Use audio channels for grouping.

Not setting 3D audio properties

Enable spatial audio for positional sounds like footsteps and gunfire.

Loading all audio at startup

Stream long audio files instead of loading them into memory.

Troubleshooting

If you encounter issues with volume control, try these solutions:

No sound plays
Check that audio is not muted. Verify the file loaded. Ensure volume is above 0.
Audio is distorted
Reduce the volume. Check for overlapping sources. Lower the master mixer level.
3D audio has no direction
Ensure the listener is attached to the camera. Enable spatial audio.
Audio loops have a gap
Use seamless loop files. Check for silence at start/end of the clip.

Performance Tips

Optimize your use of volume control with these performance tips:

  • Use audio channels to group sounds (music, sfx, voice) for independent volume control.
  • Randomize pitch slightly (0.9-1.1) on repeated sound effects to avoid monotony.
  • Use audio occlusion for realistic sound blocking behind walls.
  • Pre-load frequently used short sounds; stream long music tracks.

Explore these related documentation pages:

Example Project

Download a complete example project demonstrating volume control: