#✅ | Backgroudn music settings

1 messages · Page 1 of 1 (latest)

quick flare
#

Alice, I'm back once again. I want to make a popup screen or something (figired how to do so with custom GUI), that'd give me settings to make parts of background noise (birds, forest, river) quieter or louder... how to do so?

ancient nexusBOT
# quick flare Alice, I'm back once again. I want to make a popup screen or something (figired ...

Yep — you can make a little Custom GUI popup with sliders that change Minecraft’s sound settings 😊

For ambient background noise like birds / forest / river, you’ll want to control Minecraft’s built-in sound categories via the Set Minecraft Option action.

What to use

Use a Slider element for each sound type, then add this action to the slider:

  • Set Minecraft Option
  • Option name:
    • soundCategory_ambient → ambient nature sounds like birds/forest
    • soundCategory_weather → rain / thunder / similar
    • soundCategory_blocks → some block-related sounds
    • soundCategory_master → all sounds overall

How to set it up

  1. Create your Custom GUI popup.

  2. Add a Slider for each category you want.

  3. Set slider type to Decimal Range

  4. Set range from 0.0 to 1.0

  5. Right-click the slider → Edit Action Script

  6. Add Set Minecraft Option Value

    • Name: soundCategory_ambient
    • Value: $$value
  7. Set the slider’s pre-selected value to the current option value using:

{"placeholder":"minecraft_option_value","values":{"name":"soundCategory_ambient"}}

Example label

You can show the current value like this:

Ambient: {"placeholder":"calc","values":{"expression":"$$value * 100.0","decimal":"false"}}%

Important note

Minecraft only exposes sound categories, not separate sliders for each individual ambient sound like “birds” or “river” unless a mod gives them their own category. So in most cases you can only adjust them together through ambient.

If you want, I can help you build the exact popup layout with:

  • a master volume slider
  • an ambient slider
  • a weather slider
  • a close button
quick flare
#

oh, no, no no, I have a few tracks using "adio" elements (one for water, one for trees, one for rain etc)

ancient nexusBOT
# quick flare oh, no, no no, I have a few tracks using "adio" elements (one for water, one for...

Ohh, got it — then yes, you can make a popup GUI that controls your Audio elements directly 🎧

What to use

For each sound track / Audio element, use the action:

  • Set Track Volume (set_audio_element_volume)

That action sets the volume of a specific Audio element.

How to set it up

  1. Make your Custom GUI popup
  2. Add a Slider for each Audio element
  3. Set each slider to Decimal Range
    • min: 0.0
    • max: 1.0
  4. On each slider, add this action:
    • Set Track Volume
    • value format:
      audio_element_identifier:$$value

So for example:

  • water_audio:$$value
  • trees_audio:$$value
  • rain_audio:$$value

Optional: show current value on the slider

You can use the audio volume placeholder for the label:

Water: {"placeholder":"audio_element_vol","values":{"element_identifier":"water_audio"}}

Or as percent:

Water: {"placeholder":"calc","values":{"expression":"{"placeholder":"audio_element_vol","values":{"element_identifier":"water_audio"}} * 100.0","decimal":"false"}}%

Important

You’ll need the Audio element identifiers for each track.
If you don’t know them, right-click the Audio element and copy its identifier if available.

If you want, I can help you sketch the exact popup layout with 3–4 sliders and a close button.

quick flare
#

Okay... now these are either completley silent, or max volume (right at the end of a slider)

ancient nexusBOT
# quick flare Okay... now these are either completley silent, or max volume (right at the end ...

That usually means the slider is not set up as a smooth decimal slider.

Fix

For each slider, make sure:

  • Slider type = Decimal Range
  • Minimum = 0.0
  • Maximum = 1.0
  • The action value is exactly:
    • audio_element_identifier:$$value

Also check

If your slider label or action is using integer values by accident, it can only jump between 0 and 1, which feels like mute/max only.

What you want

A proper setup looks like this:

  • Slider type: Decimal Range
  • Min: 0.0
  • Max: 1.0
  • Action:
    trees_audio:$$value

If it still behaves weirdly

Then please tell me:

  • which slider type you chose
  • the exact action value
  • whether the slider uses pre-selected value

And I can help you spot the issue quickly ✨

quick flare
#

okie, works
now... I want to have a button, on a main menu, that when pressed, switches from the ambient noise to background music (added also using an audio element), is that possible?

ancient nexusBOT
# quick flare okie, works now... I want to have a button, on a main menu, that when pressed, s...

Yes, absolutely ✅

You can do that with a button that:

  1. disables one Audio element
  2. enables the other Audio element

Best way

Use Enable/Disable Layout only if the audio is inside separate layouts.
But if both audio elements are in the same layout, use actions that target the Audio element playback/volume.

Simple setup

If your ambient noise and music are two different Audio elements, make a button with an action script like this:

  • Set Track Volume for ambient audio → ambient_audio:0.0
  • Set Track Volume for music audio → music_audio:1.0

That way the ambient sound gets muted and the music becomes loud.

If you want a true toggle

Use a variable and an IF statement:

  • If music_mode is true
    • ambient volume = 0.0
    • music volume = 1.0
    • set music_mode:false
  • Else
    • ambient volume = 1.0
    • music volume = 0.0
    • set music_mode:true

Even cleaner option

Put the ambient sounds in one layout and the music in another layout, then use:

  • Enable Layout
  • Disable Layout

That lets you switch entire groups on/off very easily.

If you want, I can write the exact action script for a single toggle button for your setup.

quick flare
#

okay... so... with the if option, it switches from one to another, right? so... if I have music playing, and click on it, it's ambient noise... and if I have ambient noise and click on it, then I have music?

ancient nexusBOT
# quick flare okay... so... with the if option, it switches from one to another, right? so... ...

Yes — exactly that 👍

With an IF / ELSE button, you can make it toggle between the two states:

  • If music is currently active, clicking the button switches to ambient noise
  • If ambient noise is currently active, clicking the button switches back to music

How to do it

Use a FancyMenu variable like audio_mode with two values, for example:

  • music
  • ambient

Then in the button’s action script:

  • IF audio_mode is music
    • set music volume to 0.0
    • set ambient volume to 1.0
    • set audio_mode:ambient
  • ELSE
    • set music volume to 1.0
    • set ambient volume to 0.0
    • set audio_mode:music

Important

The IF check should use Is Variable Value [FM Variable].

Initial setup

Before the button can toggle properly, set the variable once in Manage Variables, for example:

  • audio_mode = music

Then the first click will switch to ambient.

If you want, I can write the exact action script order for the button step-by-step.

quick flare
#

okie, awesome... now, is there a way to avoid music playing from the middle later on? like... a way for it to play from the beggining each time I click that button and it switches to music

ancient nexusBOT
# quick flare okie, awesome... now, is there a way to avoid music playing from the middle late...

Yes — but not by just changing the volume.

What you need

To make the music start from the beginning each time, you need to restart the Audio element when switching back to music.

From the docs I can confirm FancyMenu has these Audio actions:

  • Toggle Play/Pause Track
  • Next Track
  • Previous Track
  • Set Track Volume

But I don’t see a documented action here to directly reset/restart an Audio track position.

So the safe answer

If your current music continues from the same spot, FancyMenu’s documented actions here do not show a direct “restart from beginning” control for Audio elements.

Workaround

The usual workaround is to:

  • toggle the Audio element off/on in some way, or
  • use a separate layout / element setup so the music element gets reloaded

But I can’t confirm a guaranteed “restart track” action from the docs you gave me.

If you want, I can help you build the toggle script for the volume switching, and then we can look for a clean reset workaround together.

quick flare
#

okay, let's say I want to do so with play/pause?

ancient nexusBOT
# quick flare okay, let's say I want to do so with play/pause?

Yes — play/pause can work for that, but with one important catch:

What play/pause does

It only pauses and resumes the current track.
So if you pause music and later play it again, it will usually continue from the same spot — not restart from the beginning.

For your toggle idea

You could make the button do this:

  • If audio_mode is music
    • pause/stop music playback
    • start ambient audio
    • set audio_mode:ambient
  • Else
    • pause/stop ambient audio
    • play music
    • set audio_mode:music

But for “start music from the beginning”

Play/pause alone is not enough.

You’d need some way to fully restart the audio element or recreate/reset it. The docs you gave me only clearly list:

  • audio_toggle_play
  • audio_next_track
  • audio_previous_track
  • set_audio_element_volume

So I can’t confirm a documented restart action for Audio elements from this docs set.

If you want, I can help you set up the toggle so it at least cleanly switches between ambient and music using mute + play/pause.

quick flare
#

back to a gui popup for a second. I got all my sliders for ambient noise, they all work, but... if I set a deafult value on sliders on 1, then the look of a value changes, but the sound is muted, if I completley silenced it before etc... ideas on fixing that so it'll stay consistent?

ancient nexusBOT
# quick flare back to a gui popup for a second. I got all my sliders for ambient noise, they a...

Yes — that sounds like the UI value and the Audio element state are getting out of sync.

Likely fix

Make sure the slider’s default / pre-selected value is tied to the actual Audio element volume, not just a hardcoded 1.

Use the audio volume placeholder as the slider’s pre-selected value:

{"placeholder":"audio_element_vol","values":{"element_identifier":"your_audio_id"}}

That way the slider shows the real current volume.

Important

If the audio was previously muted by an action, setting the slider UI back to 1 does not automatically restore the audio unless the slider actually runs the Set Track Volume action again.

What to check

  • Slider type is Decimal Range
  • Slider uses Set Track Volume
  • Slider’s pre-selected value is the current volume placeholder
  • You are not only changing the visible slider value manually

Best practice

When opening the popup, let each slider read from:

  • audio_element_vol

So the slider always reflects the real volume state.

If you want, I can help you set up a clean “open popup and sync all sliders to current audio values” setup.

#
Thread Marked as Solved

This support thread has been marked as solved by @quick flare.

The AI helper is now disabled, but you can still continue the conversation if needed. Thank you for using our support system!