<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Audio Scripting on DAD 424 Sound Design for Games</title><link>https://dsu-digital-sound-design.github.io/f-25-dad-424-sound-design-for-games/tags/audio-scripting/</link><description>Recent content in Audio Scripting on DAD 424 Sound Design for Games</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Mon, 04 Nov 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://dsu-digital-sound-design.github.io/f-25-dad-424-sound-design-for-games/tags/audio-scripting/index.xml" rel="self" type="application/rss+xml"/><item><title>Controlling Audio From Multiple Scripts</title><link>https://dsu-digital-sound-design.github.io/f-25-dad-424-sound-design-for-games/lectures/week-11/controlling-audio-multiple-scripts/</link><pubDate>Mon, 04 Nov 2024 00:00:00 +0000</pubDate><guid>https://dsu-digital-sound-design.github.io/f-25-dad-424-sound-design-for-games/lectures/week-11/controlling-audio-multiple-scripts/</guid><description>Overview A hands-on guide to managing one FMOD event from different places in your Unity game. By the end, you’ll be able to start music in one script and safely stop or change it from another, without duplicate sounds or messy references.
Learning goals Understand when to use instance (non-static) vs class-wide (static) variables Create and manage a single FMOD EventInstance for music Trigger fades and parameter changes from other scripts Avoid common pitfalls like invalid handles and race conditions What you’ll build A MusicScript that starts a looping music event A trigger script that fades the music when the player enters a zone An optional UI control to change a music parameter (e.</description><content>&lt;h1 id="overview">Overview&lt;/h1>
&lt;p>A hands-on guide to managing one FMOD event from different places in your Unity game. By the end, you’ll be able to start music in one script and safely stop or change it from another, without duplicate sounds or messy references.&lt;/p>
&lt;h2 id="learning-goals">Learning goals&lt;/h2>
&lt;ul>
&lt;li>Understand when to use instance (non-static) vs class-wide (static) variables&lt;/li>
&lt;li>Create and manage a single FMOD EventInstance for music&lt;/li>
&lt;li>Trigger fades and parameter changes from other scripts&lt;/li>
&lt;li>Avoid common pitfalls like invalid handles and race conditions&lt;/li>
&lt;/ul>
&lt;h2 id="what-youll-build">What you’ll build&lt;/h2>
&lt;ul>
&lt;li>A MusicScript that starts a looping music event&lt;/li>
&lt;li>A trigger script that fades the music when the player enters a zone&lt;/li>
&lt;li>An optional UI control to change a music parameter (e.g., intensity or low-pass)&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="static-vs-non-static-variables-refresher">Static Vs Non-Static Variables Refresher&lt;/h1>
&lt;p>Here’s a simple example to clarify the difference between &lt;strong>non-static&lt;/strong> and &lt;strong>static&lt;/strong> data types in C# — especially in a Unity scripting context.&lt;/p>
&lt;h3 id="example-player-score">Example: Player Score&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-csharp" data-lang="csharp">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">using&lt;/span> UnityEngine;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">class&lt;/span> &lt;span style="color:#a6e22e">Player&lt;/span> : MonoBehaviour
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">int&lt;/span> playerScore = &lt;span style="color:#ae81ff">0&lt;/span>; &lt;span style="color:#75715e">// Non-static (instance-based)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">static&lt;/span> &lt;span style="color:#66d9ef">int&lt;/span> totalScore = &lt;span style="color:#ae81ff">0&lt;/span>; &lt;span style="color:#75715e">// Static (shared across all players)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">void&lt;/span> Start()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> playerScore = Random.Range(&lt;span style="color:#ae81ff">1&lt;/span>, &lt;span style="color:#ae81ff">10&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> totalScore += playerScore;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="how-this-works">How this works&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Non-static (playerScore)&lt;/strong>
Each Player object keeps track of its own score.
If you have 3 Player GameObjects, each will have a different &lt;code>playerScore&lt;/code> value.&lt;/li>
&lt;li>&lt;strong>Static (totalScore)&lt;/strong>
This value is shared by all Player objects. Every time a new Player adds its score, &lt;code>totalScore&lt;/code> updates globally.
You can access it from anywhere with &lt;code>Player.totalScore&lt;/code>—no need to reference a specific Player instance.&lt;/li>
&lt;/ul>
&lt;h3 id="why-it-matters">Why it matters&lt;/h3>
&lt;ul>
&lt;li>Use &lt;strong>non-static&lt;/strong> when each instance should have its own data.
Example: individual enemies with their own health or position.&lt;/li>
&lt;li>Use &lt;strong>static&lt;/strong> when there should be only one value shared across all instances.
Example: total score, global music controller, or global game state flag.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="approach-1-instance-based-control-non-static">Approach 1: Instance-based control (non-static)&lt;/h1>
&lt;p>Use this when the music belongs to a specific GameObject in the scene and you want to wire references explicitly in the Inspector.&lt;/p>
&lt;h2 id="musicplayercs">MusicPlayer.cs&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-csharp" data-lang="csharp">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">using&lt;/span> UnityEngine;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">using&lt;/span> FMODUnity;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">class&lt;/span> &lt;span style="color:#a6e22e">MusicPlayer&lt;/span> : MonoBehaviour
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e"> [SerializeField]&lt;/span> &lt;span style="color:#66d9ef">private&lt;/span> EventReference musicEvent;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">public&lt;/span> FMOD.Studio.EventInstance MusicInst;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">void&lt;/span> Start()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MusicInst = RuntimeManager.CreateInstance(musicEvent);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MusicInst.start();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">void&lt;/span> OnDestroy()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MusicInst.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MusicInst.release();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="f_teleportercs-fade-music-on-trigger">F_Teleporter.cs (fade music on trigger)&lt;/h2>
&lt;p>There are two ways to reference our &lt;code>MusicPlayer&lt;/code> here. One is to use Unity&amp;rsquo;s find methods to search for it in the scene; the other is to create a serialized field and drag the reference in the Inspector. The latter is preferred for performance and clarity.&lt;/p>
&lt;p>Method 1: Using a find method (not recommended for performance reasons)&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-csharp" data-lang="csharp">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// Example only — prefer the serialized field approach below&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// var musicPlayer = GameObject.Find(&amp;#34;Music Object&amp;#34;).GetComponent&amp;lt;MusicPlayer&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// or&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">// var musicPlayer = FindObjectOfType&amp;lt;MusicPlayer&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Method 2: Using a serialized field (preferred)&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-csharp" data-lang="csharp">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">using&lt;/span> UnityEngine;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">class&lt;/span> &lt;span style="color:#a6e22e">F_Teleporter&lt;/span> : MonoBehaviour
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e"> [SerializeField]&lt;/span> &lt;span style="color:#66d9ef">private&lt;/span> MusicPlayer musicPlayer; &lt;span style="color:#75715e">// drag your MusicPlayer object here&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">void&lt;/span> OnTriggerEnter(Collider other)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (!other.CompareTag(&lt;span style="color:#e6db74">&amp;#34;Player&amp;#34;&lt;/span>)) &lt;span style="color:#66d9ef">return&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#75715e">// Check if the music instance is valid before stopping&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (musicPlayer != &lt;span style="color:#66d9ef">null&lt;/span> &amp;amp;&amp;amp; musicPlayer.MusicInst.isValid())
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> musicPlayer.MusicInst.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Why choose this: it’s explicit and great for scenes with multiple independent music or ambience controllers. You control exactly which instance you’re touching by wiring it in the Inspector.&lt;/p>
&lt;p>To finish, select the GameObject with the &lt;code>F_Teleporter&lt;/code> component and drag the GameObject with the &lt;code>MusicPlayer&lt;/code> script into the &lt;code>Music Player&lt;/code> field in the Inspector.&lt;/p>
&lt;hr>
&lt;h1 id="approach-2-class-wide-control-static">Approach 2: Class-wide control (static)&lt;/h1>
&lt;p>Use this when there’s exactly one music instance for the whole scene or game and you want to access it from anywhere without passing references.&lt;/p>
&lt;h2 id="musicscriptcs">MusicScript.cs&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-csharp" data-lang="csharp">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">using&lt;/span> UnityEngine;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">using&lt;/span> FMODUnity;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">class&lt;/span> &lt;span style="color:#a6e22e">MusicScript&lt;/span> : MonoBehaviour
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e"> [SerializeField]&lt;/span> &lt;span style="color:#66d9ef">private&lt;/span> EventReference musicEvent;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">static&lt;/span> FMOD.Studio.EventInstance MusicInst;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">void&lt;/span> Start()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (!MusicInst.isValid())
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MusicInst = RuntimeManager.CreateInstance(musicEvent);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MusicInst.start();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">void&lt;/span> OnDestroy()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (MusicInst.isValid())
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MusicInst.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MusicInst.release();
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">static&lt;/span> &lt;span style="color:#66d9ef">void&lt;/span> SetMusicParam(&lt;span style="color:#66d9ef">string&lt;/span> name, &lt;span style="color:#66d9ef">float&lt;/span> &lt;span style="color:#66d9ef">value&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (MusicInst.isValid())
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MusicInst.setParameterByName(name, &lt;span style="color:#66d9ef">value&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="f_teleportercs-fade-music-on-trigger-1">F_Teleporter.cs (fade music on trigger)&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-csharp" data-lang="csharp">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">using&lt;/span> UnityEngine;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">public&lt;/span> &lt;span style="color:#66d9ef">class&lt;/span> &lt;span style="color:#a6e22e">F_Teleporter&lt;/span> : MonoBehaviour
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">void&lt;/span> OnTriggerEnter(Collider other)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (!other.CompareTag(&lt;span style="color:#e6db74">&amp;#34;Player&amp;#34;&lt;/span>)) &lt;span style="color:#66d9ef">return&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">if&lt;/span> (MusicScript.MusicInst.isValid())
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MusicScript.MusicInst.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Why choose this: it’s quick and convenient when you truly have a single, global music state. Anywhere in code can reach it via the class name.&lt;/p>
&lt;hr>
&lt;h1 id="when-to-use-which">When to use which&lt;/h1>
&lt;p>Use instance-based if:&lt;/p>
&lt;ul>
&lt;li>You have multiple music or ambience controllers&lt;/li>
&lt;li>You want explicit Inspector wiring and easy prefab testing&lt;/li>
&lt;/ul>
&lt;p>Use static if:&lt;/p>
&lt;ul>
&lt;li>There is only one music instance&lt;/li>
&lt;li>Many systems need to access it without passing references&lt;/li>
&lt;li>You’re building a lightweight global music controller&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="troubleshooting-checklist">Troubleshooting checklist&lt;/h1>
&lt;ul>
&lt;li>Does your Player have the Player tag and a collider/rigidbody appropriate for trigger events?&lt;/li>
&lt;li>Is the FMOD event assigned in the Inspector and valid in FMOD Studio?&lt;/li>
&lt;li>Are you calling stop on a valid instance? Check MusicInst.isValid() before using it.&lt;/li>
&lt;li>Are you starting the event before trying to stop it? Initialize in Start and verify logs.&lt;/li>
&lt;li>For static mode, do you accidentally create multiple MusicScripts? Guard with isValid().&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="clean-up-and-lifecycle-tips">Clean-up and lifecycle tips&lt;/h1>
&lt;ul>
&lt;li>stop ends playback; release frees the handle. After stopping with ALLOWFADEOUT, release the instance when you’re truly done with it.&lt;/li>
&lt;li>If music should persist across scenes, mark the music GameObject with DontDestroyOnLoad and manage transitions centrally.&lt;/li>
&lt;li>Avoid GameObject.Find. Prefer serialized fields (instance approach) or the class name (static approach) for clarity and performance.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="quick-reference">Quick reference&lt;/h1>
&lt;ul>
&lt;li>Instance-based access: keep MusicInst non-static and pass references via the Inspector.&lt;/li>
&lt;li>Static access: make MusicInst static and reach it from anywhere with MusicScript.MusicInst.&lt;/li>
&lt;li>Always check isValid before using an EventInstance.&lt;/li>
&lt;li>Stop with ALLOWFADEOUT, then release when finished.&lt;/li>
&lt;/ul></content></item></channel></rss>