Disabling this doesn’t fix the issue. Only opting out of the new spatial API or disabling the spatial sound windows setting fixes it.
this is cool yeah, but i would like it to work with normal “Sound” objects because i want to make like a sound stealth system but im NOT rewriting all of the sounds
I see… interesting. It’s definitely an audio engine issue. It could be routing the audio incorrectly to mid and side channels for a consistent stereo picture? We’ll find out soon enough/ Hopefully it will be fixed this year
Are engineers aware of the audio clipping issue when the audio thats played from emitters is too loud? Because it seems like unlike Sound instances which properily attenuate all other audio, here, this doesn’t seem to be the case. Is this simply limitation we have to get across or it’s gonna be addressed at some point?
hey @vvv331, AudioEmitter
s and AudioListener
s can produce feedback noise if you wire the output of a listener back to an emitter that it hears – we added a clipper to prevent that scenario from becoming infinitely loud
If you are finding that threshold is too restrictive we can revisit
That’s something that should be implemented with AudioFaders
, too, if it isn’t already.
When trying to help out another developer with increasing Voice Chat volume, I accidentally found out that it’s possible to output pretty loud sounds through chaining multiple AudioFaders
together.
I revisited it today after reading your post and found out that I had originally set up the code incorrectly (it wasn’t connecting all of the AudioFaders
that were created). After editing it, half a dozen AudioFaders
made it possible for the RmsLevel
to reach the 100+ range.
- It’s probably already being clipped to a certain degree but I haven’t dared to turn up the volume of my speakers beyond the lowest settings to find out for sure. It’s still very loud on low speaker settings, even if it’s being clipped.
In the example code below, replace the value of the numberOfAudioFadersToCreate
variable with however many AudioFaders
you want it to create.
With 3 or more AudioFaders
set to the max volume, it is pretty intense, so make sure to lower your volume before testing anything.
Here’s an example that can be tested out in a solo playtest:
(Note for anyone testing this: Because the standard voice chat UI does not appear in solo playtests, make sure to manually go into the Players service and enable the “Active” property for your player’s AudioDeviceInput via the client-side. Otherwise, you can enable Team Create and run a “Team Test” and the voice chat UI that you would typically see in a live server should appear):
Script #1 (Server Script in ServerScriptService
)
local Players = game:GetService("Players")
---
local numberOfAudioFadersToCreate = 0 -- Replace the number with how many AudioFaders you want to use
---
local function connectWires(source, destination)
local wire = Instance.new("Wire")
wire.SourceInstance = source
wire.TargetInstance = destination
wire.Parent = destination
end
local function onPlayerAdded(player)
local audioDeviceInput = Instance.new("AudioDeviceInput")
audioDeviceInput.Name = "AudioDeviceInput_VolumeTesting!"
audioDeviceInput.Player = player
audioDeviceInput.Parent = player
local audioDeviceOutput = Instance.new("AudioDeviceOutput")
audioDeviceOutput.Name = "AudioDeviceOutput_VolumeTesting!"
audioDeviceOutput.Player = player
audioDeviceOutput.Parent = player
-- Note: The RmsLevel of the AudioAnalyzer will need to be read from a client-sided script
local audioAnalyzer = Instance.new("AudioAnalyzer")
audioAnalyzer.Name = "AudioAnalyzer_VolumeTesting!"
audioAnalyzer.Parent = player
local function createAudioFaders(numberToCreate)
if numberToCreate == 0 then
warn("Not creating any AudioFaders")
connectWires(audioDeviceInput, audioAnalyzer)
connectWires(audioDeviceInput, audioDeviceOutput)
return
end
local lastAudioFader
for currentCount = 1, numberToCreate do
local audioFader = Instance.new("AudioFader")
audioFader.Name = "AudioFader"..currentCount.."_VolumeTesting!"
audioFader.Volume = 3
local previousAudioFader = audioDeviceInput:FindFirstChild("AudioFader"..(currentCount - 1).."_VolumeTesting!", true) -- Edit: Updated to include recursive search
if previousAudioFader then
connectWires(previousAudioFader, audioFader)
audioFader.Parent = previousAudioFader
else
connectWires(audioDeviceInput, audioFader)
audioFader.Parent = audioDeviceInput
end
lastAudioFader = audioFader
print(currentCount)
end
connectWires(lastAudioFader, audioAnalyzer)
connectWires(lastAudioFader, audioDeviceOutput)
warn("Done")
end
createAudioFaders(numberOfAudioFadersToCreate)
end
Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in Players:GetPlayers() do
task.spawn(onPlayerAdded, player)
end
Script #2 (LocalScript in StarterPlayerScripts
)
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local audioAnalyzer = player:WaitForChild("AudioAnalyzer_VolumeTesting!")
print("Starting audio analysis")
task.wait(5)
while true do
task.wait()
print(audioAnalyzer.RmsLevel)
end
Cool update but I faced problem where when im trying to :GetSpectrum()
from AudioAnalyzer
Wired with AudioDeviceInput
it returns empty table.
Hello, there doesn’t seem to be a Volume
property anywhere in AudioPlayer
.
The property cannot be set in scripts either.
on a side note: It doesn’t let me update studio either, button doesn’t work
hey I was wondering if we could make it to where two people can speak to each other if they are in a party and not people who are not in the party with the walkie talkies?
Yes easly with the group property in audio listener and audio emitter
@thom463s Can you confirm your Roblox Studio version? You can find this by going to File > About Roblox Studio
Hello, my issue has been fixed now!
It turns out my studio was outdated, but there wasn’t an auto update so I just reinstalled it.
Theoretically, yes. People would be able to reproduce any sort of sound they want using sine waves, and this would include swear words.
I’ve experimented in this field and wasn’t able to achieve any significant results though. This may be due to issues with the current audio API such as desynchronization, and potentially more things I was unable to uncover.
Here’s a chunk from my attempt at playing 440 pairs of sine waves that were supposed to cancel themselves out:
Would it ever be possible for Roblox to implement a way to record audio streams and replay them at later times? (Without exposing actual audio information other than length and pitches) This could have awesome use-cases such as in-chat voice messages, recording music, etc.
Hey, is there any distance limit to audio emitters? Trying to make this work for a rocket but it just cuts off at a certain distance away from the audio listeners.
There’s an adjustable DistanceAttenuation
that lets you decide at which distances the audio gets louder, quieter, cannot be heard at all, etc.
The announcement thread for that new functionality explains it in more detail:
Yeah but the problem is no matter what we do the sound cuts off at a certain point. We’ve tried the distance attenuation and it still cuts off when it gets too far away from the listener.
Do you have StreamingEnabled
turned on in the game? Maybe what’s happening is that the AudioEmitter
is so far away that it’s being streamed out for the client, which would cause the sound to stop playing.
If that appears to be what is happening, try placing the parent object of the emitter into a Model
and then set its ModelStreamingMode
to Persistent
so it is always loaded for the player.
Hey @panzerv1, we’ve been working on a new Instance type that incorporates a lot of the feedback you gave on the equalizer; keep an eye out for an announcement!
I’m not sure if this question has been asked already since there are a ton of replies, but why is the Volume
property of AudioPlayer
and AudioFader
capped at 3? This is really limiting and feels extremely arbitrary. @ReallyLongArms