#🔊┃audio
1 messages · Page 6 of 1
no that's ok - it makes sense to point this out if that's the case: - can you make an isolated repro which demonstrates this - ideally in new separate project, this have two advantages:
- you make sure you didn't overlook something (like some script changing enabled/AudioSource state)
- you can directly send it as repro from editor
It still isn't working, here is the settings I have.
You have pitch set to 1.01. I don’t think that should result in it being pitched up as much as it is in your original video, but it might. Pitch should be set to 1.0
It’s fixed thanks!
I’m trying to speed up a timeline that includes an audio track. I want the audio to play faster, but without increasing the pitch.
What’s the correct way to do that?
I tried routing the audio source through an audio mixer and applying a pitch shifter effect, but I cannot modify audio mixer effects with webgl build.
Did the 1.01 pitch really cause that? Or something else
Yeah
First thought is: the correct way is to revise the audio track to fit the new timing. But that’s only going to work if the timeline isn’t subject to again change.
But if it needs to be able to change at runtime, then the solution is to break out the audio into separate pieces that play according to events on the timeline
You can’t just play a single audio file and change its playback rate without consequences
Best case scenario without breaking it into pieces is you can change its playback rate without affecting pitch, in which case you will lose samples and it will introduce artifacts and sound similar to when you watch a YouTube video at double speed
But even then I don’t know how you go about doing that in Unity
So best solution is: if it needs to be flexible, then the single audio track needs to be broken into individual pieces that play at the correct time based on the timeline
How does cutting the audio to samples make audio play faster? I want time strech like effect
wait, how do you change the speed in timeline? audiosource pitch is also synchronized?
You can change the speed through code. The pitch goes up if you speed up timeline
anyway, I'll express my stupid thoughts (not a Frontend-expert)
solution 1. Since WebGL build is launched via index.html, you can add HTML <audio> element with preservesPitch property and interact it from Unity/JavaScript.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/preservesPitch
https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html
solution 2. Web Audio API (Unity WebGL audio backend) does not support preservePitch/time-stretching/pitch-shifting feature, so you need own DSP-processing.
Here is a good example: https://github.com/olvb/phaze
You can modify Audio.js inside Unity installation directory, but I am not sure if it will work.
The HTMLMediaElement.preservesPitch property determines whether or not the browser should adjust the pitch of the audio to compensate for changes to the playback rate made by setting HTMLMediaElement.playbackRate.
Interisting. But I think the first one won't work because browser itself isn't adjusting playbackrate with HTMLMediaElement.playbackRate.
I must look into solution 2
I really start to realize that this might be not possible in webgl. Maybe I have to make multiple audiofiles with different speeds and manage loading with addressables
I was wrong, editing Audio.js is a really stupid way.
You can create independent audio system (own AudioContext()) and use as jslib-plugin in Unity.
Check this examples:
https://github.com/evereal/unity-webgl-microphone
https://assetstore.unity.com/packages/tools/audio/estrada-cross-platform-microphone-239889
Hey! I’m new here. Has anyone else found it tricky to create mumbling voices for NPCs?
Would love to hear about your struggles, ideas, or any tips you’ve got!
Unity 6 HDRP
when i plug in a PS5 controller unity gives an error because it tries automatically switching to the controllers speakers, does Unity have API to prevent this happening?
GPT said they implemented API for it and gave me AudioSettings.resetAudioOutputOnDeviceChange = false; but that's not found....
Is this in a build or editor? Unity will swap if the default output changes, see if there is an os setting you can tweak to stop that changing.
If it's a build that's really annoying, might be worth filing a bug.
editor, if it doesnt give issues in a build ill ignore it
was just beginning to deal with couch co-op and plugged a second controller in
curiously i dont get the error when plugging in the first one
I don't think that API exists, chatgpt just making stuff up. The only way around it is to listen to OnAudioSettingsChanged. I guess this could happen in a build actually - but you kinda have to respond to it, if it's what the user is intending to do (change their output).
yeah, i already have code to detect what devices there are, my plan was just to disable that function if it was a gamepad added, then re-enable after initialization of the device
that way it would still auto-switch to earphones and such
Question towards people that have Fmod experience. RuntimeManager.CreateInstance should be cached and not called every time we want to play a sound right ?
Yes. Unless you also release the instance. If you create and release it’s effectively the same thing as PlayOneShot
Otherwise if you just keep creating without releasing you will have a memory leak
It does release but I want to offset the create cost. So pooling the instance sounds like the way to go
Yeah you can definitely do that. That will also allow you to enforce concurrency limit without needing to use the global instance limit in FMOD
Cool beans. Thanks for the confirmation
is there a way to find and log "true volume" outputs by unity at any given moment? like some sort of decibel meter/calculator?
found it. using OnAudioFilterRead() achieves what i want
So my voice actor has sent over some files and I need to normalize them as some are quite and some are loud, Normalize is checked but they 100% are not normalized, any ideas?
(They are .mp3)
So normalize seems to work if I force to mono, interesting
Interesting. Yeah they have taken the effort to make Normalize indented as a sub-item of Force To Mono, which suggests it’s dependent on it being mono. Dunno why that is. Maybe the algorithm implemented is limited to that.
IMO in the future just batch process the normalization in a DAW. Reaper extensions have one (dunno which script bundle) that allows you to specify how you want things normalized — e.g. -23 LUFS-Integrated, which would be a good standard for VO.
For free
Unity's Normalize function performs Peak Normalization (by highest PCM sample value in entire audio file), this is not best solution for VO dialogues with quiet and loud parts.
quick question
i want a software to get some SFX and edit it on audacity if anyone got a good website or software that can provide me some SFX (walking, running, chat, open, etc...) than making it because i dont want to make my house a studio for SFX
I'd recommend Soundly for SFX. It's a monthly subscription but it's good value for money.
There's also a bunch of free libraries by Sonnis here - They make a new free bundle every year for GDC ^^
Appreciate that brother
why i can hear it even when i am not close
Spatial blend is 2D
Only 3D spatial blending attenuated by distance
Additionally if Logarithmic Rolloff is in use and Max Distance is decreased, it will not ensure quietness past that distance, but caps the logarithmic curve to a level, never reaching quietness
true
can i send an audio here for feedback?
Not really as that wouldn't be related to unity
#1180170818983051344 is for asking for feedback but only for unity projects
ye i make sound effects and i need feedbacks is that ok?
If they're in a unity game/application and you post in that channel, I think so
See pinned message.
o h, thanks
so this audio is for just a human walking SFX can be done with animation or just a sound to scare or freak the player in horror game more likely a pre-jumpscare
ex: a player is hiding and he sees the evil char walking infront of him with this SFX
a player is walking normaly and hear the evil char SFX
note: the SFX can be used for player but it will need to be reduced the volume
high volume = spooky or echo
low volume = calm or relaxing
any feedback is appreciated
Hi, does anyone know of a way to generate and play Midi events that has cross platform support (Mac, Windows, Android, IOS)? I tried to Use NAudio.Midi directly, but it seems to only support Windows. Then I tried Maestro MPTK, which worked on Mac, Windows, and Android but didn't play sound on iPhone (I'm trying to get some help on their Discord). I looked at some other plugins, but I couldn't find a plugin that support all platforms. Does anyone have any experience with that? Thanks.
Cool, thanks
Hello, guys! You know, I have one audio source and one audio clip and I want to play this audio source for more than one game objects on my game at their positions with 3D spatial blend. I am not sure how to do it I have 5 doors for example and one audio source for all of them but I want to play this audio source at their position so at doors point/position. I have heard about a method AudioSource.PlayClipAtPoint() but not sure how to implement. If someone could suggest anything and help guys?
Now, I have one audio source that is somewhere in the scene and the spatial blend is 0.5 so 50/50 but I cant achieve this 3D realistic audio because the audio source should be played at the positions of the doors when I am interacting with them.
And data structure like an Array isn't a good practice for this purpose
Why I am hearing it only from the left ear
I already fixed that long time in a new file
Since I waited days for feedback and no one replied so I added things on my own including stearo but in a new file
The name for the function is maybe a bit misleading. What it actually does is create a new GameObject with a default AudioSource component with the passed in clip assigned, plays it, then destroys the object when the clip is done.
https://docs.unity3d.com/6000.0/Documentation/ScriptReference/AudioSource.PlayClipAtPoint.html
I don’t think there’s any built-in way to have a single audio voice play from multiple positions with Unity. That’s something Wwise can do.
Why not? Also what exact result are you trying to implement for the audio behavior? Since you mentioned doors is it that they should all be emitting the room tone from the open doorways?
Or, the player hits a switch and they all open and play the same open sound?
An AudioSource can play multiple clips, but not in multiple positions at the same time
So if you really want to use just one source, you'd move it to the new position each time you need to play a new clip (and likely want to stop the currently playing ones so they don't continue in the new position)
0.5 spatial blends means the audio is only half 3D, and half without any distance attenuation or stereo directionality
🧩 Unity Audio Issue — Need Help
Unity version: 6000.0.53f1
Platform: macOS
Issue: Audio only plays when Loop and Play On Awake are enabled
What I’ve tried:
Audio plays only when Loop is checked
Disabling Play On Awake causes all sound to stop, even when calling PlayOneShot() or Play() manually via script
AudioListener is present on Main Camera
AudioSource is 2D, unmuted, and not set to spatial
Clip is valid and plays in preview
Sound file is .wav, imported clean, Preload enabled
Confirmed via prefab-based and runtime-instantiated AudioSources
Expected: Sound should play once when triggered by script
Actual: It does not—unless looping is enabled or Play On Awake is checked
Looking for confirmation if this is a known issue with 6000.0.53f1 on macOS, or if I'm missing a runtime config/setup.
Yes but that way I will need reference for each game object transform position
In order to move the audio source for the doors sound for example when I am interacting with them I will need to move the audio source to each door transform position
So I will need 5-6 how many doors I have reference
You know I am going to create a new empty project and test this functionality right there with the PlayClipAtPoint method to experiment and test if its working
What's the purpose of doing any of this though
PlayClipAtPoint is the same as instantiating a gameobject, adding an audiosource component to it and changing some settings on it.
Bro I have interactable game objects on my game like light switches, interactable doors and I want somehow to play this audio source at the exact positions of these interactable game objects in order to create 3D realistic audio
Now, I have an audio source that its 0.5 so 50/50 and what I want it to do is when I am interacting with a game object to hear the sound from the position of this game object
with 3D spatial blend that I am going to set it in the component
so 1
But really its hard because I have many of these game objects
and I really have to create an array probably and get reference to each interactable game object
in order to get the transform.position of them
and then use the method playclipatpoint
Each interactable object could have its own AudioSource, which is played by whichever script that handles the interaction
(Or instead of playing the pre-existing AudioSource you use PlayClipAtPoint, or similar)
Yes I dont want to create millions audio sources I have one audio source for light switches and one for doors
interaction
You presumably already have a script that interfaces with the interactable objects
Doesn't seem like playing the audio source at that point would be an issue?
You should be able to get interactables position when something interacts with it. The interactable itself could probably figure out how to play its audio.
First of all, I am going to test it out because for one reason I have tried using this method it didnt work before
Why do you have 0.5 spatial blend in your AudioSource if you want it to be 1, anyway
I had it then I want to change it to 1
I want to create 3D audio
for this audio source
light switches and doors
I can just create 6-7 audio sources
for example and play each of them seperately when player interacts with the doors but this isn't a good practice
I think
Pooling these things can be a very good idea. I wouldn't worry about this until you have something actually working though
I am not sure if you guys understand what I am saying but anyway thank you. I am going to figure it out now I am testing a bit on an empty project
This sounds a bit weird to me
You would have a script that can interact with any door, or any interactable type object, which would contextually do anything it needs to do, animate, play audio, whatever
I have all of these
Bro I have many scripts
I am trying to do another thing right now
I have like 30+ scripts on my game
each responsible for a different functionality
Hard to explain you wont understand exactly what I am saying but the suggestions are helpful. Anyway, I am going to figure it out based of what you recommended
and my experiments as well
The interaction itself would give you the reference, usually via a physics check, so there's no need to have any references stored in advance
Both doors and light switches could have their respective component that implements an interactable interface, but calls different methods from it
oh thats a point
It has nothing to do with audio though, from the sound of it you may have issues both playing audio and with your component structure
I will probably play the audio source for the interactable game objects at the position of my interaction ray where I am doing raycast
Or on the door? It should be just as easy
No on door wont be because I will need reference to each of the game objects
I will need to get the transform of each door
so probably creating an array that way with ray I need only one reference
probably better practice
That sounds pretty terrible
Don't you have a separate door script instance on each door?
I have yes script that triggers the functionality of the doors
like the animations and more
when player interacts
I have one script for all of them
The script that handles the animation should be able to also handle audio without issues
I didn't say the opposite
Yes of course
The problem here is that I need a reference point
Anyway, you presumably don't have "millions" of doors so there wouldn't be that many AudioSources either if each sound-emitting object had one
Making a custom pooled audio spawner similar to PlayClipAtPoint is good practice, but if that's the only thing that allows your scripts to play audio where needed your code has bigger structural issues
Reference point being position of the door, right?
My code is fine I have written everything and everything works as expected small imperfections
If you can animate the object, surely you can get enough information about it to play audio without hassle
In order to get a reference bro for a door position dont you need to do something like for example door.transform.position at the parameter of PlayClipAtPoint
So, I have more than one of these interactable game objects
Sure, but how are you animating the object? If you can access any component of the object, you can access its transform.
I wont really mess with more than one references or even create an array
I have a ray and probably will play the audio at the position of the ray or maybe I cant create an empty game object as a reference
I'd have a door prefab with a collider, renderer, animator, audiosource and a Door script that implements an interactable interface
Player's raycast checks for colliders and ties to get the interactable interface, calls Interact() if it finds one
Then the Door script animates and plays the sound on the audiosource it has, or instantiates a new one in its own transform position (with offset if needed)
No need for any stored references
Getting the position for the audio in this scenario is less than trivial so if that's an issue it does not sound like your code is fine
Same deal for a light switch, if it implements the interactable interface and does whatever a light switch needs to do, the player's raycast doesn't even have to know what it's interacting with
The code channel can help more with that side of things
If you have issues with the audio playing wrong in some way you can provide more information about that
@quasi hound Hey! I have a question. AudioSource.PlayClipAtPoint() is a static method right? It doesn't require an Audio Source component in order to play a sound that way I cant change the spatial blend and I cant hear it as 3D. Why this is happening and how I am supposed to change the spatial blend for the audio source? Its a bit confusing because I dont have an audio source in the scene and it actually plays a sound
Why is it playing the sound that's my question?
It says that it creates an audio source
Nevermind I found the solution it works I just attached another game object to it
@hushed summit
So no, it does not require anything attached
It does also not give you any direct reference to the instantiated audiosource so there's no practical way to change its settings
Iirc it had full spatial blend by default, but not sure
One of the reasons why it's often worth it to create a custom method that does the same thing but also includes the reference so you can configure the audiosource before playing it
Yeah there are limitations to using this method and you’re better off creating your own version of it, preferably using an object pool if you want to have more optimal performance
But, if you don’t want to bother with the object pool for now, you can still just create your own version of this same type of behavior that allows you to parameterize more things for more control
I.e. — Instantiate new GameObject with AudioSource component with desired clip, configure AudioSource however you need, play it, set it to destroy when it’s finished
Once you have that figured out then you can refactor it to use pooling instead of a instantiating/destroying
Sasquatch B covered this pretty well. It’s not perfect but should get you started.
Show your Support & Get Exclusive Benefits on Patreon (Including Access to this project's Source Files + Code) - https://www.patreon.com/sasquatchbgames
Join our Discord Community! - https://discord.com/invite/aHjTSBz3jH
In this tutorial I'll show you how to add sound effects properly into your game in Unity.
We'll start by making an awesome ...
guys i am looking for a software good for making musics/DAW i need something perfect and suitable for it
Don’t use Audacity
-_- it gave me 91238 softwares i need one not 5 thats why i came here for advanced ppl to give me ONE
Use a real DAW
The main ones in use in the games industry are Reaper, ProTools, Ableton and Nuendo.
Reaper and Nuendo moreso for sound design. ProTools and Ableton for music
help:
Error: Cannot create FMOD::Sound instance for clip (file name) (FMOD error: Error loading file. )
getting this for pretty much every sfx file in the game.
getting this in the build only and not in the editor
didnt get this error in previous builds
no idea what changed to make this error
How are you loading banks and are you sure they’re loaded before you try to start the event?
idk what banks are
That’s a problem
ig.
didnt know what FMOD was until i got the errors
what are banks
Oh so you’re not actually using FMOD for the audio?
i think that unity uses it internally by default but i havent done anything external with it
i just suddenly started getting these errors
any idea as to what could have caused it?
only real audio related thing i changed in the builds was importing new cutscenes but cutscenes in previous builds worked fine
for reference i am using unity 2021.3.3f1
Nah. The error suggests though that there’s a problem with the file though, so first thing my mind goes to is a) what format the files are (like the error is complaining about) and b) how those files are loaded and retrieved before playing
those same files worked fine on previous builds
Well clearly something changed
So you just need to figure out what and hopefully why
let me try disabling the cutscenes in scene 0, the cutscenes are the only audio related thing that has changed
wait i think i found something else
i also added music for scene 0, with a channel for the audio source
im gonna have it be without a channel
will be back in 30 minutes when its done building
OK BREAKTHROUGH
i am no longer getting this error for the music file and it actually works
i am going to change the import settings of the other files and test
ok building it rn
fuck
still getting those fucking errors
i deleted all the mixing channels
still fucking getting them
is there a way to uninstall the default FMOD thing from unity?
i never installed any external FMOD into my project it only uses the native FMOD
still having those issues
i also added music for scene 0, with a channel for the audio source
this deoesnt make sense much... - in any case try undo it
are you using assetbundles ?
it might be unity bug in any case..
no the music is fixed
also not using assetbundles
2021.3.3f1
btw
any idea on which unity file i should delete?
no idea sorry;
what i meant above the sentence you wrote doesnt make sense... are you using audiomixer with music on it (as 'channel' ? )'
in scene 0 it could mean the initializaiton of mixer might be weird - it has some issues when used early often
not anymore i deleted all the mixer channels
It would be a strange error to result from a mixer problem anyway
I had the same thought about asset bundles or addressables. Basically anything other than directly referencing the clip
But if you are directly referencing then unfortunately I don’t know. Never run into this personally. I’ve never noticed Unity mention anything about FMOD in the logs when using the native audio
But I am aware they use some stripped back framework of FMOD for their underlying system
Some important questions remain: what is the audio file extension? And what is the target platform? Asking because it could be that in editor there is support for more file types than for example WebGL
I don’t know for sure that that is the case, but it could be
Or when you’re in editor you have access to the file but you don’t in the web build
And I’m guessing your build is for WebGL since it takes 30 minutes.
target is PC, uses both .wav and .mp3
Well if it’s not that all mp3 clips have the problem but WAVs don’t (in which case the solution could be to just reimport the MP3s as WAVs and compress them in Unity), then it seems like you’re in a spot where you need to track down where exactly the problem started occurring
Hopefully you’re using version control and can roll back to a state where it was working and compare what’s different to try to pinpoint the change that broke it
no version control lol
i have 1 last attempt and if that fail then fuck that project forever lol
And use version control moving forward 😉
i use it for literally every single other project
but this one is multiplayer
so i didnt
im gonna convert all the mp3 files into wav
should take a few minutes but hopefully will fix it
it might be good idea actually; there are many very broken mpegs which fmod cant handle (even new one..)
yeah rn im just re-assigning all the mp3 files to .wav
didnt fucking work
By "re-assigning" what do you mean exactly
going to each audio source in the game and manually changing the mp3 to the wav
Which you converted from mp3 by re-exporting them as wav in an audio editing program?
yes
but im still getting the FMOD error
Should be no issue with the file format part, then
is there a script i can delete from the project
like FMOD related
No
Unless you implemented on such on your own
I guess you could replace the audio backend with an external FMOD or Wwise implementation
But it'd sidestep the problem rather than solving it
And if the problem persists, it'd be more work to solve with more systems on top
im at a dead end then
no idea what to do
Installing audio middleware is an option
But what I'd try first is try to isolate the problem
Make a new project with the same editor version, similar audio source in the scene, and build to the same target
If error repeats, either change and simplify the test with a different audio clip and less mixers or effects or special audio loading techniques if any, or try a different editor version
i deleted all the mixers
Simplifying the setup is good even before you make the test projects
i kinda cant make a separate project though
it runs on photon and i would need a new slot for this which i do not have
how do i use alternatives to fmod
Typically you don't need the whole game and all its assets to repro an issue with specific assets
Although possible it seems unlikely to be related to Photon as afaik that doesn't deal with audio assets at all
yeah but the scripts use photon libraries and if i use photon for the project i need a slot to build it.
what alternatives are there to fmod
That's one thing I would try to rule out with the help of a test project
If the audio problem can be repro'd without those scripts that rules them out as the cause
it is too late for a repo
Repro
Like reproducing the error in test conditions
Moreover if those libraries have some particular methods related to audio loading or playing, I'd share them as a relevant detail
they dont
also previous builds worked fine
its probably a unity bug
which is why i need a different audio solution
fuck it this game is only for my friends anyway and it works fine except for the sfx
Guessing instead of testing rarely leads to the right answer but you can install editor bugfix versions even mid-project and I think you typically should
2021.3.3f1 is years behind from 2021.3.45f1 in bugfixes
thank you for your advice, but this is too late
no it's not; upgrade to latest 2021.3.x there's literally no reason not to
Well, there's ONE reason not to... if you're so burned out on endless, petty bugs from an engine that really should be much more stable by this point. I'll admit that after fighting Unity for a week just to get a sound to fire correctly I've pretty much given up. I made more progress in one night using React and Java.
I'm developing a mobile game for Android and iOS, and I was wondering what the best audio format would be to import into Unity? Considering both music and sound effects.
There seems to be some conflicting information out there. The 2 recommendations I’ve seen:
- Import the audio files as .wav to provide the best quality source audio files, and then Unity will handle the compression or re-encoding of the audio file as needed.
- Import music files as .mp3 to save space (however, doesn’t Unity handle this?), and .wav for short sound effects.
no there's not: it's one download and project opening , there are no breaking changes in .3.x
if it fixes the thing - good; if not, well go back to react
do you have any concrete stories from the trenches to post here ?
Source files should always be the highest quality because the engine uses its own formats and you don't want to re-compress what's already compressed
Because of this the file format in project files don
esn't affect file size in built application
So wav and flac are ideal
If you want to save space in the project files, ogg is the next best option
Also, when re-compressing ogg as vorbis in unity it doesn't seem to cause a noticeable loss in size or quality
I am running intot a bug with the VideoPlayer. I am streaming a video, the visual plays, but the audio does not when the audiosource is set to 3D. Audio does get heard whens the audiosource does get set to 2D. But that wont work for my purposes. Anyone every experience this or no how to resolve?
Are you aware of the listener position in relation to the target AudioSource when the video is playing? Are you sure the listener is within range? Because it sounds like that’s simply the problem.
If it’s 2D there’s no distance attenuation, so that’s why it’s audible.
Like for example the listener is probably on the camera that follows the player character around. When the video plays, the video player screen could be anywhere since it just projects to a screen space canvas to overlay onto the viewport. So if you want to have a 3D AudioSource be audible when the video is playing, you’ll need to either change to a listener that’s near your AudioSource (or detach the same listener from the camera and move it), or put your AudioSource near the listener.
Yes the listner is within range of the 3D space. I did a distance check to verify. This is something that I have been trying to debug for days and could not figure out. I ended up just ripping the audio file from the video and just assigning it to the audiosource and playing it with the video starts. It isnt ideal, but it works.
Anyone has any clue how to dynamically change FX chain in fmod?
is it possible?
You want to change to a completely different chain?
I don’t know for sure but I’m guessing you can’t do that. But you could set up multiple returns with different FX chains
the problem is that I would need 5! different return chains and thats just too many.
What’s the end result you’re trying to achieve?
It’s unusual that you’d need to be changing runtime DSP by that much, from the sounds of it. Might be worth redesigning whatever it is you’re doing
120 chains sounds bit high, for sure
its actually closer to 150
@pale timber @whole pewter I'm trying to recreate a pedalboard and pedalboard order .....
Let’s assume you could change FX chains at runtime (which again is probably unlikely since the effect instances are probably built-in to the events’ metadata) How would you go about changing them anyway? Would it really be any more complex than using the returns?
Either way you probably need a parameter or many parameters for determining which FX chain to use
If the desired result is to mimic a guitar pedalboard, you’d probably want to have all the effects in serial (like a guitar DI entering the SP and then the processed signal exiting the other side), so having it go into one FX chain and enabling or bypassing each effect plugin sounds more appropriate anyway — that’s how a pedal board typically would behave anyway unless you did a signal split at some point to parallelize it before it reaches the output.
Then if you want presets for how that chain should be configured (bypasses or individual parameters on each plugin), then you can use snapshots
Or if you need the user to have really specific control then you have parameters to control whatever you need the user to be able to control
I guess the problem arises if the user needs to also be able to change the order of the serialized effects
If that’s the case then you do indeed have a pretty complex problem to solve and it’s probably worth reaching out to folks at FMOD directly for advice
Guys i made a sound manager but is it okay to use sometimes audio source on objects?
i had to make another script so that it plays the sound at the start of the game and now i want that it has its 3d sound settings and i wanna change the volume rolloff by hand. I guess at this point i have to use audio source on this gameobject
You can change all those from a script, so you don't "have" to use a pre-existing audiosource
But you don't have to use only your sound manager either
Up to you
the thing is i cant change the volume rolloff by hand when its soundmanager. When i play a 3d audio then i create an object so that it can play 3d. But i cant just change it with script thats the issue like i need to do it by hand you know what i mean?
I don't?
Why couldn't you change it with a script
do u see the little points i change it by hand i dont think that we can change that by hand. can we?
You can change it by hand and you can change it via scripts
https://docs.unity3d.com/ScriptReference/AudioSource.SetCustomCurve.html
You can assign any AnimationCurve to it
Which can be generated from scripts likewise
https://discussions.unity.com/t/changing-audiosources-roll-off-via-scripting/431053/10
There's post 10 and 11 generating a logarithmic rolloff curve from a script
but where should i put this animationcurve variable. There is a enum value which has soundtypes in it. And where should the animationcurves stay. Not all the sounsds need animation curve 95% doesnt even need that property
If you're talking about your custom sound manager, that is not something I have any knowledge of
im talking about my custom sound manager
i gave the important infos tho
thats the how my sound manager works
simple
That doesn't tell me much anything
If the rolloff curves are reusable, I'd store them in a globally accessible SO, or if not, directly on the scripts that are calling the sound manager to play sounds
Along with an argument to override the rolloff
public enum SoundType
{
Click,
Jump,
Explosion,
Victory
}
public class SoundManager : MonoBehaviour
{
public static SoundManager Instance;
[System.Serializable]
public class SoundData
{
public string name;
public SoundType type;
public AudioClip clip;
}
public List<SoundData> sounds = new List<SoundData>();
---
it goes like this
If they have to be generated on the fly, the logic to do that would be in the sound manager, and specific arguments how to generate it would come from the component requesting a sound or from the SO that's storing the varieties of sound
An SO is not that different from publicly accessible variables in the sound manager itself, but its neater
oh yeah thats right. I could make a curve inside the script where i call the sound manager. Thats what i was asking for
what is SO btw
ScriptableObject
oh yeah right
is there any tutorials for that?
its kinda a lil hard to do it byself
Which part? I was floating a few different options here
from this part
Well, probably not since it varies largely by why and how you need to generate the curve
so should i make SO's for each of the sounds where needs to get changed the volume rolloff by hand or something like that?
did i understand right?
Well, not necessarily
If you want to make some by hand to use when needed you could just as well make exposed AnimationCurve fields in your sound manager
Everything's done to solve a problem
If you don't know the benefit of using SOs in your script, you'll be unlikely to be able to benefit from them
Sound managers similarly, I assume you know what problem you're solving by having one
im not 100% sure why. The Problem is probably that i have to make an audio source every time and it becomes massy + its hard to find which audio source play rn like etc. right?
and
Bottom line is the same way your sound manager lists sounds, it can list animation curves for rolloff
When one of your scripts calls the sound manager to play a script, they'd include not only the specific sound but also the rolloff curve in the arguments
when i solve a problem, i feel like i could do it better even tho i made it maybe good. That makes me feel like sad and weird
You can have a methods of the same name that take the rolloff curve as an argument, and another that doesn't (and assigns a default one if needed)
I believe that's how Unity does with its methods that have optional arguments
exactly i made that at another issue but now the script become like so messy because there is a lot of functions like same but with new variables. Maybe its not even messy and im overreacting i dont even know it if im overreacting 😭
Well, you can always do better even when you don't realise it
Perfect is the enemy of good
Not to mention the enemy of "finished"
anyone know if valve's steam audio plugin is worth using? it seems pretty nice https://github.com/ValveSoftware/steam-audio
and what does it mean exactly?
has sound occlusion and sound propagation
it's better to get to something you can consider "good" rather than wasting all of your time trying to get it perfect which can be unrealistic
ohhh now i got it ty
i really needed these sentences 😭
ty bro
it's genuinely like one of the most important pieces of advice lol
fr
i try to make something every time like perfect so i spend a lot of time and at the end of the day im not even happy with the product generally
but the question is, its hard to know if it is even good, so how do u know that its good?
yeah sometimes its clear to know sometimes not
btw spazi i wrote this: im not 100% sure why. The Problem is probably that i have to make an audio source every time and it becomes massy + its hard to find which audio source play rn like etc. right?
was I right?
You don't have to know, or care
The thing you're making only has to be good enough to fulfill its purpose
Trying to "improve" it beyond that will slow you down from reaching the project's goals
Knowing how to improve something you made means you're improving, but it doesn't mean stopping to improve it is beneficial
You best learn by sculpting many statues from start to finish, not by getting stuck polishing one statue
Well, often it's well enough that every gameobject that needs to play sounds has the audiosources it needs and scripts to play them, making that part centrally controlled isn't inherently beneficial
But if you're playing a lot of short lived sounds, or sounds that may become detached from their gameobject such as by persisting after they're destroyed, it quickly becomes more convenient to instantiate sounds from one script
It also enables optimization by pooling the audiosources, swapping them easily in one place in editor, or swapping them at runtime contextually
Also opens the potential for limiting, positioning or otherwise managing sound sources that would overlap
Convenience of managing sounds from one place in editor may be enough on its own, but as a drawback every sound emitter has to go through the manager which may add work in situations like these when you want more specific control over the audiosource properties
yeah
should i use audio source for that flies or make a mechanic like that which u talked about?
what do u think?
btw since when do u code or make games in unity, im wondering?
Hard to say because it depends on many things
Ultimately you can rarely know the perfect solution so just go with one and rework later if it becomes an issue
Since 2020
Well i really really apreciate it that you took time to me 🙏
You helped me a lot
Ty
well I tried creating the DSP through code, doesn't really seem to work.
the problem is that with returns it means i need 150 return channels, thats just way too many.
It's not a static pedalboard thats the thing, I want to make it so that you can re-order the pedal board.
I just spend all day with creating the DSP through https://www.fmod.com/docs/2.00/api/core-api-system.html#system_createdspbytype
only to find out that it does not find any channels because you are working on seperate threads.
Maybe you could do it with creative use of nested events. Not sure. Again it’s probably a good idea to reach out to FMOD and ask for advice. I also found Sergio Ronchetti’s YouTube channel recently and he does some long videos with people going over stuff they’ve done with FMOD, so you might be able to get some inspiration there https://youtube.com/@sergioronchetti?si=o9j47joft0fxD68j
Want to prepare yourself for professional work? Check out FMOD Challenges 👉 game-audio-year-one.teachable.com/p/fmod-challenges
I'm also constantly vlogging about my own game audio journey as i build my compnay Double Jump Audio into the indie powerhouse i know it can be 💪
Hope you find all my content helpful!!
Sergio 😁
whilst you are doing this you're also just making any multiplatform builds really hard to achieve, so i booted it for a simpler approach.
Instead of 5 pedals which would make it 5! +4! + 3!+2! solutions which is... a lot
I went to 3 pedals which makes it only 12 different return channels, I dont mind hardcoding those for now since im on a deadline.
might return to it later on.
( just fyi , i had this up as well, but I was just actively working on it hoping i'd come across some type of wizard https://qa.fmod.com/t/is-dynamic-fx-chain-reordering-possible-at-runtime/23201/2)
Hi, guys. I am using events in animation scale to call functions for random footsteps. It works fine, but, as an animation is blending from forward to forward-right, for example, I have an extra call of a function. I tried to use timer but, in this case, I just have a big gap in footsteps sound. Also, tuning animation transitions did not work. Any suggestions?
Iirc animation events are pretty naive about transitions and blending, as they play at the specific time of the clip as long as it has nonzero weight/blend
Rather than playing the sound directly from the method call, I might have the method call check if another was called too short while ago
So, a short timer should generally work
It may also be possible to prioritize only events from the states that have more weight/blend at the moment of the method call
and/or scale the audio volume based on state's weight at that moment
Like to have a timer and check if an event from animation was called to soon and just skip that?
Yes
The script that plays the sounds has a short timer, and the event's method checks for that timer
If you've got a lot of animations that need to blend, and maybe change speed too, like in a blend tree potentially, then events may not be the best option
Could alternatively do contact/ray checks from the foot transforms against ground and play the sound based on the speed the foot actually hits the ground
Yes, I have ray check for foot placement, maybe will consider to reference for that. Thank you!
AnimationState.weight I assume lets you read the current weight of a state
Additionally you can get information and more events using state machine behaviours
AnimatorStateInfo also seems helpful
Though I can't directly say which is the best path to take here, since I've only had to make very few involved state scripts like these
There's plenty of paths to get creative with, though
Thank you!
Hi people. Can someone familiar with the Fmod API explain this to me. In the current project I'm working on the way sounds play is that a new EventInstance is created via RuntimeManager.CreateInstance(soundEffectName); and then that event instance is wrapped in a custom object. For example when playing a one shot sound effect what the code does is it gets a new EventInstance, creates the custom object and then from that object calls _fmodEvent.start() and then immediately _fmodEvent.release(); Now this obviously does not cut off the sound. But now I want to refactor the whole new EventInstance creation into a pool and I do not know what will happen if someone gets it from the pool while the sound is still playing. The EventInstance itself does not seem to have a isPlaying property or anything.
oh there is a public RESULT getPlaybackState(out PLAYBACK_STATE state) { return FMOD_Studio_EventInstance_GetPlaybackState(this.handle, out state); } this seems to be what I'm after
still would be great if someone with experience can actually confirm this.
Yes that is how you know if it’s playing
But also, if you immediately release it (as in release it to the RuntimeManager) it should no longer be valid once it’s done anyway
Cool but I am looking to pool them so I guess I don’t release them at all until the pool disposes
Personally I wouldn’t bother with it, but yeah if you really want to pool the instances then you should not release them.
Think of the release call as “destroy/invalidate once finished”. So if you want to reuse them, you’ll need to not do that until the pool itself is being shut down.
I have determined that creating new ones is a perf issue on mobile.
Interesting. Since you’re pooling is the perf issue coming from garbage collection spikes?
Or is it literally that calling CreateInstance hits performance?
got this audio occlusion setup working pretty well https://streamable.com/8axdvn
It’s mostly the cg but the actual allocation and creation takes times as well since when units start firing we can have up to 50 events per frame the average is about 22
add more reverb (it's a big empty space with hard surfaces...)
it's not bad overall, but sound propagates also over the walls - this looks like it's horizontal only... is it steam audio ?
i mean it will probably work ok for project; the sound not propagating above the wall(s) won't be fully noticed by common/normal player, probably...
oh yeah i’m still workin on making the environment change reverb, it’s not totally horizontal but the walls are just high enough to fully occlude in my system right now
i’m using a combo of navmesh pathfinding to get the distance around corners and direct raycasts
how could i go about having it propagate over the walls you think? without like manually calculating the reflection on surfsces and whatnot
Wow yeah that’s a lot of stuff. You’re aware of event instance stealing in the Studio project, yeah? I just ask because that would be my first thought to use for a scenario like you’re describing
Like you can essentially have pool behavior dictated from within the rules set on the event from the authoring side by setting an event instance limit and stealing
I don’t know this is my first fmod project. It’s also legacy with about 10 years of crunk on it so I doubt we even have the original fmod project
Nobody on the team even knows how to add a sound nor do we have docs from the previous devs 😁
On the sound systems that is there are docs on other parts
i'm not sure tbh! would depend how steam audio handles colliders (but it should be able to since it's supposedly fully 3d..)
oh yeah this isn’t steam audio, it’s a system i’m making myself that sorta emulates steam audio’s propagation, it’s using the built in unity navmesh system
but i could figure smth out!
i could technically just manually adjust the occlusion level of certain walls which would be a kinda dirty but easy fix lol
yea so in that case unity spatializer is horizontal only..
// 3d spatializers modify sound in various (non trivial) ways based also on height ('y axis'), im not sure to what extend is realistic occlusion+propagation entirely present for cases like this..
but chances are it would work good enough..
@pale timber hey I actually found the fmod project. What settings would you recommend for projectile impact sfx? Limit the number of instances and virtualise or perhaps oldest. Oldest seems like a good candidate to ditch for this style of sfx.
@pale timber i think I found a solution 🙂
just use 5 different send that send into eachother and have a labeled parameter for each its that simple lol
Don’t virtualize
Steal
Nice
I don’t know off hand exact naming, but for something like projectile impacts, you want to limit the number to something reasonable (maybe 8) and make the behavior be that if the limit is reached, the oldest instance is stolen in favor of the new instance
Virtualizing is more for loops
Got it
Yeah then what I would do is jump into game with LiveUpdate and see the lowest value you can get away with before it starts to be noticeable
You might be able to do even less than 8
Then you’ll arrive at an optimal number
Oh definitely leas than 8 everyone complains that too much sounds stack up
I’m going to even try with 2
how does stealing work btw? i'm running into the same issue where if there's a bunch of projectile impacts at once (ie from a shotgun) then it just sounds like a muddy mess
Steal oldest means: If the defined limit is reached, rather than allowing a new instance, configure and restart the oldest instance. I’m not sure under the hood if it actually discards the oldest and creates a new one to replace it, or if it actually reuses the old instance, but the result would be audibly the same
gotcha, so almost like object pooling? and if it's over the limit then it stops a bunch of the same clip being laid over eachother
So for example if you have steal oldest enabled and you have a limit of 2, then when the third request comes in while 2 are already playing, the oldest playing instance gets replaced by the new one
You can instead set no stealing, in which case the third instance is prevented from playing until one of the first two is done
You can also set a cooldown, so you enforce a minimum amount of time between concurrent instances
Yeah very much like pooling. It might be doing pooling in the underlying C++ code. I don’t know.
The language that instances are “released” in the C# API suggests that they’re pooled
Stuff like bullet impacts are usually such short-lived sounds that you can get away with enforcing a pretty low limit without actually hearing anything being stolen. And it cleans up the mix.
And it’s more performant since less things get rendered.
Hey all, new to the server. I have been wondering where to post a survey, if it is allowed on this server? The survey is titled 'Game Developer Music Struggles', and the point of it is to ask 5 questions that will help me and other composers understand what game devs want and need for their games, and how to improve on the current offerings from our industry. Also, if anyone is interested about the replies, I am happy to send over the results once they are in : )
a survey link here should be ok, i think
Okay awesome thank you
The server is for unity, which this survey has nothing to do with
has anyone else experienced this problem when importing audio into unity. it works when i have my build profile set to windows, but when i switch to web, none of my audio is importing.
It looks like you are using Unity on Linux and it is missing an installed ffmpeg package for FSBTool (Unity's audio conversion utility)
btw, for WebGL target you can use this method, it does not require conversion. Browsers supports OGG (Vorbis) and MP3 files. (but streaming is not supported, you will have to store all sounds into RAM).
how am i getting an error for FMOD. i thought it was a third party plugin but i got an error for it despite me not having it installed in the project im currently in
cannot create FMOD::Sound instance for clip "" (FMOD error: Unsupported file or audio format. )
UnityEngine.Networking.DownloadHandlerAudioClip:GetContent (UnityEngine.Networking.UnityWebRequest)
nvm, one more google search and i found the answer. also learned something new.
Hey everyone, super new here! I have a React application that contains a Unity WebGL build to create the 3D experience. I'm trying to allow the React app to have access to the microphone, but on iOS Safari the Unity app seems to take over the audio context causing it to return the error "AudioSession category is not compatible with audio capture." when attempting to use the microphone in React. Is there a way to use the microphone in React when using a Unity WebGL build?
Hello, I have a little problem with my SFX and was wondering if anyone knows a solve. I'm working with short sound effects i.e. a UI Button press however every time I enter play mode the first time I try and play the sound it doesn't play then if I leave the game idle for ~4 seconds the next sound effect wont play either, any when else I press it plays just fine.
I have checked to make sure my audio sources aren't busy and I have set the clips I am using to Decompress On Load with Preload Audio Data checked. From what I could dig up online it seems that it may be an issue with the way Unity unloads audio to save memory, I also tried with a longer sound effect and seems that I hear just the end of the sound like some amount of the start is cut off.
Any help is greatly appreciated.
How are you playing the audio on your buttons? To me it sounds like it could be related to the code your using? Does the issue happen in a blank scene with just a audio source using default settings and your problematic sound set as the clip with "Play on Awake"? (or even a simple script that calls .Play from keyboard input)
As for how I’m playing the audio it’s just a simple function I’m calling on my buttons that calls PlayOneShot on an audio source from a pool and I’m assigning it to the on click function of a button. As for testing in a blank scene I haven’t done that no the thought never crossed my mind I will test that now
Ok same issue in a blank scene
Hmm, so it doesnt sound like its related to your code, my next thought would be to maybe see if a different file format could help? (like if your using wav, maybe try mp3 or vice versa) not sure I experienced a similar issue in Unity before, if your sure the audio file itself is not problematic, then maybe theres some mixer/filter or some odd setting affecting the clips
MP3 has the same problem honestly I’ve just gone back to export as an MP3 and I’ve noticed that even in whatever sound editing program I’m using I have that issue there too it’s really strange I’m starting to think it might be related to my pc, It cant be a mixer or filter issue as I’m not using either
I’ve also noticed since I’ve not yet had the luxury of listening to it when it’s this quite that rather than not playing at all it plays a really short really quiet what sounds like a single tone if that gives you anything to go off
Hmm, sounds like maybe a corruption in the audio file? If it happens outside of Unity as well like if you play music on YouTube or through something like VLC/etc, then it could also be your headphones or audio card, but I feel like that would be a more rare case - it would be good to test with a bunch of different audio files, ones you know for sure what they should sound like and test them outside of Unity
It just gets weirder cause I tried using my headphones that are 100% working and get no audio at all from anything
Audio card issue perhaps?
Something strange is definitely going on
It does sound like something strange is going on, maybe you can double-check your audio card drivers and see if it detects any problems? Or maybe your OS settings might be targeting the wrong audio adapter? Or if your headphones use a specific program maybe a setting is turned off there? Aside from that, im not too sure of any other ideas
Hmm I don’t think it could be any of those, I tried the headphones again and got the most crackly horrible sounding audio but some actual audio so for time being I’m going to assume there’s something wrong with my pc rather than my code or the sound itself and see if I can test on another setup, thanks so much for your help though I probably would’ve beaten my head against the wall for ages otherwise
Fair enough, glad I could help in some way, and that sounds like a good way forward, at least you can keep developing and test again later, maybe also try a build to see if its a editor or runtime problem on the different setup
On another note, just thinking ahead, is it possible to get annotation metadata from audio files in Unity? For one game we plan to have a lot of dialogue between characters and I want to setup subtitles but it wont be fun aligning text to audio manually so im thinking the audio engineer can setup annotation markers in their software and re-export the audio files with the annotations as metadata, then somehow I could read that metadata in Unity? I dont have anything setup yet, im just thinking if this would be a good approach to take, if its even possible
Does anyone know a quick way of increasing the volume of multiple MP3 files? Unity wont let me go pass 1 in volume in audiosource so I need to make the clips itself louder
This can't be done in unity
Either use a program like Audacity that allows you to modify the loudness of multiple clips at once
Or may be a possibility to use some program that modifies mp3's loudness via its metadata, or otherwise without requiring re-encoding that loses quality
Not sure if Unity recognizes metadata changes like that
If you end up using some method that requires re-encoding I'd take the opportunity to export as ogg instead as mp3 is kind of terrible
Assign it to a mixer group , from there you can increase by +20. Also mp3 is a compressed format which adds other problems mostly around quality loss , but in your case you cannot turn the mp3 without re-encoding.
this is one of the clearest explanations of how audiosource works I've ever read .. haha .. great job !!
!collab
:loudspeaker: Collaborating and Job Posting
We do not accept job or collab posts on Discord.
Please, use Discussions to promote yourself as job-seeking, advertise commercial job offers, or look for non-commercial projects to participate in:
• Collaboration & Jobs
So, I've set up a footstep system that uses physics materials across different surfaces (meshes and terrain).
For some reason, when I move from the terrain to a mesh, the sound doesn't change back to the previous surface.
Can anyone help me figure out why this is and if there's a way to fix it.
Hard to advise without seeing code or relevant components
Hello, quick question, in Unity is it possible to create an audio effect that changes in tone during gameplay when an input is held. For example say a character was to say the exact the same dialogue lines but just by holding an input the player is changing the tone of the character at runtime?
I asked in unity talk earlier and was referred to here, I'm not planning to implement this in my game, just wondering if it's possible.
I thought of swapping out audio clips, but heard that might be not the best way to do it, so just wanted some insight
Tone?
Maybe audiosource pitch
Like say you had a character who would say the exact same line, but depending on if you held an input or not, the tone of voice would be different. Like say with no input it's normal, but with the input it's more monotone if you get me.
Does the "monotone" need to be a procedural effect or can it be another clip, and does the change need to happen on the fly while the clip is playing?
I understand if this is hard to answer, just wanted to know if you could do that, I'm not implementing this in a game but instead was wondering if I could include it as part of the limitations of the game I made for my dissertation project.
And preferably on the fly, was just wondering what sort of way you could do that if possible
Like I assumed you'd have to swap out clips in run time, but I heard in the unity talk channel that's inefficient
"Not the best way" rather than "inefficient"
But I don't know why it would be either
I'm still not 100% sure what you mean exactly
If you need to play another clip depending on input, that's easy by swapping to another clip or with the help of another audiosource
If you also need to interrupt the clip that's playing and start the alternate clip from the corresponding playback time, or even crossfade between them while syncing them that's also possible but not very easy
Audio middleware would make that task and related tasks pretty easy, which is why they're popular
Audio middleware?
And sorry what I mean is that just have the effect so that the character would still be saying the same line, but just in a different tone, and this affect would happen on the fly. My guess is that this would have to be through playing different audio clips by crossfading like you said.
It's all good, I appreciate the input
Fmod or Wwise
I think (hope) we are on the same page at this point, however the wording here is not any more exact or descriptive than earlier
Ok so essentially I want the audio of the NPCs dialogue to react to gameplay, the player's input, where by the player's input it would change the tone of the audio.
If the input is not held then the audio of the dialogue is normal.
However if the input is held, then the audio is changed to having a different tone, such as whether or not it's more monotone or could be interpreted as more sarcastic as an example. Is this more clear?
Doesn't seem to unambiguosly answer the most important question if the swap can occur just prior to starting the clip, or also during playback to interrupt the first clip and continue the second clip where the first one was interrupted
the latter, I thought I already specified that by saying it was on the fly, soz.
Also, when swapping the clip while it's playing there's different challenges to deal with if it's meant to be a hard cut or a crossfade
But both are possible
there is no effect which would change "the tone" (he could be playing always both at the same time adjusting their volumes quickly, provided they're the same length; if not it's not trivial and would need also speed/pitch adjustments or something)
It's still not clear if you mean that you have ONE audio recording and you want to manipulate that one recording with code to change the tone, or if you have the voice actor record TWO audio clips with different tone of voice. But assuming you mean two separate audio clips, it's obviously possible one way or another to swap between them, it's just a matter of stopping one clip and then starting another from the same spot where the other ended. In practice voice lines will never match exactly up to millisecond precision so if you just do a hard cut to the other clip there will always be an audible "seam" that you have to hide somehow. Something like fading out the previous clip and fading in the new one, or splitting the clips in chunks so that the change happens between words instead of anywhere
the majority of the work is in preparing both variants to be both ~same length and structurally very similar for easiest usage - and as such slightly offtopic here
actual technical implementation ( playing both clips at the same time and having their volumes fade between each other over short (~100-200 ms) interval with MAX - v and v volumes where v changes from 0 to MAX) is basic scripting then...
You need to be more specific with your technical description of the outcome you’re imagining. By monotone, do you mean like a robot? Or do you mean with low enthusiasm?
In either one of those cases though, you’d need to prepare two different performances
Sounds like by “changing the tone”, you mean essentially changing the emotion.
There’s no audio processing (other than AI generation I guess) that can take a voice recording of one emotion and make it a different one — middleware or not. You need two different performances — one for each emotion.
[btw https://xkcd.com/1425/]
https://skibidix.com/LusciniaSound/status/1961571989358854302 made something today
Showcasing should be in #🏆┃daily-win or #1180170818983051344
does anyone use sonniss sounds? 27gb of sounds for free with no attributions, i know something is up with it, they gotta be copyrighted or garbage
I have received some selections of Sonniss sounds for free in the past bundled with other stuff. I rarely find it useful TBH, but that could just be due to the small amount of files that I’ve received.
Does anyone happen to have some kind of a free essential soundpack for a first-person more-or-less realistic (by which I mean not cartoony/wacky) game that would include... like... the basic array of sounds, footsteps, sliding, landing from jump, etcetera. Something COMPLETELY freely licensed. Something not necessarily of high quality, just enough to do the jobas a placeholder even?
If you mean the GameAudioGDC archives, they're 240GB in total and nothing's "up" with them as far as I know
If you're wondering why they are being given out for free, the idea is to promote the site and the audio producers on it by giving out select samples from various libraries
It's obviously effective at promotion, even if you weren't planning on spending any money
Chances are that's why you heard about it
The generous offering and non-restrictive terms can be thanked for that
And if you're looking for specific sounds in serious work, the library basically hooks you up sound artists who provide exactly those
By searching the library you can find whose sounds you like the most, so if you need more than just one or two samples for that particular thing that the free library offers from that producer, you know who you'll want to buy more of them from
Everybody wins basically
guitar music
@obtuse vessel Keep it Unity relevant, please. Don't post random things or requests on the server. See #📖┃code-of-conduct
Hey sound folks, Im a designer that don't know much about Wwise and I started reworking on an old school project in order to make some changes for my portfolio, but I faced a few problems.
The major one is that I don't have any sounds at all. The project used WWise and the Soundbanks seems to be missing from the last .zip I had of the project.
So I have installed WWise in order to re-generate the soundbanks myself.
**My problem: **
the project used premium plugins I do not have a license for (obviously)
My questions:
If I uninstall every premium plugins and re-generate a bank I suppose everything will break and not work or will I simply get altered sounds with a few effects missing ?
I assume it must be possible to share the project with a dude that have everything for him to generate the bank for me ? Do I only need to share the "Wwise projet" folder w/ the .wproj or I must ask him to install the entire project with the same exact unity version, etc..
Is it mandatory for the **developer **to have the Entire Wwise Project alongside the Unity Project to use its generated soundbanks ?
Can't we have the sound designer export the soundbanks, send them to the developer and they use it inside Unity ?
We're struggling to make it work
No it is not. You just need the Wwise Integration code in Unity and the soundbanks. You may also need the *.wproj file. But you do not need anything else.
You can still generate banks without the premium plugins, but those plugins of course will no longer exist or function. That can manifest in any number of ways depending on what was used and how.
So you will probably want to go through all the warnings about missing plugins and inspect all their uses to decide what to do about them.
Thanks for answering, I will see what I can do
looks like I'm going to be a regular here 🎼
The channel could definitely use some
hey guys, i'm working on a website for creative commons music its super early but if anyone wants to test it out it currently doesnt have download , but that will be installed in the next day or so, and it will be getting a lot more music over time, and willing to take requests, https://bitzbeatstest-mu.vercel.app/dashboard
Music streaming platform - Discover, upload, and share your favorite tracks
ok clicking the song name you can dload the tracks, these are all free till the website is ready to go live
Hello there !
I'm trying to understand how surround audio is working. I have a empty scene with 1 camera and 4 audiosources, placed at various position (front left, front right, rear left, rear right), each one output into a different audiomixer group, so I can vizualize how the audio is propagated. But it seems to result into stereo output not 5.1. Am I missing something ?
Using Unity 6.2, Audio Default Speaker Mode is Surround 5.1.
Thanks
Is it because I have a stereo headset connected right now, not the 5.1 system ?
Just a guess since I’ve never worked with surround in Unity native audio, but you’ll probably want to make sure your operating system’s audio output device is set to output to 5.1.
What I can say is that for example with Wwise, you can have things set up to run as surround, but unless you force it to behave differently, it smartly automatically configures the output to match your audio output device. So in this case if you had a surround setup but your system is outputting stereo, the mix will output as stereo automatically.
Which is probably what you’d want since otherwise you risk just losing audio from it being sent to non-existent output channels.
that's one (last) part of the problem
sources in scene might use given (5.1) speaker setup if they are 3D spatial blend enabled - of which i'm not even sure ( i.e. whether unity can automatically distribute each audio contribution per speaker in 3d & hw used....)
mixer ~~should ~~ can accept each speaker then, but it's not necessary for this to work, strictly speaking..
and yes: unity final mix is always on actual hw output (resp. its capabilities - not sw format set in audio settings <- if they don't match...)
I recently started getting into more complicated stuff in unity like water, but I'm trying to find a way to make the audio sound muffled when you're considered in the water, and idk how to do that...
(the audio is just an example)
Thanks. I set up my 5.1 and then Unity started to output on 6 channels. ❤️
A simple way would be to create an Audio Mixer Group for all effects you want to get muffled and set that as audio source output group, add low pass filter to that group, allow wet mixing and expose wet mix to script, then lastly change it from a script based on listener's submergedness (by position check, trigger, volume or any such)
If you want to change multiple effect parameters at once, you'd transition between Snapshots instead of changing parameters directly
You can also get fancy with senders/receivers, ducking and nested groups if need be
I forgot mixer groups existed 😭
I had fun doing an underwater effect for audio recently for a game jam. Used FMOD tho. The principle is the same as what Spazi mentioned, but a bit easier and more flexible with FMOD.
For this one I did some tremolo and pitch-shifting on an LFO in addition to the low-pass filter to really exaggerate the effect
The server is for Unity development, not for advertising
Got it, apologies - was more looking for feedback - don't expect any sales 😂 Was wondering more how game packs ike this can be made to most useful for integration into Unity etc
But have deleted
You could release it as an asset store asset which can be imported directly into unity
And posted to #1080140002849214464
Hi, just dropped a fantasy exploration music pack for Unity.
If your RPG needs some atmosphere while wandering through forests, towns, or dungeons – this might fit right in.
Like talked about just above, these should be posted in https://discord.com/channels/489222168727519232/1080140002849214464
This channel is for development
FMOD, I'm trying to get the current volume of an FMOD event where the event currently is in the timeline.
Okay, ignore the previous question. I have this command instrument to the value of a parameter, it seemingly sets it in FMOD, but when in Unity and I run, "getParameterByName" the parameter never changes, why?
Is it a local parameter? If so how exactly are you trying to read the value?
It's a local parameter, I read the value from a EventInstance. The thing is, in FMOD, the changing parameter can be used and it DOES change, when reading it through getParameter, the value STAYS as it's initial value.
Try reading the result of the eventInstance.getParameterByName call to see whether it’s returning anything other than RESULT.Okay or whatever the success enum value is (I don’t remember off hand)
Because it returns a result enum value
Already did, it returns OK
Okay and what does IsTalking do on the event?
Nothing, the point is that I can change a parameter in the event, and read it from a script.
Okay. I don’t know for sure but the event MAY need to have a parameter sheet or something on it actually implementing the parameter. I would assume in that case if it doesn’t implement the parameter that it would return a result other than OK, but I don’t know for sure
It does have a parameter sheet, if I recall correctly.
Then, you will want to also make sure this isn’t a simple race condition where you’re trying to read the value before it’s being set to the value you expect it to be
I'm also sure of that, I check the parameter every frame and it never changes, but in FMOD, it changes constantly throughout the event.
Maybe share the full script for better context?
It does sound like everything required is being done but clearly something is missing.
I'll send it, but give me a little bit, thank you for the help so far. This has been an awful little problem lol.
So perhaps silly question...what is FMOD
here is the script.
Okay and AudioManager is some wrapper for RuntimeManager?
I guess it doesn’t really matter since it is apparently returning a valid EventInstance.
Yeah, if you need to know, this is the AudioManager CreateEventInstance function:
Okay that’s straightforward. And again you’re positive that the parameter is implemented in some way on the event represented by the EventReference?
I’m not sure if it having a nested event which implements that parameter would count either
On the left indicates that it is, right?
Yep
And maybe silly question, but you saved and rebuilt the banks after setting this stuff up in FMOD, yeah?
Okay and there’s nothing else that might be setting the parameter in Unity?
Nope
This should definitely be possible
This is simply a test script, nothing else accesses it.
Okay can you show the parameter preset window?
Basically we want to make sure that the “hold value during playback” option is NOT ticked for the parameter
This?
I was confused with what that option did, so I tried both on and off, and neither made a difference, so I just left it off.
Yeah in this case you definitely want it off
Okay and again this is the actual event represented by your EventReference? Or is the EventReference an event with this event nested inside?
There are no nested events that I can see, I've never used them before, but I don't see that I believe.
Oh and yes this is the actual event represented
Alright then I am pretty stumped, but there is clearly something we are missing. What you are trying to do is definitely possible.
Can't I do it like with AudioSource.Volume? Kind of without code?
It seems to change something, but immediately reverts back.
Well, the reason I'm questioning if it's possible, is because of this: This is what it looks like when I manually change the value.
But when it changes via the command instrument, it looks like this:
That's normal.
Could it be that the yellow dot is showing where it "is" but it's not actually changing it
The little yellow dot represents the actual value. The red represents the value you have control over in the FMOD GUI.
On a brand new Unity project, it still does the exact same thing, (returns the parameters initial value). Well this sucks, I really and truly don't know why this is happening.
You definitely can read from a local parameter value on an instance (I have done it many times), so I am not sure what is going wrong in your case.
For debugging, I would suggest getting the event description from the event instance and seeing what information you can print out to verify whatever it might be.
I'll give that a go, thanks!
I have done the same many times too, specifically changing them with command instruments and getting a different value back, is what is not working for me.
@pale timber Sorry for the pings but, are command instruments the only way to change a parameter inside of an FMOD event?
It's the only one that comes to mind.
FOUND IT! EventInstance.getParameterByName also returns a second optional "finalValue", that "finalValue" was actually changing accordingly, YES!
Are there any quick ways to implement subtitles into FMOD? Preferably having an instrument that tells Unity when and where to put a subtitle.
Hey, I wanted to ask if anyone knew how to make Midi music?
Ask a more specific question?
what softwares do I need to make Midi music? how do I get instrument audios for it?
any decent daw should allow you to export tracks as MIDI file of events/notes, but support for this is little bit obscure [e.g. i used an iPad app last time i wanted midi tracks...]
actual sound/instruments has very little to do with MIDI itself.. you'd have to render actual audio yourself afterwards, if you give someone a MIDI file the sounds being produced when playing it in some player will be adhering to some convention in most cases e.g. general midi which assigns channels to some generally used banks on user's machine/system...
As mentioned above, any competent DAW will have MIDI capabilities and VST instrument implementations to produce audio from the MIDI signals you create. This also has nothing to do with Unity, so you should be asking about these things elsewhere.
tysm, sorry for the slow response, tbh, idk what to say lol
Hello, guys! I would like to know if there is a way somehow to isolate a sound. For example, if a player enters a specific room and there is an audio outside of this room to isolate this sound somehow
How are the new voicelines for my zombies?
Each zombie now has randomized voicelines that trigger depending on which animation is playing and their current health state. Of course, I’ll be tweaking and refining them further.
👉 Don’t forget to wishlist BloodState on Steam!
I don’t think with native Unity audio that there is any way to solo a single AudioSource. As a workaround you can route the one(s) you want to isolate to a specific bus in the audio mixer and solo that bus
In fact if it’s something you think you’ll need often you could get creative and make a debug bus and make an editor script to select AudioSources and temporarily assign them to it
Volumes.
Check Unity Learn, there is a whole section on Audio where it talks about audio volumes
Free tutorials, courses, and guided pathways for mastering real-time 3D development skills to make video games, VR, AR, and more.
I found the solution and its called Audio Low Pass Filter.
The solution to this problem is Audio Low Pass Filter its a component you attach to a game object
Its isolating the sounds, so for example if there is an obstacle and the sound is behind this obstacle for example a wall, it will be heard realistically that something is being heard behind the wall.
You adjust the cutoff frequency
There are really many many audio components that I saw like reverb zone
they are all really really cool
to use on your game
If you want to create realistic audio
Could I get some help over this audio issue I'm having
I added some audio to this avatar and it works in unity and in desktop mode but when I load into pcvr mode it stops working I don't know what to do
Current having an issue with exposed parameters not being changable on the audio mixer! Any ideas? I can't find anything online that provides a solution and the documentation hasn't been much help either. ):
audioMixer.GetFloat("Master", out float mixerVolume);
animator.SetBool("isActive", false);
for (float i = 0; i <= -80; i -= 0.001F)
{
audioMixer.SetFloat("Master", i);
Debug.Log(mixerVolume);
}
I've exposed the volume of the master group and then done the above. I don't get the console message for the exposed parameter not existing anymore, so it must be accessing it now, but the for loop doesn't do anything to the volume at all.
Any help would be really appreciated!
Apparently audio mixer relies on game cycles and might not work inside of a coroutine or for loop because of that. Any ideas if this is actually true or if there's a work around to incrementally decrease mixer audio via scripting?
Got there eventually!!
IEnumerator LoadSession()
{
audioMixer.GetFloat("Master", out float mixerVolume);
animator.SetBool("isActive", false);
float currentVol = 0;
float audioFadeStep = 0.025F;
for (float i = 0F; -79F <= i; Mathf.SmoothStep(0F, -80F, i -= audioFadeStep))
{
currentVol = i;
yield return audioMixer.SetFloat("Master", currentVol);
}
int sceneToLoad = UnityEngine.Random.Range(1, SceneManager.sceneCountInBuildSettings);
yield return new WaitForSeconds(4);
SceneManager.LoadScene(sceneToLoad);
}
I appreciate it's probably not the most well written code but it does work.
Why does
if (!thing.isPlaying )
{
thing.Play();
}
Not work properly?
if this runs in update, then isPlaying never turns to true
so it just keeps on bugging out
is this inteded or a bug?
Does thing have an AudioClip assigned to it?
It’s just that an AudioSource needs to have a clip to play otherwise it will never be playing
So if you’re sure you’re referencing the correct AudioSource, and that that AudioSource has a clip assigned, then it should return true when it’s playing. I have never had an issue with this. Most likely there’s something you’re missing.
Actually this just made me think: are you also constantly assigning the clip?
That might cause it to stop playing
I’m not sure about setting the SAME clip, but i know that setting a new clip definitely causes it to stop
Yeah I know about the latter
But it's weird that it would stop it even if it's the same clip
But thanks, that's probably it
hellooo, I've been wondering for some time what are some good ways to create sounds for gamedev, such as basic sounds like footsteps, button click sounds, etc
so far i've used tools like bfxr and audacity, but mainly bfxr because that's way easier, but probably less useful for more complex or unique sounds
i'll probably try using asset store to find some pre made sounds and then weigh my options
ASoundEffect.com is a great shop for paid/pro sound libraries. FreeSound.org is decent for just getting single recordings
not really a music question just an audio one, do you guys know how like the dialouge audio of undertale and stuff like that is sampled?
how do I make buttons play a sound if you hold the mouse onto it, deselect it and when you click it?
An easy way if you’re using UGUI is IPointer interfaces
https://docs.unity3d.com/2018.3/Documentation/ScriptReference/EventSystems.IPointerClickHandler.html
IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler
Then you will have callbacks for enter, exit, down, up, and click
The way I’ve liked doing it in the past is to have all their functions invoke UnityEvents in a custom script so you can just add whatever via the Inspector
And you can use bools to customize/add new behavior
For UI Toolkit there’s probably comparable callbacks you can hook into, but I don’t use it so I can’t say for sure
well now im completely lost
i only started last month :/
What’s the exact behavior you want?
If my mouse is over the button and i click, it makes a sound. once i release (and the button executes OnClick), it plays another sound. And if i release off the button so OnCLick isnt run, it plays a different sound
Okay then you’ll want IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler and IPointerUpHandler
You implement the interfaces by adding them after MonoBehaviour at the top of your script
Once you do you will have compiler errors until you add the required methods
Once you add those methods they will run automatically when mouse enters, exits, presses down and releases the mouse button
So then you can use a bool for like “buttonIsHeld” which turns true if the button is pressed while the pointer is inside the button
And like “pointerIsInBounds” which turns true when the Enter function runs and false when the Exit function runs
So then if (buttonIsHeld && !pointerIsInBounds) you play the sound for releasing when outside of the button
If you’re not familiar with how to use interfaces, just do a quick YouTube search to familiarize yourself with it
ok im having another weird issue that i thought i fixed, only for it to not be fixed and still be very broken in a build...
so... why is it that if i have an audiosource on a gameobject and attempt to play the sound on another script, and that gameobject is destroyed, why does the audio cut out?
The audiosource is the source of the audio
If it is destroyed, the audio it is playing cuts off naturally
it is on a different gameobject
anyways, i fixed it somehow. it might make everyone here cringe but oh well, it works
Wow! New Scriptable Audio Pipeline in Unity 6.3+
https://discussions.unity.com/t/audio-status-update-q3-2025/1681867
Hi Guys, I'm having a problem with my audio sliders.
(I will always refer to the MasterVolume)
so basically the audio slider works correctly with this script but when i close and restart the game, even if the volume is correct the slider in the GUI has a wrong position
Ty to anyone in advance! 🙂
Does wrong position mean that it always stays in the default position or that it moves but to an incorrect position?
default
hope this help to understand the problem
Since masterSlider is only used in the LoadVolume method I'm guessing it's set to a prefab instead of the slider in the scene
yeah
the SettingsPanel is a prefab since i have to use it also in game
and the sliders inside the SettingsPanel prefab are all prefabs
Right so LoadVolume changes the prefab which is a different slider than the one on the scene
You can fix it by making a separate script for the slider that fetches the volume from the MixerManager instead of having MixerManager also manage the UI elements
oh ok, i'll try that and i'll let u know tyvm
If I use fl studio can I send the audio files to the devs?
So they can use it in the game
Sure
Or I suppose that's between you and the devs
I was asking more if its possible, idk how unity works lol, but I know fl studio. Ty for your help!
Fl studio probably exports all compatible formats and more
Tysm!
It sure does
For making a build devs will want an uncompressed or losslessly compressed file format
But they are huge in file size, so for previewing and iterating it can be preferable to use reasonably compressed .ogg files
it worked, tyvm
good to know!
I put my audio on my camera, but when my camara moves near terrain, it sounds weird
Turn off Doppler effect.
awesome! thanks!
And let die an indie tradition to always keep doppler on?
I don’t really understand why Doppler is on by default.
99/100 times you don’t want it
It’s neat, but not really all that practical most of the time
can I turn it off as a default for future sounds?
I don’t know that you can by default. You can make presets and use them
Looks like you can make presets a default setting for that class of component
cool, I'll check it out, thanks!
Hello, can someone help me figure out how to get the DSP Buffer Size to stop being set to 1024 automatically?
I'm trying to reduce latency for dspTime/timelinePosition on FMOD, and from what I've researched, this setting will help me one way or another. Currently, dspTime is being updated every 20ms (10ms with FMOD), but I'd like to reduce that if possible.
I've seen others with this same - [issue](#💻┃unity-talk message), but I haven't seen any responses or solutions for this.
My computer is Windows 11, and I also get the same issue on my Windows 10 laptop. I've seen this on Unity 6, and Unity 2020. Even if you don't have a solution, or if you're not running into this issue, I'd appreciate seeing a screenshot of someone being able to change this setting without this popping up. Thank you
(I also asked on the Unity3D reddit; I've been doing research for a while but I'm out of leads)
remove plugins you're using - it will stop happening %]
The fmod buffer size is in the fmod settup tab no? Not in the project settings. Just making sure that youre not setting the unity audio settings accidently while working with fmod.
Hey. I am working on detailed car engine simulation for my racing game and want to create sound procedurally based on simple mechanical sounds like combustion explosion, turbo whine, pump sounds ect layered procedurally with other effects. For example cylinder count, and its displacement would affect general engine sound and combustion sound will fire accordingly to firing order. How would you approach to implement this idea? Im still new in audio systems inside Unity. I want for now create basic functional MVP and fine tune it later.
I can say one things for sure: for something like this if you use audio middleware it will be a lot easier and faster than trying to cook something up using Unity native audio
What would you suggest from free / noncommercial free solutions? I can pay later closer to the release.
Both Wwise and FMOD have free tiers now below certain revenue thresholds
Take a look at their websites and/or email their reps to get more info
The big thing you should take into account is any licensing fee you do need to pay for the middleware is likely far less than the cost you will pay in time trying to make the systems yourself
And you can make more money or get your money back, but you can never make more time or get it back
This topic might've come up before but how do you recommend someone choose between the two
Especially if they come in asking with no deep understanding or expectations of middleware
In my opinion, the ultra short version is: FMOD for small/indie projects. Wwise for AAA/large projects
There’s a lot you COULD consider to pick the best option for the project but ultimately they serve the same high-level purposes
Wwise has several things about it that make it more scalable than FMOD and better integrated with version control
FMOD has a more intuitive user interface
Things like that. It’s similar to someone asking which game engine they should use
for some reason I thought you said packages instead of plugins; assuming audio plugins, I do have a couple DAWs but haven't used them in a while. I'm not sure what plugins I'd have, but I'll keep it in mind
Thanks. I will try to mess around with my own systems first if it will be to complicated then i roll out with FMOD.
plugins as in unity packages really - that setting can be changed programmatically so my assumption was something you have imported in your project is changing it...
(most often they go/went into Plugins folder in projects...)
ah okay, in that case I tried making a new project and removed everything in the package manager, but the message was still there
ok so this is (partly) expected ( i missed by the operating system in your OP...) - unity's messaging isn't perfect but they're just telling you to what value it is set by default..
.. plus since you're getting the message also for different setting (in your OP) it looks like fmod/unity can't change the value so it falls back to default ( 1024 )
this might be related to your drivers / hw
that's my guess too, but even if I found the issue and changed the setting on my desktop, wouldn't my player have to go through the same process?
if that's the case maybe I should just try to make the best of what I have right now
that will depend on their machine only e.g. if setting best latency is failing for you, it could still succeed on theirs
so you should aim for common ground you can practically work with
that sounds best, thank you!
sorry, I had to fix up my code before I could do some testing. I think you're referring to DSP Buffer Settings/DSP Buffer Length, right?
(pic 1 and 2)
I did try the FMOD settings before, but didn't notice any changes in the query rate when I was calling timelinePosition():
for Editor and Default under Platform-specific, I tried:
DSP Buffer Settings on Auto
DSP Buffer Length at 512, 256, 128, 64
but according to my console, EventInstance.getTimelinePosition() was still returning the song position at a rate of 20ms
(pic 3)
I was able to reach a rate of 10ms with FMOD Callback Handler and changing the ADVANCEDSETTINGS, but trying to go lower than that didn't seem to have any effect:
public class FMODCallbackHandler : FMODUnity.PlatformCallbackHandler
{
public override void PreInitialize
(
FMOD.Studio.System studioSystem,
Action<FMOD.RESULT, string> reportResult
)
{
FMOD.RESULT result;
FMOD.System coreSystem;
result = studioSystem.getCoreSystem(out coreSystem);
reportResult(result, "studioSystem.getCoreSystem");
ADVANCEDSETTINGS settings = new ADVANCEDSETTINGS
{
studioupdateperiod = 10 // even if I set it to 1, it'll default to 10
};
studioSystem.setAdvancedSettings(settings);
}
}
(pic 4)
Lastly, I did manage to get a rate lower than 10ms with Unity's AudioSource by changing the DSPBufferSize in code, but it ended up garbling the audio and the tradeoff wasn't worth it. I think I'll have to stick with the 10ms window and use the Time.deltaTime (until I find a more reliable way of tracking time), even if it's not perfect
Hello, does anyone know a site for sound effects? Like revolver, rifle, shotgun
Boom Library and The Recordist have some of the best gun sound libraries.
An excellent general paid sfx library store is ASoundEffect.com
For free sounds (generally not so great quality but can get the job done for individual layers or unimportant sounds) FreeSound.org
You can also use soundly for free for 3 months and it has some nice free sounds
hey where can i find free commercial sounds?
That's exactly the discussion above you was about
With free sounds, unless you know the author's identity is verifiable, you can never be totally sure if they really are allowed for commercial use
Even with paid content that can be questionable, but if someone has taken your money for the assurance that they can transfer the rights to the assets, they will be on the hook if the content turns out to be stolen rather than you
i have a thruster sound, and i have set it up to loop, but i don't know why it has this weird pauses in between. any ways to fix it?
the trigger for the sound activates when i am pressing left click on my mouse, and the thing is, in this clip, i have been pressing it the whole time
this is the audioclip in question
i think it's an issue with the mp3 itself? it kinda stops a bit before the mp3 actually stops, i will try editing that part out
nah, it's not working. i clipped it shorter, it's just worse
Possible you didn't cut it enough (use a program that lets you see the waveform as you edit the clip), but also possible that the mp3 format is adding its own delay when importing
Use .ogg, .wav or .flac instead
the thing is, i edited it in .wav format using windows in-built recording system which has a trimming option. but then when i put it into the same folder as my other sounds, it refused to get slotted into the Audio manager
We'd have to see the clip import settings in unity along with the waveform preview to get useful clues
But I would tell you outright to instead use Audacity to edit the clip and to export as wav
is there a better editor for sound stuff?
Reaper is probably the "better" option
But Audacity on the other hand is actually possible to pick up and use with no special training
oof
It's more than adequate for this kind of editing
what should i look for? do i wanna edit the audio in a way such that the edited audio has the same amplitude throughout whereas the slope of the waveform remains constant?
First you just want to eliminate the silence gap
Showing an image of the clip in Audacity and after importing into Unity with the waveform would be helpful
Only when it loops gaplessly would you consider editing it to loop seamlessly, if needed
Since we want to know why the gap appears, or to be certain that it won't appear
And in Unity?
wait
If the clip import settings don't show the waveform, click on the nondescript horizontal bar in the bottom of the inspector window
the previous one was the wrong audio file. this is the correct one
i am guessing that i need to edit the silence out near the ends?
Yes
You can highlight by clicking and draging and delete, just like you would with text
it's working thx, i might need to edit it even shorter, cus it does sustain a bit after i release the button
How long would you recommend such types of effects to be?
cus i can hear there's a bit of tearing
You can pause/stop and optionally fade out the audio when playing it, for contiunous sounds the audio length would rarely be connected to the way it plays
but i hear tearing...like weird wahhoooowahhoooo noise when i trim it to 0.05 secs
By tearing I thought you meant non-seamless repetition, but now I don't know what you mean
O_o
it is non-seamless
and cus of that it makes weird sounds
i am loading right now
If its length is 0.05 seconds it'd play 20 times per second
That's high frequency repetition enough that it isn't much of a "loop" but noise
Whether seamless or not
For a looping sound there is no upper limit
The shorter it is, the more likely the repetition will be audible
Usually that's not desirable
If you restart the audio from the beginning each time it plays, then a very long clip would be unnecessary
If you pause or change its volume instead of stopping it, then a longer clip is always beneficial
At least until the file size will become a problem
@solar dust https://youtu.be/OYecGSTqfa4?t=376
This is a very simple and usually perfectly adequate way to create a seamless loop
In a nutshell you cut a part of the end to overlap with the beginning, fade out the cut part, and fade in the original clip in the same time range
holy moly
For a seamless loop you just need it to be as long as you need for it to not be obvious that it’s looping. For something like this you can probably get away with less than 5-10 seconds but it depends on the content of the loop. If it’s mostly consistent noise it will be difficult to hear the looping, whereas if it has pitched content going up and down it will be very easy to hear the looping
That said though, pretty much anything that is less than 1-2 seconds will be obviously audibly looping
And as Spazi mentioned with the 0.05 clip, that is so short that you are getting into territory where it might as well be a click
So then when you loop that it’s going to start sounding like a synth/oscillator
Theres other things you do to help mask sense of repetition. One common method is every time you trigger the loop, seek to a random position in the file and fade in. That is obviously much less repetitive-sounding than always starting at the start of the file
Is there anything to read on how to make subtitles for Unity that are implemented with FMOD?
Okay, ignore the previous question, I figured it out. But, anybody familiar with the PlayableDirector/Timeline (I swear it's related). This is also all related to FMOD. So, how do you get the EventInstance out of one of these? I'm asking this because if I setup an EventInstance outside of the Timeline, it desyncs, so I need the actual EventInstance from the Timeline. Is this even possible?
Idk about getting the event instance from the timeline. But what about using markers? You can get a call-back to markers and their names and maybe use that as a way to subtitle?
However making a marker for each text will be quite obnoxious in the long run
Thanks for the suggestion! This is what I ended up going with. As for getting the EventInstance from the timeline, I just chose to keep the timeline and the EventInstance separate. I kept them in sync by manually updating the timeline's time with the DSP time from the EventInstance.
Hello everyone, I'm wondering if there are additional audio effects available other than the standard ones that come with Unity? [ie. https://docs.unity3d.com/6000.2/Documentation/Manual/class-AudioEffect.html ]. My searching hasn't come up with anything but I'm thinking that is mainly because I'm being shown only audio files when I search for (Audio Effects or Audio FX or Audio Filters). I'm not sure I have the skill to be coding my own in this case unfortunately. Thanks for any thoughts/help.
Audio Mixer has more effects
https://docs.unity3d.com/6000.2/Documentation/Manual/class-AudioMixer.html
also made this
also FMOD is lwk so convenient and idk why I haven't worked with it sooner
How can I find/make an audio for slime walking (more like crawling). Any advice?
Thank you.
hi guys, im recording a wav on android, and when i play it back it is really slow, anyone had this problem?
been trying to hours but it always sounds wrong
record slime, or any other surface or object that is similar to slime, put it into a DAW then arrange it, mix it, and export
or just download some foley sample pack or library
i can make a few btw, we can discuss the price and ill make it, but only if u want tho. up to u
yeah np
btw guys, im a sound designer and a music producer, so if anyone needs something, like some game SFX or UI sounds or just music, let me know! i have experience in music for over 5 years. just DM me what u want and we will discuss it. thanks.
Confused about something
I'm trying assign an audiosource to a videoplayer comp and I don't see the option to assign the audiosource to it? Am I missing something?
The option only seems to appear when I run the scene
Wait nvm found it in the debug options
if you do not have a video clip assigned it will not show up - I think this is because you can assign each track to a specific audio source. So if you are setting the clip through API you will also need to set the source for each track through API
@golden path @hushed herald not a showcase channel. Please read channels description.
my fault
Roger that
Hello, I'm working with FMOD and I'm running into too many sounds playing at once making the audio cutout.
But, this seems to only REALLY happen in the built game and not in the Editor, why...?
Another question is in FMOD there's an option to limit the amount of "Instances", but is there an option to limit the amount that "PlayOneShot" is run on an EventReference if too many are playing?
Not sure I understand the question. The Event Instance limit should also affect PlayOneShot AFAIK
so for example if you have lots of calls for PlayOneShot for a gunshot event and you set the instance limit to 1, you should hear the limit affecting it — only one will be playing at a time
If you want to limit it more granularity than a global limit like what is available in Studio, then sadly you need to make your own logic for that. But, when you PlayOneShot IIRC it returns the instance it creates, so you can use that return to cache instances and implement some limiting behavior. Then that limiting will take place per object.
Per-object voice limiting is something that Wwise has out of the box but FMOD does not
This is what I'm trying to get to work, and it just doesn't. Though, I'm gonna run some more tests now that you semi confirmed that it works, maybe I'm doing something wrong.
what's the best way to downsample audio coming from audiosources? trying to add in an optional sound quality toggle (for stylism, kinda like how pokemon heartgold/soulsilver have the option to switch to gba sounds)
Can anyone explain this attribution instruction? I don't understand how to use it:
Do what you want with them or see the license as "Public Domain Dedication" or "CC0".
How is "do what you want" unclear?
https://en.wikipedia.org/wiki/Public_domain
It really is the simplest type, as it imposes no limitations
Ah. I just found the instruction confusing e.g., "see the license". So it means to actually "check" this license type on Google.
Thanks
For a result that doesn’t sound like trash you’d probably want to process all the audio clips in a DAW with a bit crusher plugin. But also if you take complex audio and just bit crush it, it likely will also sound like trash
So, for the best result you’d want to bit-crush the original wavs for cases where you can get away with only doing that, and for the more complex/noisy sounds you’d want to redesign them using retro synths and possibly also bitcrushing those
There’s a lot of bitcrusher plugin options out there for free, so just find one you like. Here’s one.
The point of the option is slightly to yes, make it sound like trash, thinking of it replicating like an old mp3 player, and how that sounds, it doesn’t really have to sound good as it’s more of a “for fun” kind of option rather than a serious one that should sound good
I mean if you just downsample it, it probably won’t be the result you want
Either there won’t be a very audible difference if you keep the sample rate decently high, or you will lose all the high-frequency content at lower sample rates and it’ll just turn to muddy noise.
But you can try it and see
True, hmm, I wouldn’t want to do the processing to downsample it in a daw though, was thinking more of a runtime effect on the mixer would be better to avoid inflating the file size of the game and to not have to reroute all the audio sources to play a different file, are there any bitcrusher/downsampler plugins that exist for unity?
I don’t know of any. I don’t usually use native Unity audio. But if Unity allows people to make audio effect plugins for the audio mixer, I would not be surprised if one exists
Fair, I mean same, but I figured a mixer effect would be better than baking it into the files themselves, alright, guess I’ll do some searching lol
There may be a way in code you can force audio sources to play back at a lower sample rate, but I’m not sure
Hmm, alright
Documentation looks like you cannot though
https://docs.unity3d.com/6000.0/Documentation/ScriptReference/AudioSource.html
you can reset audio system with different (lower) samplerate at runtime (this will make it run at lower rate for all audio in project)
but it won't help much for the effect you want
I mean that sounds like what I'm after, it'd be a mix of that and a high/low pass filter
I'll look into that, thanks
"see x as y" means to interpret x as y, basically.
it's saying that the license is the same as public domain dedication/cc0
Ah. Thanks!
My audioclip is missing loop time so I can't loop it. It's a wav file
Priority option doesn't seem to make an effect or maybe I don't notice it? Isn't it supposed to decrease volume when I move Priority slider to right side (256).
Priority is not volume. Priority is for culling sounds when too many are playing.
Okay. But I don't get this "culling" part. Could you please help me understand? Basically I want to try it in the scene so I know what it does.
Priority is basically an un documented feature. If you want to test priority lower the project settings max voices to something very low like 2 and then create a test scene with 3 test audio source. Make sure they are all in the same priority group ( # ) or the test won't work.
make sure your test sounds are long enough that they will overlap.
Unclear question bro. Do you mean RIFF WAVE metadata (CUE/Loop markers) in WAV file?
Unity can play such loops (except WebGL build)
ok so i checked my other audioclips and they dont have loop time in their inspector properties either
but they loop fine
it's just a particular set of clips that arent looping
hellooooooo
You will have to provide more information
Hard to just guess what could be off with those particular clips
You could provide the clip with the issue and another one without
And also be clear about how exactly you're playing and trying to loop the clip
There's many different methods
wait how do you see loop time in the inspector .. honest question
Honest question did you even check „loop“ in the inspector
Can I toggle play this audio? This event triggers when I approach the object and press E. There are many functions but it either plays or stops. If I interact again, I want it to do opposite. I'm using Starter Assets provided by Unity.
I thought bool mute could work for this purpose, but it doesn't.
If you add a new script to that GameObject that has a function that toggles between play/stop based on IsPlaying you should be able to call it from there
ok so my update has a isplaying check
it plays once but then doesnt loop
does this mean it's looping but muted?
You're still not giving the information necessary to help you
Or responding to attempts to help
what do you need to know
Like asked before how are you trying to play and loop the clip precisely
Is that really all your script is doing with the audio source?
You were also asked where you see the "loop time" for a clip
And since you have clips that work as you expect and ones that don't, you should show their import settings with their waveform visible
Maybe the "non-looping" clips have silence in them
Yes indeed!
That's why it's important to give precise information, preferably with screenshots or videos when requested
Because it's information you likely need to solve the problems by yourself anyway
Hey everyone,
I just wanted to get some confirmation about looping music in unity. Currently all my music files are in the MP3 format and I'm noticing that when they loop there's an obvious but short pause at the start of the loop(likely due to MP3 padding), is .WAV format the way to go for all music and sound effect files for my game?
And yes I've checked off the looping setting in my games audio source^
Hello, how 3D works?
I have this settings but dont work .. player still hears it even when not in the area
Looks like your volume roll-off doesn’t ever get to 0
Drag the last point on the curve down so it reaches 0
fixed ty 😄
Does anyone have any ideas or help for doing some sound effects? or doing sound design
message to mobile devs: if you are making a music game please consider manually set the sample rate in project settings as devices usually make the sample rate very low if set to auto for some reason
I'm not an expert, but does anyone find it strange there isn't a stock Unity way of changing audio playback speed without affecting pitch? Like for any experts out there, is this an understandable limitation or is the fact that it's not a feature kinda weird in 2025?
I know you can technically change the AudioSource pitch and then use a mixer group with an opposing pitch effect, I'm more talking about something like an exposed playback speed slider on the AudioSource component.
If there is a lightweight asset that does this, I would love to know as well.
It can be already done
I'm not an expert of audio, but I believe what AudioSource calls "pitch" is "speed", or more precisely the sampling rate of the audio clip
Speeding up audio increases both its pitch and tempo, same as a record turning faster than intended
The Pitch Shifter audio mixer effect however is truly "pitch", so there's a technique to change both AudioSource Pitch and Pitch Shifter Pitch in inverse amounts to change the tempo only
https://discussions.unity.com/t/how-i-can-change-the-speed-of-a-song-or-sound/6623/6
Audio middleware options I expect provide per-clip control for pitch, tempo and speed separately, but I'm not sure if they count as lightweight
AudioSource's negative "pitch" actually reverses the playback, which actual pitch would not be able to do
@drifting compass I don't find it strange at all. Expert here and from my perspective that feature is not practical in Unity audio engine.
What you're talking about is more practical in a DAW or specialized playback tool.
My guess is that 95% of games do not need this feature.
I have a script that plays an Audio Clip, and waits for a specific Sample which is a loop point in my audio, then plays another track, but when i input that sample number into my script as the looppoint, it starts way off.
I've already checked the sample rate in audacity, it's 48kHz, same with Unity's import settings, also 48kHz. The file is imported as Compress in Memory, and Compression Format as PCM, but it still fires Like 7 seconds early... What could cause this, and how can i solve this?
When does CurrentLoopTargetSample get set?
Are you sure it’s the correct value?
From the looks of it it’s either that that value is not correct, or the AudioSource you’re tracking is not the one you think it is
this is probably not the best place to ask but I have a question: does the Audio Mixer process effects concurrently or is the effects processing serialized in order of dependency?
I am integrating some native DSP code into Unity and need to enforce serialized access to native resources (I am using the native audio API)
(I am aware of the new audio API introduced in 6.3 LTS but since it's not yet very stable I am not sure if I want to try messing with it, rather than going with my current mixer native plugin approach)
im not sure what you mean by dependency here but groups are processed sequentially, effects in them in order "they were added", if that makes sense - but you can 'see' only your local group's audio in a given effect so im not sure how any processing order plays a role
btw the mixer ('native') API will be there for some time still i guess
i think the new audio API is being updated mainly because of better DOTS interop - but i'm not entirely sure about this (there is some new/enhanced functionality but not sure how it will -- affect mixer, and -- existing game objects APIs..)
!ban 1203053091973501018 bot spam
@ericasmiths banned
Reason: bot spam
Duration: Permanent
ideally in no way..
as an aside: the most disruptive thing for gameobjects would be OnAudioFilterRead removal - hopefully they will leave it, or at worst provide way to keep the callback compatible with the refresh... otherwise quite a lot ( = all ) existing stuff based on it would have to be completely redone -- it's often used since it's very convenient and easy to use from scripting;
// mixer's API changes wouldn't impact existing stuff that much and could be more disruptive since almost nobody relies heavily on custom effects/plugins (- contrary to initial expectations when it was last updated)
hi anyone. Does anyone know if the Unity Store has packs( not so expensive) of Character SFX that are not just Grunts, Growls, but also have plenty of insults and negative talk. This is for enemies i'm lookking for. I can't find any in the unity asset store. They all seem to be Grunts and Growls, and if have dialogue phrases is very few.
hi, what would be the best way to achieve an echo effect on an AudioClip, would it be to have the original the Audio with the desired effect or would an Audio Reverb Filter work too? I've just heard about this component now
Audio filter components, audio mixer effcts, or effect baked into the clip outside of unity
If you just need one it doesn't matter which method you use
They start having advantages/disadvantages to compare if you need the effect for a lot of clips or to toggle or otherwise modify it at runtime
okayy thank you
I don't need any special usages, I'll just play them for dialogues so I think making the audios this way would be better I'll see anyway thank you
Typically you'd have dialogue in their own mixer group, as players like to be able to control dialogue volume separately from other audio, so it would make sense to use a mixer effect for the group
you're absolutely right, I'll do this thank you so much for your advices, you're the best
does anyone know why my sounds in unity are so quiet except for my main sound song?
I have an sfx of a laser but its very quiet when it plays
i dont understand why or how
Have you compared the audio sources to see what was set differently, if anything?
Compqre the waveforms of the clips in the inspector preview, are they different in verical size?
Also see if audiosources have are 3D and if they have different world positions
Can anyone tell me what kind of drum sound to use for the breakcore feel
Hello, i have an issue where i have added an Audio Source to a scene and it works inside the editor, but not when i export a build
any FMOD users here experienced the error in Unity where it hangs on Reloading Domain... during compile sometimes? only way to fix is to ctrl-alt-del
Using an Audio Random Container, is is possible to play a shuffled music playlist on loop and then set it (or the Audio Source) to not loop, causing it to stop after finishing the current song?
Audio source yes, container no - it's an asset which you cant edit/create via script. I can't remember off the top of my head the difference between loop on container and loop on audio source, so try it and see if it does what you want.
Seems like the closest I can get is:
- setting playback mode to shuffle/random
- Trigger to manual OR loop to 1 clip
But it still plays a clip or two after I uncheck loop on the Audio Source, like they're queued up and can't just be removed
And this only happens when the source is given a random container, not a single clip
What indicates that the problem is FMOD-related?
Well, it could be a coincidence, but it began immediately after we integrated FMOD and one of the devs is sure of it. Maybe there are logs somewhere that I could use to confirm…
I ask because I've integrated FMOD into a lot of projects on a lot of different Unity versions and have never had this problem.
If there is a log connecting the integration to the stuck domain reload then maybe we can start to debug.
Ok thanks yeah, this is my 5th FMOD integration and first time experiencing it
Or, try removing the integration and see what happens.
I’m gonna see about generating some logs to see what Reloading domain… is hanging on
The problem is it’s intermittent and only happens maybe 1 out of 20 times
Thanks for your reply
Found this via quick Google search. Have you looked through this thread to see if anyone's comments resemble your situation?
Hi, We recently installed the Hot Reload plugin for Unity (Download | Hot Reload for Unity) which made us change our preferences settings to “Recompile After Finished Playing”. The problem is that when we exit the play mode, Unity tries to recompile and fails to do it because of FMOD. The window “Reloading domain” can’t disappear and ...
@micprice. muted
Reason: Too many messages in multiple channels
Duration: 29 minutes and 40 seconds
breakbeats, most commonly the amen break or the think break
i fw the blu mar ten jungle jungle pack heavy you can find it for free it has a bunch of great sounds for all of that !!!
Thanks man
The short answer is that you need to turn the music down to 0.125 volume maybe even lower.
I know it feel counter intuitive or 'wrong' to set music to 0.125 but try it out and see if you can hear the sfx now
also post a screen shot of the music clip preview so I can see the preview of the music
if your music looks like the image on the left in the clip preview you need to turn it down A LOT , the image on the right is just for refence , that's what the music would look like after you turn the audio source volume down to 0.125
basically you have to 'mix' the sfx and music together using the audio source volume
Hey I play a few instruments and Im looking for a audio editing software with a decent interface
reaper is a great free daw and the interface is fairly straightforward, bandlab is a pretty good free option as well from what i've seen but i've never used it personally so i can't 100% confirm but i'd recommend taking a look at both !!
if you're looking for paid products the most common daws today are FL Studio (which i use), ableton live, and logic pro, but usually it's good to start off with free software just to get a feel for everything
Heyy ! I'm sorry if this is the wrong channel but i have this issue on my project (working with Resonance Audio on Unity 2022.3.6)
It says it can’t support 16 channels. 16 channels implies 3rd order ambisonics. I don’t know Resonance well, but it might be limited to 4-channel first-order ambisonics
that's unity importer error (unity supports max 8 channels iirc)
you can ignore it if resonance can work with the file directly (but within unity context (via audioclip/source) probably not anyway..)
im making a flappy bird game as a beginner, and im trying to add a sound effect when the player increases their score by 1. the sound effect is loaded into the audio generator on the audio source component on the right, but there is an error at the very bottom which says "the variable dingSFX of logicScript has not been assigned"
however, i've assigned it here in a script
any pointers please? thanks guys
fixed it but i dont really understand why lol. the Ding SFX in the logic script component wasn't assigned to anything but i changed it to logicmanager
just drag the audiosource to the dingsfx field in the logic script inspector to asign it, what you are doing in the script is declaring a field, not assigning it to a particular thing
Yeah if wanted to actually assign it in code you’d have some = operator in there
And if you wanted to do it that way you’d most likely use GetComponent<AudioSource>(), but since you can have multiple audiosources on a gameobject it’s better to just assign it with the Inspector
Is there a way to make sounds intentionally clip without being earbustingly loud ?
I tried with the distortion effect and lowering the volume but either it clips and is super loud or it is normal volume and doesnt clip, no matter how i put the effects, that or i didnt do it right.
Anyone has ideas how I could do it ?
Use a limiter
Send the clipping signal into the limiter
In this video you learn what a limiter is, when you need to use limiting and how to use a limiter.
Bx_limiter True Peak vs Fabfilter PRO L2 - Limiter plugin comparison! https://youtu.be/xbc2d-V-kC4
Check out these limiters:
Waves L3: https://waves.alzt.net/Gjmz7V
Fabfilter pro-L2: https://bit.ly/3qv0b7j
Brainworx Bx_limiter true peak: https://...
So use distortion and make it clip on purpose and then slam it into limiter. Then it will have the clipping sound without actually clipping dB
Thank you ! ill try ^^
Make sure to turn down your system volume when you’re doing this kind of thing 😅
yeah i know i learned the hard way when i first tried the distortion xD
okay uh
Is there a way to have a limiter on a specific audio source ? Something like the distortion component
There's not limiter component, is there some package or something i could get on the asset store to have that ? or some other way to do it
sorry for the delay i had to finish something else first-
i managed to do it with a sub group in a mixer specifically for distorted sounds, and the distortion is on the gameobject itself, so i can control which objects are distorted and still keep it all relatively same volume, yippie
duck volume is the limiter and compressor is to keep distorted and undistorted sounds not too far apart in volume
tradeoff is i cant have quiet sounds in that sub group, its basically all the same volume
Oh, yeah really the kind of effect you’re looking for is better done in DAW when you create the asset
Doing it at runtime in engine is trickier, will likely sound worse, and has a performance cost.
You’d only really want to do it that way if you want to have runtime control so different sounds can be processed by the effect or not and changed. You could do that by assigning their bus to the one with the effects on it
But if you have some sounds which you know you’ll always want to sound that way it’s better to just render them like that
yeah, i wanted a way to control it directly at runtime, i think performance should be alright if i dont overuse it ?
i dont really know how audio takes up performance, i should search more about it
It should only be a very negligible performance cost for one limiter, but I’m just pointing out that real-time DSP is not free. It needs to be run by the CPU, so just keep that in mind.
Hi all, I haven't played with audio much in Unity and have a question.
I have a long-ish audio clip and was wondering if there was away of triggering event/methods/coroutines at specific points during the audio as it is playing?
for example, if I get to a part of the audio that has something like an explosion, have that point of the audio trigger something that plays the visual explosion?
Id like to know too, would be pretty useful for dialogue-
there's nothing builtin directly on AudioSource/Clip
you can use playable director + timeline and invoke signal at some time at timeline
or be checking for playback elapsed time of the clip in ~Update and invoke manually this way...
Shout at me all you want, but I asked Grok and came up with the Director/Timeline solution. Works really nicely.
i wouldn't shout - it's a good way to learn (about) tools
with programming you need practice so it usually doesn't help as much as people would think...
It’s not cheap (although if you consider the time spent cooking up your own solution then actually it is fairly cheap), but Koregrapher is a well-known and well reviewed tool to address this exact type of feature.
https://assetstore.unity.com/packages/tools/audio/koreographer-54639
Hi I have a question. Does anyone have any resources on how to make enemy encounter music. And also vertical re-sequencing?
For my thesis-I’m developing an action adventure game. Someone pls let me know 🙇♂️
