Component:StaticAudioClip: Difference between revisions

From Resonite Wiki
Automated: update DeDuplicate
Add info
Line 7: Line 7:
|Name=Static Audio Clip
|Name=Static Audio Clip
}}
}}
The '''StaticAudioClip''' component is what stores pre recorded audio data for components that play audio like [[Component:AudioClipPlayer]]. This component is auto generated when a sound file is imported into the game as part of an audio clip object.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|URL|Uri|
|URL|Uri| The audio clip data location to load.
|LoadMode|AudioLoadMode|
|LoadMode|AudioLoadMode|
|SampleRateMode|SampleRateMode|
|SampleRateMode|SampleRateMode|
Line 18: Line 19:
== Sync Delegates ==
== Sync Delegates ==
{{Table ComponentTriggers
{{Table ComponentTriggers
|Normalize()|[[Type:Func`1|Func`1]]|
|Normalize()|[[Type:Func`1|Func`1]]| Makes the volume during the audio clip consistent.
|AdjustVolume()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: ratio&gt;|
|AdjustVolume()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: ratio&gt;| multiplies the volume of this audio clip by <code>ratio</code>
|ExtractSides()|[[Type:Func`1|Func`1]]|
|ExtractSides()|[[Type:Func`1|Func`1]]|
|Denoise()|[[Type:Func`1|Func`1]]|
|Denoise()|[[Type:Func`1|Func`1]]| Removes noise from the audio clip
|TrimSilence()|[[Type:Func`1|Func`1]]|
|TrimSilence()|[[Type:Func`1|Func`1]]| removes the silence from the start and end of the audio clip
|TrimStartSilence()|[[Type:Func`1|Func`1]]|
|TrimStartSilence()|[[Type:Func`1|Func`1]]| removes the silence from the start of the clip.
|TrimEndSilence()|[[Type:Func`1|Func`1]]|
|TrimEndSilence()|[[Type:Func`1|Func`1]]| removes the silence from the end of the clip.
|TrimStart()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: duration&gt;|
|TrimStart()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: duration&gt;| removes <code>duration</code> seconds from the start of the clip.
|TrimEnd()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: duration&gt;|
|TrimEnd()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: duration&gt;| removes <code>duration</code> seconds from the end of the clip
|FadeIn()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: duration&gt;|
|FadeIn()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: duration&gt;| makes the audios volume increase from 0 to original over <code>duration</code> seconds at the start of the clip.
|FadeOut()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: duration&gt;|
|FadeOut()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: duration&gt;| makes the audios volume decrease from original volume to 0 over <code>duration</seconds> seconds at the end of the clip.
|MakeFadeLoop()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: duration&gt;|
|MakeFadeLoop()|[[Type:Func`2|Func`2]]&lt;[[Type:Float|Float]]: duration&gt;| blends the start and end of the clips by <code>duration</code> seconds to make the audio seem seamless.
|ConvertToWAV()|[[Type:Func`1|Func`1]]|
|ConvertToWAV()|[[Type:Func`1|Func`1]]| converts the audio clip type to Windows audio vodec.
|ConvertToVorbis()|[[Type:Func`1|Func`1]]|
|ConvertToVorbis()|[[Type:Func`1|Func`1]]| converts the audio clip type to Vorbis.
|ConvertToFLAC()|[[Type:Func`1|Func`1]]|
|ConvertToFLAC()|[[Type:Func`1|Func`1]]| Converts the audio clip type to FLAC.
}}
}}


Line 42: Line 43:


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
</translate>
</translate>



Revision as of 20:43, 10 November 2024


This article or section is a Stub. You can help the Resonite Wiki by expanding it.

Component image 
Static Audio Clip component as seen in the Scene Inspector

The StaticAudioClip component is what stores pre recorded audio data for components that play audio like Component:AudioClipPlayer. This component is auto generated when a sound file is imported into the game as part of an audio clip object.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
URL Uri The audio clip data location to load.
LoadMode AudioLoadMode
SampleRateMode SampleRateMode

Sync Delegates

Lua error in mw.text.lua at line 25: bad argument #1 to 'match' (string expected, got nil).
Triggers
Method Name Method type and Arguments. Is the method hidden? Description

Usage

Examples

See Also