The '''LerpingMultiClipPlayer''' component is an [[Type:IAudioSource|IAudioSource]] type that transitions between different audio clips (tracks) by lerping the volume and speed from one audio to the other using <code>Lerp</code>.
When an audio is lerped to, the audio will continue to loop till <code>Lerp</code> is moved to another clips range.
If <code>Lerp</code> is not within a clip range, this component will provide silent audio.
<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Lerp|Float|
|Lerp|Float| The reference value to use to lerp between different tracks with different values. This does not have to be 0-1, and can be any value.
|Tracks|{{RootFieldType|SyncList`1|[[#Track|Track]]}}|TypeAdv1=true| A list of track's to lerp between using <code>Lerp</code>.
}}
== Track ==
{{Table TypeFields
|Clip|{{RootFieldType|AssetRef`1|[[Type:AudioClip|AudioClip]]}}|TypeAdv0=true| The audio clip to play if <code>Lerp</code> is within <code>StartPosition</code> and <code>EndPosition</code>.
|StartPosition|Float| What the starting point of this track's range is.
|EndPosition|Float| What the ending point of this track's range is.
|StartSpeed|Float|What the speed should be at the start of this track's range, lerped.
|EndSpeed|Float|What the speed should be at the end of this track's range, lerped.
|StartVolumeTransitionRatio|Float| How much of this track's position range to fade the audio in for.
|EndVolumeTransitionRatio|Float| How much of this track's position range to fade the audio out for.
}}
}}
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Can be used to make looping noises that play over a video at different positions in the playtime.
<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
{{stub}}
<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Lerping Multi Clip Player]]
[[Category:Components{{#translation:}}|Lerping Multi Clip Player]]
[[Category:Components With Nested Types{{#translation:}}|Lerping Multi Clip Player]]
[[Category:Components With Nested Types{{#translation:}}|Lerping Multi Clip Player]]
[[Category:Components:Audio{{#translation:}}|Lerping Multi Clip Player]]
[[Category:Components:Audio{{#translation:}}|Lerping Multi Clip Player]]
Revision as of 19:53, 22 January 2025
Component image
Lerping Multi Clip Player component as seen in the Scene Inspector
The LerpingMultiClipPlayer component is an IAudioSource type that transitions between different audio clips (tracks) by lerping the volume and speed from one audio to the other using Lerp.
When an audio is lerped to, the audio will continue to loop till Lerp is moved to another clips range.
If Lerp is not within a clip range, this component will provide silent audio.