Question how to add sound to a scene?

Eaglekun

Well-known member
Messages
99
Reactions
583
Points
83
I add an audio source to a scene right but I dont see how I can link to the mp3 file I want it to play. I feel like this is probably SUPER simple but I cant find an answer.
 
By "default" sounds (mp3,ogg,wav) are placed inside "VAMfolder/Custom/Sounds/..." (you can organize by subfolders:music,sfx,...)

First you need to load/add sound into your scene to be able to trigger/play it.

goto edit Mode > Main UI > Scene Audio > Load (look for your sound effect/song inside "Custom/Sounds/...")

once loaded then you can trigger it to play from AptSpeaker, AudioSource or RhythmAudioSource/RhythmForce (or HeadAudioSource).

example trigger (for AudioSource):
Receiver Atom: Audio Source
Receiver: Audio Source
Receiver Target: Play Now

Clip Type: URL
Clip Category: web
Clip: <your sound>

btw. i mostly use .ogg format (but you can use .mp3 or heavy .wav it's up to you)
 
Last edited:
Upvote 0
By "default" sounds (mp3,ogg,wav) are placed inside "VAMfolder/Custom/Sounds/..." (you can organize by subfolders:music,sfx,...)

First you need to load/add sound into your scene to be able to trigger/play it.

goto edit Mode > Main UI > Scene Audio > Load (look for your sound effect/song inside "Custom/Sounds/...")

once loaded then you can trigger it to play from AptSpeaker, AudioSource or RhythmAudioSource/RhythmForce (or HeadAudioSource).

example trigger (for AudioSource):
Receiver Atom: Audio Source
Receiver: Audio Source
Receiver Target: Play Now

Clip Type: URL
Clip Category: web
Clip: <your sound>

btw. i mostly use .ogg format (but you can use .mp3 or heavy .wav it's up to you)

So quick question how can I make the audio autoplay upon the scene being opened? and not have it rely on a button press for activation.
 
Upvote 0
So quick question how can I make the audio autoplay upon the scene being opened? and not have it rely on a button press for activation.
The are few ways (built-in) no plugins, most common and simple one for single file loop is to use collision trigger.

-add collision trigger move it/collide it with something (example:bed)
and set collision trigger todo same trigger as manual button (if you wanna loop set at PlayNowLoop)
-you can also record empty 3sec scene animation and add trigger there (if you don't wanna use collision trigger)
-there is also option to use animation pattern (no loop+autoplay) and add animation trigger or step2 activation trigger,
but for single file that's least useful in your case
 
Upvote 0
Thanks for the great help from you guys in here. I worked it out myself first using triggers (not good) then using timeline but now I will try logic bricks. Such a steep learning curve! love it!
 
Upvote 0
By "default" sounds (mp3,ogg,wav) are placed inside "VAMfolder/Custom/Sounds/..." (you can organize by subfolders:music,sfx,...)

First you need to load/add sound into your scene to be able to trigger/play it.

goto edit Mode > Main UI > Scene Audio > Load (look for your sound effect/song inside "Custom/Sounds/...")

once loaded then you can trigger it to play from AptSpeaker, AudioSource or RhythmAudioSource/RhythmForce (or HeadAudioSource).

example trigger (for AudioSource):
Receiver Atom: Audio Source
Receiver: Audio Source
Receiver Target: Play Now

Clip Type: URL
Clip Category: web
Clip: <your sound>

btw. i mostly use .ogg format (but you can use .mp3 or heavy .wav it's up to you)
i dont have an scene audio tab, i got the key and activated it.
 
Upvote 0
By "default" sounds (mp3,ogg,wav) are placed inside "VAMfolder/Custom/Sounds/..." (you can organize by subfolders:music,sfx,...)

First you need to load/add sound into your scene to be able to trigger/play it.

goto edit Mode > Main UI > Scene Audio > Load (look for your sound effect/song inside "Custom/Sounds/...")

once loaded then you can trigger it to play from AptSpeaker, AudioSource or RhythmAudioSource/RhythmForce (or HeadAudioSource).

example trigger (for AudioSource):
Receiver Atom: Audio Source
Receiver: Audio Source
Receiver Target: Play Now

Clip Type: URL
Clip Category: web
Clip: <your sound>

btw. i mostly use .ogg format (but you can use .mp3 or heavy .wav it's up to you)
Hi there, I don't have audio source in my menu Button trigger although I have imported successfully an audio file
 
Upvote 0
Old but gold. However, I finally managed to make my head around audio, triggers, assetbundles and stuff. But I always face the problem that only one audio file is played at a time. I can load audio files via the scene and get them triggered, with Logicbricks and assetbundle as well. But it only playes the next file after it's been triggered again. So how can I play my files be it random or not, one after another without having to trigger the next file by e.g. pusing the UIButton again?
 
Upvote 0
Old but gold. However, I finally managed to make my head around audio, triggers, assetbundles and stuff. But I always face the problem that only one audio file is played at a time. I can load audio files via the scene and get them triggered, with Logicbricks and assetbundle as well. But it only playes the next file after it's been triggered again. So how can I play my files be it random or not, one after another without having to trigger the next file by e.g. pusing the UIButton again?
You could possibly do this with timeline. Make different animations with an audio trigger set to the length of your audio tracks, and sequence play next to random.
 
Upvote 0
Origin's way is a bit....cumbersome....

I recommend to use a EventAudioQueueEmpty from LogicBricks. Place it on the AudioSource and it gives you a trigger signal whenever there is no audio playing. So, use it to trigger whatever you use to play audio, like RandomSound, RandomSoundFromAB or SoundFromAB bricks, or whatever other plugin you use. This does also respect the "Delay Between Queued Clips" setting on the AudioSource.

As an alternative to LogicBricks, there is also AudioMate by dub that is specifically for playing music, I think? But I have never used it myself. AFAIK it does actual shuffle of a playlist like your favorite MP3 player would, rather than picking files at random. For long playlists shuffle reduces repetition, since always plays the whole list. For short lists of like 5 entries a random selection (with repetition avoidance like LogicBricks) is better.
Note that AudioMate does not load from AssetBundle, which is WAY slower when loading the scene. If you have 5 audio files, it doesn't matter than much. But if you got a 100 files...LogicBricks "FromAB" bricks will load like 50-100x faster. Meaning seconds instead of minutes.
 
Last edited:
Upvote 0
Thanks @MacGruber for pointing me to AudioMate again. I had a look at it dozens of times but never could it get it work. Maybe I was always confused by the physical triggers (to trigger moan and so on.) For some reasons I finally managed it to work after playing around with it for 2 hours. Now I'm trying your LogicBrick recomendation.

PS: Selecting the files is not an issue with AudioMate. Because you can either load single files or a folder with your audio files. The plug-in handles it and there is no need to go via the SceneAudio Tab.
 
Upvote 0
Origin's way is a bit....cumbersome....

I recommend to use a EventAudioQueueEmpty from LogicBricks. Place it on the AudioSource and it gives you a trigger signal whenever there is no audio playing. So, use it to trigger whatever you use to play audio, like RandomSound, RandomSoundFromAB or SoundFromAB bricks, or whatever other plugin you use. This does also respect the "Delay Between Queued Clips" setting on the AudioSource.
I managed the first part with your Bricks too. Danke.
 
Upvote 0
Origin's way is a bit....cumbersome....

I recommend to use a EventAudioQueueEmpty from LogicBricks. Place it on the AudioSource and it gives you a trigger signal whenever there is no audio playing. So, use it to trigger whatever you use to play audio, like RandomSound, RandomSoundFromAB or SoundFromAB bricks, or whatever other plugin you use. This does also respect the "Delay Between Queued Clips" setting on the AudioSource.

As an alternative to LogicBricks, there is also AudioMate by dub that is specifically for playing music, I think? But I have never used it myself. AFAIK it does actual shuffle of a playlist like your favorite MP3 player would, rather than picking files at random. For long playlists shuffle reduces repetition, since always plays the whole list. For short lists of like 5 entries a random selection (with repetition avoidance like LogicBricks) is better.
Note that AudioMate does not load from AssetBundle, which is WAY slower when loading the scene. If you have 5 audio files, it doesn't matter than much. But if you got a 100 files...LogicBricks "FromAB" bricks will load like 50-100x faster. Meaning seconds instead of minutes.

Used logicbricks +audiosource for the scene music and also followed this to use EventAudioQueueEmpty and RandomSound to add dirty talk to a new busdriver driven scene I'm making. Great stuff, thanks MacGruber! I'll also likely be using your idleposer tutorial to add periodic hand on head and swaying of hips to a busdriver BJ scene modification I've made. You've got solutions for everything!
 
Upvote 0
Origin's way is a bit....cumbersome....

I recommend to use a EventAudioQueueEmpty from LogicBricks. Place it on the AudioSource and it gives you a trigger signal whenever there is no audio playing. So, use it to trigger whatever you use to play audio, like RandomSound, RandomSoundFromAB or SoundFromAB bricks, or whatever other plugin you use. This does also respect the "Delay Between Queued Clips" setting on the AudioSource.

As an alternative to LogicBricks, there is also AudioMate by dub that is specifically for playing music, I think? But I have never used it myself. AFAIK it does actual shuffle of a playlist like your favorite MP3 player would, rather than picking files at random. For long playlists shuffle reduces repetition, since always plays the whole list. For short lists of like 5 entries a random selection (with repetition avoidance like LogicBricks) is better.
Note that AudioMate does not load from AssetBundle, which is WAY slower when loading the scene. If you have 5 audio files, it doesn't matter than much. But if you got a 100 files...LogicBricks "FromAB" bricks will load like 50-100x faster. Meaning seconds instead of minutes.
F***! I'm on this forum a lot and I missed this, and I've been struggling to find a solution for that 😥

Thank you 🙇‍♂️
 
Upvote 0
I tried to add an audio into a scene, but after I loaded the scene audio. It did not show up in the audio source. Did i miss something? Also I do not have the "Play Now" option.

image.png
image2.png
image3.png
 
Upvote 0
I tried to add an audio into a scene, but after I loaded the scene audio. It did not show up in the audio source. Did i miss something? Also I do not have the "Play Now" option.

View attachment 340149View attachment 340150View attachment 340151
The issue here, based on 3rd image.

You are trying to trigger (Add Volume Action) inside AudioSource atom itself.
Those actions are use for when audio clip is playing (or not), for example to change light intesity or color.
 
Upvote 0
The issue here, based on 3rd image.

You are trying to trigger (Add Volume Action) inside AudioSource atom itself.
Those actions are use for when audio clip is playing (or not), for example to change light intesity or color.
Thanks for the help, I think I know how to do now.
 
Upvote 0
What do i do wrong?

In the Main UI Menu in Scene Audio i added a Sound, by clicking on Test, the sound plays
1711626894637.png


Then i added an ApptSpeaker and a UI Trigger Button
Then for the Button i did this Settings

1711627123053.png


When i now click on Test, or push the Button, no sound is to hear

Does anyone have an idea where the problem could be?
 
Upvote 0
What's the volume setting of that AptSpeaker atom?
Do you have any plugins on that atom or elsewhere that may affect volume? (e.g. AudioAttenuation or AudioReverb)
View attachment 349478

Thanks for your quick reply MacGruber

You know what, i was just around in other scenes, then i saw your reply, so i opend again the scene i saved for testing the sound,
clicked intuitive on the button and Booom, the sound played.

Reminds me of Timeline animations that I had imported and that weren't displayed in the Button Trigger Menu until i restarted the scene.
Seems to be a similar problem here.

Problem solved 😅
 
Upvote 0
Back
Top Bottom