#🔊┃audio

1 messages · Page 6 of 1

unborn bolt
#

And I realize this is me being overly pedantic regarding semantics but I can't be the only person who is confused about specifics here, so while not anything major I find it at least a little interesting. Why are there 2 different understandings about what Awake means?

whole pewter
lime crater
#

It still isn't working, here is the settings I have.

pale timber
zinc notch
#

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.

hard gulch
pale timber
#

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

zinc notch
kindred thicket
zinc notch
kindred thicket
# zinc notch How does cutting the audio to samples make audio play faster? I want time strech...

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.

MDN Web Docs

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.

GitHub

Real-time pitch-shifter as a Web Audio worklet, based on phase vocoder techniques - olvb/phaze

zinc notch
#

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

kindred thicket
# zinc notch Interisting. But I think the first one won't work because browser itself isn't a...

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

GitHub

WebGL Microphone module for Unity. Contribute to evereal/unity-webgl-microphone development by creating an account on GitHub.

Get the Estrada: Cross-Platform Microphone package from bluezzzy and speed up your game development process. Find this & other Audio options on the Unity Asset Store.

plucky brook
#

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!

valid charm
#

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....

delicate rivet
valid charm
#

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

delicate rivet
#

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).

valid charm
#

that way it would still auto-switch to earphones and such

inland raven
#

Question towards people that have Fmod experience. RuntimeManager.CreateInstance should be cached and not called every time we want to play a sound right ?

pale timber
#

Otherwise if you just keep creating without releasing you will have a memory leak

inland raven
#

It does release but I want to offset the create cost. So pooling the instance sounds like the way to go

pale timber
inland raven
#

Cool beans. Thanks for the confirmation

tardy pawn
#

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

onyx gate
#

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

pale timber
#

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

kindred thicket
idle hill
#

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

quartz lantern
idle hill
#

Appreciate that brother

worthy yoke
#

why i can hear it even when i am not close

quasi hound
#

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

idle hill
#

can anyone suggest me a cheap microphone Just for SFX

#

Maybe audio

idle hill
#

can i send an audio here for feedback?

quasi hound
idle hill
#

ye i make sound effects and i need feedbacks is that ok?

quasi hound
gritty pine
#

someone knows where i can find free audios?

#

;-;

naive thicket
gritty pine
idle hill
#

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

snow slate
#

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.

snow slate
hushed summit
#

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

hushed summit
idle hill
#

Since I waited days for feedback and no one replied so I added things on my own including stearo but in a new file

pale timber
#

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.

pale timber
#

Or, the player hits a switch and they all open and play the same open sound?

quasi hound
# hushed summit Hello, guys! You know, I have one audio source and one audio clip and I want to ...

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

drifting cipher
#

🧩 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.

hushed summit
#

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

quasi hound
keen pine
hushed summit
#

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

quasi hound
#

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)

hushed summit
#

Yes I dont want to create millions audio sources I have one audio source for light switches and one for doors

#

interaction

quasi hound
#

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?

keen pine
#

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.

hushed summit
#

First of all, I am going to test it out because for one reason I have tried using this method it didnt work before

quasi hound
#

Why do you have 0.5 spatial blend in your AudioSource if you want it to be 1, anyway

hushed summit
#

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

keen pine
#

Pooling these things can be a very good idea. I wouldn't worry about this until you have something actually working though

hushed summit
#

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

quasi hound
hushed summit
#

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

quasi hound
#

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

hushed summit
#

oh thats a point

quasi hound
#

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

hushed summit
#

I will probably play the audio source for the interactable game objects at the position of my interaction ray where I am doing raycast

quasi hound
#

Or on the door? It should be just as easy

hushed summit
#

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

quasi hound
#

That sounds pretty terrible

keen pine
#

Don't you have a separate door script instance on each door?

hushed summit
#

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

keen pine
#

The script that handles the animation should be able to also handle audio without issues

hushed summit
#

I didn't say the opposite

#

Yes of course

#

The problem here is that I need a reference point

quasi hound
#

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

keen pine
#

Reference point being position of the door, right?

hushed summit
#

My code is fine I have written everything and everything works as expected small imperfections

keen pine
#

If you can animate the object, surely you can get enough information about it to play audio without hassle

hushed summit
#

So, I have more than one of these interactable game objects

keen pine
#

Sure, but how are you animating the object? If you can access any component of the object, you can access its transform.

hushed summit
#

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

quasi hound
# hushed summit The problem here is that I need a reference point

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

hushed summit
#

in front of the player

#

Anyway guys I am going to fix it thanks for the help

quasi hound
#

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

quasi hound
hushed summit
#

@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

quasi hound
#

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

pale timber
#

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.

https://youtu.be/DU7cgVsU2rM?si=dVFLMjM_c1G_rC2v

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 ...

▶ Play video
idle hill
#

guys i am looking for a software good for making musics/DAW i need something perfect and suitable for it

pale timber
#

Don’t use Audacity

idle hill
# pale timber Google

-_- it gave me 91238 softwares i need one not 5 thats why i came here for advanced ppl to give me ONE

pale timber
#

Use a real DAW

idle hill
#

i am lf one rn

pale timber
#

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

ripe osprey
#

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

pale timber
pale timber
ripe osprey
ripe osprey
pale timber
#

Oh so you’re not actually using FMOD for the audio?

ripe osprey
#

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

pale timber
#

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

ripe osprey
pale timber
#

Well clearly something changed

#

So you just need to figure out what and hopefully why

ripe osprey
#

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

ripe osprey
#

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

ripe osprey
#

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

ripe osprey
#

still having those issues

whole pewter
ripe osprey
#

2021.3.3f1
btw

ripe osprey
whole pewter
# ripe osprey 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

ripe osprey
pale timber
#

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.

ripe osprey
pale timber
#

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

ripe osprey
#

i have 1 last attempt and if that fail then fuck that project forever lol

pale timber
ripe osprey
#

but this one is multiplayer

#

so i didnt

ripe osprey
#

im gonna convert all the mp3 files into wav

#

should take a few minutes but hopefully will fix it

whole pewter
ripe osprey
ripe osprey
#

didnt fucking work

quasi hound
ripe osprey
quasi hound
ripe osprey
#

but im still getting the FMOD error

quasi hound
#

Should be no issue with the file format part, then

ripe osprey
#

like FMOD related

quasi hound
#

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

ripe osprey
#

no idea what to do

quasi hound
# ripe osprey im at a dead end then

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

quasi hound
#

Simplifying the setup is good even before you make the test projects

ripe osprey
#

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

quasi hound
ripe osprey
quasi hound
quasi hound
#

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

ripe osprey
#

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

quasi hound
# ripe osprey its probably a unity bug

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

ripe osprey
whole pewter
#

no it's not; upgrade to latest 2021.3.x there's literally no reason not to

drifting cipher
#

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.

hot wasp
#

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:

  1. 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.
  2. Import music files as .mp3 to save space (however, doesn’t Unity handle this?), and .wav for short sound effects.
whole pewter
quasi hound
# hot wasp I'm developing a mobile game for Android and iOS, and I was wondering what the b...

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

west vector
#

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?

pale timber
#

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.

west vector
#

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.

wise locust
#

Anyone has any clue how to dynamically change FX chain in fmod?
is it possible?

pale timber
#

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

wise locust
pale timber
#

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

whole pewter
#

120 chains sounds bit high, for sure

wise locust
#

its actually closer to 150

#

@pale timber @whole pewter I'm trying to recreate a pedalboard and pedalboard order .....

pale timber
#

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

tame epoch
#

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

quasi hound
tame epoch
quasi hound
#

Why couldn't you change it with a script

tame epoch
quasi hound
#

You can change it by hand and you can change it via scripts

tame epoch
#

wdym via scripts?

#

like we can make a new value u mean?

quasi hound
tame epoch
#

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

quasi hound
#

If you're talking about your custom sound manager, that is not something I have any knowledge of

tame epoch
#

i gave the important infos tho

tame epoch
#

simple

quasi hound
#

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

tame epoch
#
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

quasi hound
#

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

tame epoch
quasi hound
#

ScriptableObject

tame epoch
#

oh yeah right

tame epoch
#

its kinda a lil hard to do it byself

quasi hound
#

Which part? I was floating a few different options here

quasi hound
#

Well, probably not since it varies largely by why and how you need to generate the curve

tame epoch
#

did i understand right?

quasi hound
#

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

tame epoch
#

and

quasi hound
#

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

tame epoch
#

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

quasi hound
#

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

tame epoch
quasi hound
half igloo
half igloo
#

has sound occlusion and sound propagation

half igloo
tame epoch
#

ty bro

half igloo
#

it's genuinely like one of the most important pieces of advice lol

tame epoch
#

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?

quasi hound
#

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

quasi hound
#

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

tame epoch
#

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?

quasi hound
tame epoch
#

You helped me a lot

#

Ty

wise locust
#

It's not a static pedalboard thats the thing, I want to make it so that you can re-order the pedal board.

pale timber
# wise locust It's not a static pedalboard thats the thing, I want to make it so that you can ...

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

wise locust
#

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.

wise locust
hollow willow
#

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?

quasi hound
#

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

hollow willow
quasi hound
#

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

hollow willow
quasi hound
#

There's plenty of paths to get creative with, though

inland raven
#

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.

pale timber
#

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

inland raven
pale timber
#

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.

inland raven
#

I have determined that creating new ones is a perf issue on mobile.

pale timber
#

Or is it literally that calling CreateInstance hits performance?

half igloo
inland raven
whole pewter
whole pewter
half igloo
#

i’m using a combo of navmesh pathfinding to get the distance around corners and direct raycasts

half igloo
pale timber
#

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

inland raven
#

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

whole pewter
half igloo
#

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

whole pewter
whole pewter
inland raven
#

@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.

wise locust
#

@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

pale timber
#

Virtualizing is more for loops

inland raven
#

Got it

pale timber
#

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

inland raven
#

Oh definitely leas than 8 everyone complains that too much sounds stack up

#

I’m going to even try with 2

half igloo
pale timber
half igloo
#

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

pale timber
#

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

pale timber
#

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.

winged fog
#

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 : )

whole pewter
#

a survey link here should be ok, i think

winged fog
#

Okay awesome thank you

quasi hound
#

The server is for unity, which this survey has nothing to do with

dark wagon
#

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.

kindred thicket
#

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).

gentle pond
#

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.

proven lantern
#

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?

ruby ocean
#

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.

viscid fjord
ruby ocean
ruby ocean
viscid fjord
# ruby ocean 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

ruby ocean
#

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

viscid fjord
# ruby ocean I’ve also noticed since I’ve not yet had the luxury of listening to it when it’s...

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

ruby ocean
#

Audio card issue perhaps?

#

Something strange is definitely going on

viscid fjord
# ruby ocean 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

ruby ocean
# viscid fjord It does sound like something strange is going on, maybe you can double-check you...

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

viscid fjord
#

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

ancient kernel
#

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

quasi hound
# ancient kernel Does anyone know a quick way of increasing the volume of multiple MP3 files? Uni...

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

meager storm
meager storm
silk obsidian
#

!collab

karmic boneBOT
#

: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

bold fossil
#

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.

quasi hound
tidal pecan
#

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

tidal pecan
# quasi hound 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.

quasi hound
tidal pecan
#

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

quasi hound
#

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

tidal pecan
#

Audio middleware?

tidal pecan
#

It's all good, I appreciate the input

quasi hound
quasi hound
tidal pecan
# quasi hound I think (hope) we are on the same page at this point, however the wording here i...

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?

quasi hound
tidal pecan
#

the latter, I thought I already specified that by saying it was on the fly, soz.

quasi hound
#

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

whole pewter
#

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)

eager phoenix
# tidal pecan Ok so essentially I want the audio of the NPCs dialogue to react to gameplay, th...

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

whole pewter
# whole pewter there is no effect which would change "the tone" (he could be playing always bot...

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...

pale timber
#

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.

whole pewter
cobalt kraken
jade ravine
#

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

pale timber
runic perch
#

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?

quasi hound
#

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

obtuse vessel
#

guitar music

naive thicket
#

@obtuse vessel Keep it Unity relevant, please. Don't post random things or requests on the server. See #📖┃code-of-conduct

foggy totem
#

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..

radiant echo
#

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

pale timber
pale timber
#

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.

foggy totem
thin glen
#

looks like I'm going to be a regular here 🎼

quasi hound
dapper comet
#

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

dapper comet
#

ok clicking the song name you can dload the tracks, these are all free till the website is ready to go live

severe belfry
#

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 ?

pale timber
#

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.

whole pewter
#

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...)

tiny rain
#

(the audio is just an example)

severe belfry
quasi hound
# tiny rain I recently started getting into more complicated stuff in unity like water, but ...

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

tiny rain
pale timber
#

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

quasi hound
#

The server is for Unity development, not for advertising

glad fiber
#

But have deleted

quasi hound
tame gale
#

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.

https://assetstore.unity.com/packages/audio/music/exploration-fantasy-action-rpg-music-echoes-of-dead-kings-330097

Layer in the sounds of Exploration - Fantasy Action RPG Music "Echoes of Dead Kings" from nightmaresoundtrack for your next project. Browse all audio options on the Unity Asset Store.

quasi hound
tame jungle
#

FMOD, I'm trying to get the current volume of an FMOD event where the event currently is in the timeline.

tame jungle
#

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?

pale timber
tame jungle
pale timber
#

Because it returns a result enum value

pale timber
#

Okay and what does IsTalking do on the event?

tame jungle
#

Nothing, the point is that I can change a parameter in the event, and read it from a script.

pale timber
#

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

tame jungle
#

It does have a parameter sheet, if I recall correctly.

pale timber
#

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

tame jungle
#

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.

pale timber
#

Maybe share the full script for better context?

#

It does sound like everything required is being done but clearly something is missing.

tame jungle
south portal
#

So perhaps silly question...what is FMOD

tame jungle
pale timber
#

Okay and AudioManager is some wrapper for RuntimeManager?

#

I guess it doesn’t really matter since it is apparently returning a valid EventInstance.

tame jungle
#

Yeah, if you need to know, this is the AudioManager CreateEventInstance function:

pale timber
#

I’m not sure if it having a nested event which implements that parameter would count either

tame jungle
#

On the left indicates that it is, right?

pale timber
#

Yep

#

And maybe silly question, but you saved and rebuilt the banks after setting this stuff up in FMOD, yeah?

tame jungle
#

Yup

#

Is this just not possible in FMOD?

pale timber
#

Okay and there’s nothing else that might be setting the parameter in Unity?

tame jungle
#

Nope

pale timber
#

This should definitely be possible

tame jungle
#

This is simply a test script, nothing else accesses it.

pale timber
#

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

tame jungle
tame jungle
pale timber
#

Yeah in this case you definitely want it off

pale timber
tame jungle
#

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

pale timber
#

Alright then I am pretty stumped, but there is clearly something we are missing. What you are trying to do is definitely possible.

rare matrix
#

It seems to change something, but immediately reverts back.

tame jungle
#

But when it changes via the command instrument, it looks like this:

tame jungle
#

Could it be that the yellow dot is showing where it "is" but it's not actually changing it

pale timber
#

The little yellow dot represents the actual value. The red represents the value you have control over in the FMOD GUI.

tame jungle
#

Ohh, wow then this should work.

#

I'm bout to test in a new Unity project

tame jungle
#

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.

pale timber
#

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.

pale timber
tame jungle
#

I'll give that a go, thanks!

tame jungle
#

@pale timber Sorry for the pings but, are command instruments the only way to change a parameter inside of an FMOD event?

pale timber
tame jungle
tame jungle
#

Are there any quick ways to implement subtitles into FMOD? Preferably having an instrument that tells Unity when and where to put a subtitle.

haughty lark
#

Hey, I wanted to ask if anyone knew how to make Midi music?

bold salmon
#

Ask a more specific question?

haughty lark
#

what softwares do I need to make Midi music? how do I get instrument audios for it?

whole pewter
# haughty lark what softwares do I need to make Midi music? how do I get instrument audios for ...

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...

pale timber
#

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.

haughty lark
#

tysm, sorry for the slow response, tbh, idk what to say lol

hushed summit
#

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

nimble bane
#

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!

pale timber
#

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

south portal
south portal
hushed summit
hushed summit
#

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

warped schooner
#

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

outer trellis
#

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!

outer trellis
#

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?

outer trellis
#

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.

quiet vector
#

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?

pale timber
#

Does thing have an AudioClip assigned to it?

quiet vector
#

yes

#

though would it change anything if I assign it in this loop?

#

(before Play())

pale timber
#

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.

pale timber
#

That might cause it to stop playing

quiet vector
#

Oh

#

Yeah that might be it

pale timber
#

I’m not sure about setting the SAME clip, but i know that setting a new clip definitely causes it to stop

quiet vector
#

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

compact kettle
#

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

pale timber
heady acorn
#

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?

sacred dew
#

how do I make buttons play a sound if you hold the mouse onto it, deselect it and when you click it?

pale timber
#

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

sacred dew
#

well now im completely lost
i only started last month :/

pale timber
#

What’s the exact behavior you want?

sacred dew
#

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

pale timber
#

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

sacred dew
#

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?

quasi hound
sacred dew
kindred thicket
buoyant hedge
#

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! 🙂

eager phoenix
#

Does wrong position mean that it always stays in the default position or that it moves but to an incorrect position?

buoyant hedge
eager phoenix
#

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

buoyant hedge
eager phoenix
#

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

buoyant hedge
stiff wing
#

If I use fl studio can I send the audio files to the devs?

#

So they can use it in the game

quasi hound
#

Or I suppose that's between you and the devs

stiff wing
quasi hound
#

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

raven bane
#

I put my audio on my camera, but when my camara moves near terrain, it sounds weird

raven bane
quasi hound
#

And let die an indie tradition to always keep doppler on?

pale timber
#

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

raven bane
pale timber
raven bane
#

yes, I'll be sure to set it on the prefabs

#

oh? presets, I'll have a look

pale timber
#

Looks like you can make presets a default setting for that class of component

raven bane
#

cool, I'll check it out, thanks!

lilac mural
#

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)

whole pewter
elder sedge
#

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.

simple hare
#

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.

pale timber
simple hare
#

What would you suggest from free / noncommercial free solutions? I can pay later closer to the release.

pale timber
#

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

quasi hound
pale timber
#

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

lilac mural
simple hare
#

Thanks. I will try to mess around with my own systems first if it will be to complicated then i roll out with FMOD.

whole pewter
lilac mural
whole pewter
whole pewter
lilac mural
#

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

whole pewter
lilac mural
#

that sounds best, thank you!

lilac mural
# elder sedge The fmod buffer size is in the fmod settup tab no? Not in the project settings. ...

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

torpid berry
#

Hello, does anyone know a site for sound effects? Like revolver, rifle, shotgun

pale timber
elder sedge
craggy needle
#

hey where can i find free commercial sounds?

quasi hound
#

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

solar dust
#

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

#

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

solar dust
quasi hound
solar dust
quasi hound
#

But I would tell you outright to instead use Audacity to edit the clip and to export as wav

solar dust
quasi hound
#

Reaper is probably the "better" option
But Audacity on the other hand is actually possible to pick up and use with no special training

solar dust
#

oof

quasi hound
#

It's more than adequate for this kind of editing

solar dust
quasi hound
#

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

solar dust
#

@quasi hound this is the mp3 waveform currently

quasi hound
solar dust
#

wait

quasi hound
#

If the clip import settings don't show the waveform, click on the nondescript horizontal bar in the bottom of the inspector window

solar dust
#

i am guessing that i need to edit the silence out near the ends?

quasi hound
#

You can highlight by clicking and draging and delete, just like you would with text

solar dust
# quasi hound Yes

it's working thx, i might need to edit it even shorter, cus it does sustain a bit after i release the button

solar dust
#

cus i can hear there's a bit of tearing

quasi hound
solar dust
quasi hound
solar dust
#

it is non-seamless

#

and cus of that it makes weird sounds

#

i am loading right now

quasi hound
#

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

solar dust
#

i did not think of that

#

what amount of time do you think is optimal for effects?

quasi hound
#

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

solar dust
#

thx for the help!

quasi hound
#

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

#

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

pale timber
#

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

tame jungle
#

Is there anything to read on how to make subtitles for Unity that are implemented with FMOD?

tame jungle
#

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?

elder sedge
#

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

tame jungle
golden crescent
#

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.

tiny rain
#

also FMOD is lwk so convenient and idk why I haven't worked with it sooner

south jay
#

How can I find/make an audio for slime walking (more like crawling). Any advice?

sly crystal
#

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

worldly meadow
#

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

south jay
#

Thanks for help

#

also thanks for the offer

worldly meadow
#

yeah np

worldly meadow
#

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.

knotty obsidian
#

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

delicate rivet
#

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

naive thicket
#

@golden path @hushed herald not a showcase channel. Please read channels description.

hushed herald
#

my fault

tame jungle
#

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?

pale timber
#

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

pale timber
#

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

tame jungle
feral loom
#

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)

burnt violet
#

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".

eager phoenix
#

How is "do what you want" unclear?

quasi hound
burnt violet
#

Thanks

pale timber
#

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

feral loom
pale timber
#

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

feral loom
#

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?

pale timber
#

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

feral loom
#

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

pale timber
#

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

feral loom
#

Hmm, alright

pale timber
whole pewter
#

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

feral loom
#

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

dark atlas
cloud kelp
#

My audioclip is missing loop time so I can't loop it. It's a wav file

burnt violet
#

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).

pale timber
burnt violet
meager storm
#

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.

cloud kelp
#

bump

kindred thicket
cloud kelp
#

but they loop fine

#

it's just a particular set of clips that arent looping

cloud kelp
#

hellooooooo

quasi hound
# cloud kelp 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

meager storm
#

wait how do you see loop time in the inspector .. honest question

hollow osprey
#

Honest question did you even check „loop“ in the inspector

burnt violet
#

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.

delicate rivet
#

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

cloud kelp
#

ok so my update has a isplaying check

#

it plays once but then doesnt loop

#

does this mean it's looping but muted?

quasi hound
#

Or responding to attempts to help

cloud kelp
quasi hound
cloud kelp
#

.Play()

#

and checking loop in the component

#

and also play() is in update

quasi hound
#

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

cloud kelp
#

the ones that work do not have loop time, i checked

#

idk whats going on

cloud kelp
#

wheres the waveform

#

at the bottom? the orange stuff?

#

OH

#

MY CLIP WAS MADE WRONG

quasi hound
# cloud kelp at the bottom? the orange stuff?

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

clear umbra
#

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^

tiny quarry
#

Hello, how 3D works?
I have this settings but dont work .. player still hears it even when not in the area

pale timber
#

Drag the last point on the curve down so it reaches 0

tiny quarry
#

fixed ty 😄

polar steppe
#

Does anyone have any ideas or help for doing some sound effects? or doing sound design

faint shale
#

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

drifting compass
#

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.

quasi hound
# drifting compass I'm not an expert, but does anyone find it strange there isn't a stock Unity way...

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

meager storm
#

@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.

bronze anvil
#

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?

pale timber
#

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

lime lynx
#

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)

whole pewter
#

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..)

silk obsidian
#

!ban 1203053091973501018 bot spam

static sandalBOT
whole pewter
# whole pewter btw the mixer ('native') API will be there for some time still i guess i think t...

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)

cyan dove
#

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.

brittle sinew
#

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

quasi hound
#

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

brittle sinew
quasi hound
brittle sinew
reef drum
#

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

craggy cove
quasi hound
lone harbor
#

Can anyone tell me what kind of drum sound to use for the breakcore feel

cold heron
#

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

prisma bridge
#

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

hushed cloak
#

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?

delicate rivet
hushed cloak
#

And this only happens when the source is given a random container, not a single clip

pale timber
prisma bridge
pale timber
#

If there is a log connecting the integration to the stuck domain reload then maybe we can start to debug.

prisma bridge
pale timber
prisma bridge
#

The problem is it’s intermittent and only happens maybe 1 out of 20 times

#

Thanks for your reply

pale timber
# prisma bridge 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?

https://qa.fmod.com/t/stuck-on-reloading-domain-when-the-preferences-are-set-to-recompile-after-finished-playing/19861

static sandalBOT
#

success @micprice. muted

Reason: Too many messages in multiple channels
Duration: 29 minutes and 40 seconds

jolly thorn
#

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 !!!

meager storm
#

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

haughty mauve
#

Hey I play a few instruments and Im looking for a audio editing software with a decent interface

jolly thorn
#

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

dapper hull
#

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)

pale timber
whole pewter
#

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..)

lyric verge
#

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

delicate rivet
#

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

pale timber
#

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

kind aurora
#

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 ?

pale timber
#

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://...

▶ Play video
#

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

kind aurora
#

Thank you ! ill try ^^

pale timber
#

Make sure to turn down your system volume when you’re doing this kind of thing 😅

kind aurora
#

yeah i know i learned the hard way when i first tried the distortion xD

kind aurora
#

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-

kind aurora
#

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

pale timber
#

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

kind aurora
#

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

pale timber
#

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.

winged canopy
#

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?

kind aurora
#

Id like to know too, would be pretty useful for dialogue-

whole pewter
#

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...

winged canopy
#

Shout at me all you want, but I asked Grok and came up with the Director/Timeline solution. Works really nicely.

whole pewter
#

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...

pale timber
viscid kite
#

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 🙇‍♂️