Sound Effects Becoming Clipped or Very Loud


#1

Hello, I’m experiencing a new problem with my sound effects. Some of them have started getting too loud or clipped. One of the sound effects for an ememy shooting a projectile is sometimes way too loud but it didn’t used to be and I haven’t changed the volume of it. This just started happening today. Could this be because of the GDevelop update?


#2

Could you please try to make a very small project replicating the issue for us to investigate?


#3

Share some of your event screenshot when the enemy shoots maybe there is some trigger once missing, and the sound keeps playing more than once.


#4


This is the sound effect that has the worst problem. Sometimes it gets very loud. As you can see, though, I have set it to play quietly.


#5

Not only does the sound volume vary, but the sound effect also sounds different. I think it has to do with setting the sound effect to play at volume 10. I tested what would happen if I let the sound effect play at its regular volume. The sound effect stopped getting distorted and volume stayed consistent. However, it is too loud if I do this. I need to find another away of making the sound play quietly. Is there a way to turn down the volume in JFXR when you are editing a sound effect?


#6

I ended up using an online wav editor to turn down the volume of the sound effect. It seems that any time I use a sound effect in an event in which the sound effect volume is turned down, the sound effect will get distorted and the volume won’t necessarily be turned down. I don’t think this used to be a problem with GDevelop. I guess I will have to edit all my sounds so they are the proper volume and then not use any events that turn down the wav files.


#7

As mentioned above, before anyone can debug this you’ll need to provide a small project with an example of it happening.

Maybe just a single event that plays the sound upon load (or pressing the key) and just one of the sound files.

I can’t reproduce this on any of my audio files locally, so I can’t help with bug testing.


#8

OK, I made a small project that replicated the issue. I can’t seem to send the json file on here. Do you want it to be a json file or export it as a stand alone game?


#9

I made a web version that you can play of the sound testing project that replicates the issue. https://games.gdevelop-app.com/game-c7abbed6-4592-4c53-b2cc-7d99e3beea62/index.html
In this game I used a different sound effect. The problem still occurs but not as much. You might have to press 2 repeatedly before you start hearing the sound effect clipping and playing too loudly.


#10

Hm-m… Maybe you need do like this:

| Variables | nothing here
(Under each variable) Trigger Once | actions, like “Create object”, etc.

I don’t know, will it help you or not. Just saying


#11

Sorry for the confusion. Folks will need the whole project folder, zipped up, so they can review the issue locally.


#12

After taking a look inside the howler objects, except the volume difference I saw nothing out of the ordinary. I can only guess that this is some kind of bug with Howler.js, and propose to ask for help there.


#13

Hi, did you try using the test project I made and posted a link for? Did you ever experience a problem with the sound when you press 2? It’s supposed to sound the same as when you press 1 but quieter. Sometimes this works and sometimes it doesn’t.


#14

Also in the game that I’m making (not the small test project I provided a link for), it seems that basically none of the sounds are getting turned down anymore. Could this be a problem with GDevelop or could it be my computer? I have a 2012 Mac with MacOS Mojave.


#15

I’m betting it’s because you’re using “Play the sound” instead of “Play the sound on a channel”. It’s likely overwriting the default/global channel and running into issues.

Can you try “play the sound on a channel” instead? I can’t reproduce the issue that way. Here’s an example project where I can spam the keys as much as I want with no oddities:
https://games.gdevelop-app.com/game-0e5d7a1a-8179-48c1-9675-58f51401a309/index.html

You can download the whole project here: https://file.re/2021/03/30/testsoundproject/


#16

Hi Silver-Streak, thanks for your project. I tried it out and modified it so that the quieter sound is at volume 20 instead of 50. When I did this I encountered the sound issue I was having with my own project. So using “play the sound on a channel” doesn’t fix the problem.


#17

I still cannot reproduce it.

I even modified my project to use 10% volume instead of 50%, and can spam without any issues:

https://games.gdevelop-app.com/game-841d2e35-770a-40b5-b500-75d3a41f9a4a/index.html

What version of GDevelop are you on?


#18

That’s so strange. I tried the one you sent and it works fine. I’m using Gdevelop 5.0.0 beta 108. It says it’s the latest version.


#19

Is this what your event editor looks like? Because if I set it to volume 10 it distorts the sound.


#20

I just compared playing my latest saved version of my game (not the sound test one) with playing a stand-alone older version that I exported months ago. The old one’s sound works fine but the new one’s sounds are messed up. However the sounds used and the events used to produce the sounds are unchanged. Could it be that the old version works because it was created with an older version of GDevelop and the new version doesn’t work because it was saved with a newer version of GDevelop?