# Sounds And Modular SimObjects In the examples that are shown for audio on the [aircraft audio](aircraft-audio/creating-the-sound-xml/) pages, the `sound` folder is placed in the **common** folder of the aircraft. This is the "base" folder for all modular SimObjects - as explained here: [Modular SimObject Project Structure](../content-configuration/modular-simobjects/modular-simobject-project-structure/) - and in general this is where you would want to place the `sound` and `soundai` folders and their accompanying files. These folders would normally contain the audio required for *all* the available SimObject presets, however there are a few exceptions.   - ##### Workflow It is perfectly possible to split your audio into various `PC.PCK` and sound `XML` specific to individual presents, or even individual attachments, as well as the common base (or all three!). Doing so offers no real benefits in terms of memory use or efficiency when the SimObject is in the simulation, so the only reason to do this is because it suits the way you or your team works.   - ##### Sharing If you are creating attachments that will be used across multiple projects (for example, a common instrument to be used in cockpits), then it will be essential that any audio is included as part of the attachment itself. If you don't do this, then to have the attachment play audio in other projects, you'd have to ensure that the audio files for each SimObject contain the exact code and sounds that the attachment requires. This is much more complicated, error prone, and makes it impossible to share the attachment with people outside of the developer environment you are working in.   - ##### Animation Sounds If any of the attachments or presets include a `model.xml` (or `animation.xml`) with model behaviours for animation that are tied to audio using the `` element in the `sound.xml` / `soundai.xml`, then you will need to include the XML and the associated `PC.PCK` file in the attachment.cfg/preset. When it comes to attachments, there are a couple of other things that are important to take into account: - *If it's an independent attached object*: then the name of the `PC.PCK` included in the package should be referenced as the main package. - *If it's an attached object within a modular aircraft*: then audio events can be included in the `PC.PCK` placed in the common/sound folder, so the main package referenced in `sound.xml` must be that of the `PC.PCK` included in common/sound. For more information on setting up this kind of sound, please see here: - [Adding Sound To Interactions](../content-configuration/models/modelbehaviors/usingbehaviours/interactions/adding-sound-to-interactions/)   - ##### Landing Gear And Other Unique Audio Finally, the other situation where it would make sense to have separate `sound` / `soundai` folders in your attachments is for landing gear or other components that require unique audio for a very specific set of circumstances. For example, tires touching down will require a different sound effect to skis, and skis will need a different touchdown effect to floats. The same logic should be applied to other unique elements of the aircraft being designed.   As you can see, modular aircraft give a great deal of flexibility when it comes to "mixing and matching" components, and this includes the way that your audio is integrated into the project. However, as a general rule of thumb, consider that all audio should be in a single set of files in the common folder, and specialist audio should be in the preset or attachment.     ### Sound In SimAttachments When creating SimAttachments to be used in your modular SimObjects - for example, an instruments package - each SimAttachment must have an audio package (`PCK` files) and a [sound.xml](../content-configuration/sounds/sound-xml/) file that references the properties of the different sound events, and each package must have the *same* name as its parent folder.   The process for creating these in Wwise is identical to that for an aircraft: - You create a work unit for each SimAttachment you want, and then a sound bank too. - You connect your soundbank to the appropriate new `PCK`. - When the Wwise package is created, you add it into the `sound` folder of your instrument and create the `sound.xml` file. - In the `sound.xml` you reference all your sound events. {{< image-center src="images/4_Sound/modular_1_folder.png" alt="SimAttachment Sound Folder Setup Example" >}}   In the sound.xml you will need to reference the package name, using the `` element: ``` xml     ```   You can then give the various sound event names in the `` element: ``` xml       ```     #### Model Behaviors In Attachments If an attachment includes any [model behavior](../content-configuration/models/modelbehaviors/model-behaviors/) templates or files, then `` events must also be declared in the attachment's `sound.xml` file. However, in this case there is no need to add a dedicated `PCK` for this, since the `` element can define the *common* `PCK`, and this common PCK can then include all the required sounds. For example, in the `sound.xml` shown below, all the `` for the instrument foleys are implemented into the interior "cockpit" attachment of the modular SimObject, and this attachment contains the model behaviors of the instruments, while the actual `PCK` is contained in the "common" folder of the SimObject: ``` xml     ```     #### SimVar Sounds And Animation In Attachments When it comes to [Attachments](../content-configuration/modular-simobjects/modular-simobject-project-structure/#attachments), if they have animations and you wish to add them into the sound XML file using the `` element, then you will need to ensure that the `` and/or `` elements use the `SimAttachmentAlias` attribute, for example: ``` xml ``` This *alias* can be found either from the attachment files themselves - as defined by the `alias` parameter - or you can use the DevMode tools: - First, open the [Behaviors Debug](../devmode/menus/tools_info/behaviors-debug-window/) window. - Then, in the aircraft, position the cursor over the attachment and use Ctrl + G. - This will open the attachment in the Behaviors Debug window: {{< image-center src="images/4_Sound/modular_2_attachment.png" alt="Opening An Attachment In The Behaviors Debug Window" >}} - From the debug window you can get the attachement *name*. In the example above it's `asobo_tablet_generic_8_3` (if the full name isn't visible, then click on the dropdown and it will expand to show the full set of details): - Now you have the attachment name, you can open the [Attachments](../devmode/editors/simobject-editor/debug_info/simobject-debug-menu/#attachments) debug window, and add the name into the filter at the top. On doing this, the **alias** of the attachment will be shown directly under it: {{< image-center src="images/4_Sound/modular_4_alias.png" alt="Finding The Attachment Alias In The Debug Aircraft Attachments Window" >}}