Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How can I set up gapless random looping with mutiple sounds?

Hi :) My question is one that I have searched for a few days now, and just cannot find the answer I want. I have a sound cue that has 3 interchangeable sound loops [background music]. The first solution I came across was to have a random loop node that calls the random node in my sound cue to get a random wave file to play, but it has a gap between loops as it says in the soundcue reference. So that does not work for me, I have also tried doing it in C++, checking for when the sound cue finishes playing, then picking a random node, and telling it to play that. This way also has a small gap between playing. I need a way to loop my background music, and when a segment (seperate wave player) finishes playing, to choose another segment, and have it immediately play that without any gap between segments. Either C++ or within the soundcue itself would be perfect.

Product Version: UE 4.14
more ▼

asked Jan 10 '17 at 06:18 PM in C++ Programming

avatar image

6 1 2 2

avatar image E1andri1 Jan 16 '17 at 03:22 PM

Hey, I've got the same problem right now. Either you have your files with a random node and a looping node behind (which results in a gap) or you set your files to be looping but then the random node is accessed only once, so you end up looping the same file over and over again.

How do you actually create random looping ambient sound cues?

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

The Enveloper Node has indeed a Looping segment, but when I set the Loop Indefinitely flag, it stops looping at all, so either I'm using it wrong or it's a bug. Can you verify this on your end?

Maybe, if this node works, this is the solution to the seamless loop

more ▼

answered Jan 17 '17 at 12:08 PM

avatar image

96 6 9 17

avatar image parabreton08 Jan 19 '17 at 01:36 PM

Sorry, but I cannot get the enveloper node loop at all. I can't find any documentation or examples of how to get it to function in this way.

avatar image E1andri1 Jan 19 '17 at 01:40 PM

I just got it to work by specifying Loop Start and Loop End. Also I had to specify the Loop Count and check the Loop flag. If I check the Loop Indefinitely flag, however, it appears to be just a pass through node. So I assume, this is a bug. Maybe one of the staff members reads this. Also I have opened a forum thread about this, but without any response so far.

avatar image parabreton08 Jan 19 '17 at 02:25 PM

What did you specify loop start and end too? Is it beginning of song and end of song?

avatar image parabreton08 Jan 19 '17 at 02:29 PM

EDIT: When playing around with the loop controls, I cannot get the actual song to loop. Whatever I set the duration ends variable to, simply stops the audio playback alltogether. I'm starting to suspect that this looping fucntion is not meant for looping of the song itself.

avatar image E1andri1 Jan 19 '17 at 02:39 PM

I believe, we actually could utilize it for our purpose, if it worked at all, but right now, I guess, it's just broken. I've set it to loop the first 5 (so 0 - 5) seconds of a source file and I wanted it to be looped twice (it's indeed independent as long as you leave the loop indefinitely flag unchecked). That worked but for our purpose we need an infinite loop of the source and as it seems that flag isn't doing anyting but passing the signal through the node. I've read in another post that this node would do what we need, but I can't find the thread anymore. So, if we get the infinite loop to work somehow, that might be the solution to our problem

avatar image parabreton08 Jan 19 '17 at 03:07 PM

I can't get it to even loop 1 time, for any amount of the song. Loop start: 0.0 Loop End 1.0 Loop Count: 2 Only have the loop flag checked, and the loop indefinitely flag unchecked. When I play it it will play the first 2 seconds of the song, and the stop playback. If I change the loop count to 3, it will play for the first 3 seconds of the song, and then stop playback. There is no looping right now, it just plays for a duration of (loops start - loop end) * loop count.

avatar image E1andri1 Jan 19 '17 at 03:11 PM

mh, that's strange... maybe they recommended garbage in the other thread... A friend of mine recommended WWise, there are several free licence forms available... maybe an option for you, not for me, however, as my due date is tomorrow

avatar image E1andri1 Jan 20 '17 at 12:12 PM

WHAT IF we utilize a switch node and let a blueprint in an infinite loop decide which track to play?

avatar image E1andri1 Jan 20 '17 at 12:38 PM

Yes, seems to work... only barely noticable gaps between the tracks on my side seem to be caused by a not perfectly fitting seam... if you want, I can send you my blueprint. needs just little setup

avatar image parabreton08 Jan 20 '17 at 05:21 PM

Yea that would be good, especially if I can set it up in c++

avatar image E1andri1 Jan 20 '17 at 05:24 PM

You should be able to convert my blueprint easily into C++ code. Just write me a pm with your email on the forum, then I'll send you the uasset

(comments are locked)
10|2000 characters needed characters left

Has this been resolved? I have music clips that loop perfectly in Ableton, logic and Soundfirge as well as unreal but when I try to fire off a random succession of them they click at the start.

more ▼

answered Apr 16 '17 at 03:31 PM

avatar image


(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question