|
Post by WildStyle on Feb 14, 2017 18:43:44 GMT
Great system - just switched from another audio solution to this one and am really liking it so far!
One things that seems to be missing, or at least I cannot find an easy way to do it yet. That is to play a chain of audio until you get to a clip that loops and then just stay on that one (looping). Of course if you enable 'Looped Chain', that will disable looping on items.
[ Audio Clip 1 -- sound (intro)] ----> [ Audio Clip 2 -- sound (looped)]
Sometimes it's good to have the first sound with a smooth transition into a a second looping version, or into a looping portion of the same sound file. 'Fabric Audio' does this by using loop markers, so if they are present in an audio file you can enable the loop markers and the sound can then start and go into a loop (if the settings are enabled).
How can we do something like this with Master Audio? Not sure its possible to add a variation of 'Looped Chain' that allows the looping on clips, so you could do what I'm explaining above? Although perhaps there is a technical reason you don't allow this, I'm not sure.
Anyway, please let me know, and thanks for any help!
// WildStyle
|
|
|
Post by DarkTonic Dev on Feb 14, 2017 18:51:07 GMT
Looped Chain won't be able to do it, you're right.
It requires code right now, although there's a feature on the roadmap that would make this work without coding when it's complete.
Basically you need to subscribe to the SoundFinished event of the PlaySoundResult and play the 2nd clip then. Code would be like this:
var result = MasterAudio.PlaySound3DFollowTransform("IntroSoundGroup", otherParams); if (result != null && result.ActingVariation != null) { result.ActingVariation.SoundFinished += delegate { MasterAudio.PlaySound3DFollowTransform("LoopingSoundGroup", otherParams); } }
And yes they could both be in the same Sound Group. There's another parameter of the PlaySound methods that accepts an optional Variation name.
I have no clue how Fabric does loop markers unless they create another sub-clip at runtime, although I'm going to investigate that and it's on the roadmap.
|
|
|
Post by WildStyle on Feb 15, 2017 10:44:21 GMT
Cool - thanks for the update and tip on the coding for a solution.. will give that a try.
FYI - the loop markers on Fabric are added externally when you are editing the audio file, in your preferred DAW. Then Fabric can detect them if they exist and feature is enabled in the Unity > Fabric properties sheet.
// WildStyle
|
|
|
Post by DarkTonic Dev on Feb 15, 2017 16:58:23 GMT
Yeah, I tried to find a Unity API that would read markers in a file, but didn't find anything...
|
|
|
Post by rolandmaker on Nov 30, 2020 4:28:06 GMT
Hi there. I'm after the same thing and have tried the code method suggested here as well as using the 'Stop' Linked Group. With both methods, there is a short gap between the intro and the loop. Is there any way to avoid this or crossfade between the two clips?
Thanks, Roland.
|
|
|
Post by DarkTonic Dev on Nov 30, 2020 5:59:50 GMT
Hi there. I'm after the same thing and have tried the code method suggested here as well as using the 'Stop' Linked Group. With both methods, there is a short gap between the intro and the loop. Is there any way to avoid this or crossfade between the two clips? Thanks, Roland. Unable to reproduce that issue, Roland. Those were both made to work seamless in Master Audio V 4.1.6, released March 16, 2018. Excerpts of the release notes below. - Looped Chain transitions from one Variation to another are now seamless!
- End Linked Group transitions are now seamless!
You will need to send me an example scene that reproduces what you are seeing. Are you using the very latest Master Audio release? -Brian
|
|
|
Post by rolandmaker on Dec 1, 2020 1:02:30 GMT
Thanks for the fast reply Brian. I am using the latest version... perhaps it is due to my use of a very short sound for the intro (0.3s).
I'll try to reproduce in an example at some point, but have worked around the problem for now with some manual fading.
|
|
|
Post by DarkTonic Dev on Dec 1, 2020 5:41:08 GMT
That shouldn't matter. I did some pretty short split clips in my testing. Is the pitch set to 1 on both? Just wondering although I did test that before as well.
|
|