Skip to content

Editing Containers

gl326 edited this page Dec 12, 2022 · 13 revisions

Containers are folders of audio assets, with logic.

There are 3 main types of containers, which each do different things with their content when they're played.

The large panel in the center displays the contents of the container. If the container you're editing is NOT imported directly from your project you can:

  • Click and drag any item to change their order
  • DELETE+CLICK to delete an item from the list

Here are all the other key fields, from top to bottom, left to right:

  • Left/Right Arrows: Browse previously edited sound/container you had open for editing, like the "Back/Forward" buttons in a web browser.

  • BUS: Type in the name of a bus to assign the container to that bus. If the name is a valid bus, a checkmark appears. Busses are created in the “bus” tab, and basically they’re a way to group sounds up for mixing. For example, you might want to group all your “sfx” into one bus, and all of your “ambiance” into a different bus, and then define broadly that ambiances are turned down a bit and sounds are turned up a bit. There’s a hierarchy to it, so “sfx” can have sub-busses like “footsteps” and “voices” and “UI,” and if you make changes to the parent “sfx” bus everything on the child busses will update accordingly. This is getting a bit long. Talk to me in the “bus” section.

  • Set children: This sets the “bus” of every child container and audio asset to match the current one, recursively. So you can make a big parent folder called “ambiances,” and put all of your ambiance containers inside that folder, and then in the audio editor go to the “ambiances” folder and set that container to “ambiance” and hit this button and then all of the ambiances will be on the same bus. Woot!

  • TEST: You can use the SPACEBAR to do this too. Plays the container. This simulates what it would sound like if you wrote container_play([container name]) in your game code. Press it again while the container is playing to stop the container ie. container_stop([container name]).

  • EFFECTS: (Added 2022/12/12) - this opens up an Effects Panel and lets you add or edit effects on this container. You can learn more about the Effects Panel here.

  • RENAME: Works only on non-imported containers. Renames it!

  • DELETE: Works only on non-imported containers. Deletes it!

  • CHOICE, HLT and MULTI: This sets the type of your container. See above for info on those.

  • Gain slider: Adjust the volume of the sound. GAME MAKER CAN’T MAKE YOUR AUDIO ASSET ANY LOUDER THAN WHAT IT WAS IMPORTED AS, SO IT’S GENERALLY BEST TO IMPORT LOUD ASSETS AND TURN THEM DOWN IN THE EDITOR. But you can turn them up here to offset something else that might be turning it down, like a parent container or a bus.

Gain is calculated with proper nested logic. So if you play a container that is turned down -6 dB, and it contains containers that are turned up +6dB, then the resulting audio will be +0 dB.

  • setChild: This sets the gain of the child objects to be the same as the current one. It’s like the “setChildren” bus button, but it is NOT RECURSIVE… it only sets the assets that are listed in the contents of the current container, and doesn’t go any deeper. Useful if you want to quickly set the gain of a bunch of sounds at once.

  • Random gain min, max, and “Set default”: This sets a range of values that the gain could be set to randomly. The “set default” button just sets it to a pre-determiend range that we liked using for footsteps. This way, repeatedly playing the same sound can yield different loudnesses.

  • Pitch slider: Sets the pitch of the sound. This one is fun.

  • Random pitch min, max and “set default”: like the gain ones above but for pitch.

  • 3D: This makes the sound “3D,” so it has a position in world space when played in the game. THIS ONLY WORKS ON MONO WAV FILES! NO OTHER FORMAT. Sounds will sound like they’re to the left or right based on their position, and will also get quieter the farther they are. Whatever object plays this sound, the sound will be “attached” to that object.

  • Size (def x): Sets the 3D size of the sound. If the sound is within this distance of the listener, it will be at its loudest. Leave it at 0 to use the default size. You can set this default size in bard_audio_system

  • Attenuation (def x): Sets the 3D attenuation size of the sound. When the distance between the sound and the listener is greater than this number, the sound will be inaudible. Leave it at 0 to use the default size,. You can set this default size in bard_audio_system

  • start time: Measured in seconds, this sets where the audio playhead starts from when you play the container. So if this were set to 1, sounds inside the container will always skip the first second of audio when they're played.

  • RAND start: when ON, the start time of audio in this container is completely randomized every time you play. Very useful for constant looping sounds, especially if multiple can play at the same time, or for things like background ambiences. This was used for the painting loops in Chicory, for example, so that every time the user began painting they would hear a different part of the same long painting sound loop.

  • Fadein: How long the sound fades in for after starting, measured in SECONDS. So .25 is ¼ of a second. If left at 0 there’s no fading at all, but for many sounds, especially looping ones, it can be nice to have the sound quickly fade in when it starts.

  • Fadeout: Like the above, but how long it spends fading out when you “stop” the sound. Leave it at 0 to have the sound stop instantly as soon as you stop it.

  • LOOP: Makes the sound loop when played. It will never stop unless you tell it to.

  • SYNC: Enable this for containers of multiple tracks of identical length. This forces the sounds to play in sync, so that they stay in time with each other. Game Maker has a built-in feature called audio sync groups that’s meant to do this, but by default I left them turned OFF because they aren’t well supported and were buggy on consoles just before we launched (lol). You can turn them on in bard_audio_system if you want. Otherwise, this just makes it so that when the top container loops, it updates the time of all the other containers to match up, so they don’t fall out of sync.

  • BPM: The BPM of this container, if it’s music. This sets the frequency of beatEvent()s.

  • Measure: The two boxes beside BPM are additional timing settings.

  • The right-side box is the "beats per measure," which defaults to 4. This means that every 4 beats, this container will generate a measureEvent which can be useful for timing bigger transitions. You should change this value depending on the time signature of the container (ie. a 3/4 time song should be set to 3 beats per measure, a 6/4 song to 6 beats per measure, etc...)
  • The left-side box is the "starting beat." This changes what count the beat starts at, which then changes which beats a measureEvent will fall on. If the song starts with a 1-beat pickup, for example, you might set the starting beat to -1, so that the second beat that plays in the song is counted as the true "beat 0" and generates the first measureEvent.

Clone this wiki locally