Sounds
Products
Help
About
Blog
Register now to download your created sounds!

Nemisindo Action Pack for Unity Documentation

The Action Pack is an asset for Unity featuring 11 fully procedural sound effects models (all sounds generated on the fly, no stored samples) for popular “action” sounds; helicopters, engines, gunshots, sirens, rockets, etc. The plugin also provides over 90 presets for you to chose from.

These models are implemented as native audio plugins and can generate sound effects in real time, completely procedurally. Each model offers various functions to change the parameters of the sound effect at runtime. Hence the parameters can be linked to any in-game events, which can lead to very organic and interesting results.

The models are written in c++ wrapped in a custom UI.

The plugins are loaded as audio effects in the mixer channel and the audio signal is passed to the audio source object mapped to that mixer channel.

The plugin audio parameters can be controlled in real-time using special setter functions via the unity c# scripting API.

This means that audio parameters can be linked to any ingame event giving granular control over the sounds generated in during gameplay. It also allows you to design your sound exactly how you want it. further each plugin is provided with multiple presets
to speed up your sound design process

  • Supported Target Platforms: Windows (x64 & x32), Mac, Android, iOS, Linux, XBox One

  • Tested with Unity versions: 2018.4.36f1 or later.
  • Included models: Explosion, Gunshot, Rifle, Helicopter, Jet, Propeller, Rocket, Alarm, Alert, Siren, Fire

  • After purchasing the plugin from the asset store, click on add to my assets. To use the plugin in a project, click on open in unity from the popup on the asset store webpage. Once you've added it to unity you can view the plugin listed in the package manager under my assets. refer to this article for more information on how to add new packages to your package manager.
    once you've located the nemisindo action pack in your package manager, you can add it to your project by downloading and importing it from the package manager.

    The package contains two folders, Demo and Nemisindo Action Pack.

    the Nemisindo Action Pack folder contains a set of .dll files for windows or a set of .bundle files for mac osx and their respective c# scripts for UI, Serialisation and Control.

    The demo folder contains different scenes for testing each plugin.

    The plugins are loaded into mixer channels as audio effects and The UI for each plugin can be accessed from the inspector window for the mixer channel into which the plugin is loaded into.

    1) .bundle (MAC os x) or .dll (windows) file: This is the actual Native Audio Plugin.
    Note: unity requires the audio plugin to be named starting with audioplugin_ so do not rename the plugin file name

    2) audioPluginName_UI.cs : This is the C# script for the UI. Do not change anything or it might break the UI.
    However towards the end of this file there is a properly commented presets section and you can save your own presets in here. You can find instructions for that towards the end of this document.

    3) Serialisation file: This is named as audioPlugin_name_Unity.cs. The main purpose of this script is to enable data serialisation between the UI and the dsp core of the plugin via audio parameters.
    Kindly do not make any changes to the script.

    4) Controller file: this is named as pluginName_controller.cs. This is created and provided for conveniently interacting with the plugin and changing its parameters using the unity scripting interface.
    Each plugin has a set of functions that can be used to control the sliders, triggers and dropdown boxes in the plugin and all the functions can be referred to from below.
    Note: The controller scripts can be added as a component to any object. It can be found under a nemisdo submenu under when you click on add component or from the menu bar at [component]->[Nemisindo]

    5) The Audio Init Script: this can be found inside the scripts folder. Add this script to at least one audio source attached to every audio mixer to enable sound from the native audio plugin.
    This can be accessed from the nemisindo submenu under the component menu [component]->[Nemisindo].

    To add a plugin to a mixer channel,

  • Place the Nemisindo Action Pack folder in your assets folder add a new mixer track.
  • Right click near the attenuation plugin present by default in each mixer channel strip and click on add effect before then select the required audio plugin to add it to the current project.

    Alternatively you can click on the add button towards the end of the channel strip and select the requried plugin.
  • Each plugin contains some parameters to shape the plugin's sound. Once a model is added to the mixer channel, you can view the plugin UI in the inspector window. Every plugin has a set of audio parameters, a plugin instance slider and a preset selection drop down menu.
    The plugins can be categorized into two types. One shot plugins and continuous output plugins. Models like jet, propeller etc., generate sounds on load,
    models like gunshot, rifle etc., need to be triggered to generate sound
    Example - The parameters of the Alarm model :

    Important: The plugin parameters can be changed in runtime using functions provided in their designated controller functions. Our plugins bypass the expose parameter function in unity for and gives access to each parameter directly using dedicated functions.

    To hear sounds from each model:
    Step 1: create an audio source and route its output to the mixer channel in which the plugin is loaded into.
    Step 2: Add a new component to that audio source and from the list of components select Nemisindo and load the Audio Init script from the list.
    This enables audio from the native audio plugin to pass through the respective audio source
    Note: Every mixer channel with a native audio plugin requires a new audio source and an Audio Init Component for seamless integration.
    Now run the game by clicking on the play button, models like jet, propeller, helicopter etc., generate sound immediately for models like alarm, gunshot, rifle etc.,
    Trigger the plugin using or start audio from the UI. You can change the plugin parameters from the plugin UI during runtime using the edit in play mode function or you can use the scripting API to do this.

    In the given demos/Gunshot test scene , the trigger for the gunshot plugin is linked with the "on mouse down" on the cube game object,
    meaning that the gunshot will fire when the cube is clicked
    Some models generate sound as soon as the game is started, like the Jet model. These "Continuous Output" models will keep producing sound indefinitely until the “Stop” function is called.
    Other models need to be triggered, using their corresponding Trigger function. These "Trigger" models will only produce sound if their trigger function is been called.

    Continuous Output models: Helicopter, Jet, Propeller, Alarm, Siren, and Fire, in this list Alarm and Siren require the start button to be enabled to generate audio.

    Trigger models: Alert, Explosion, Rifle, Gunshot, and Rocket.
    : These models have to be triggered using their dedicated trigger function (refer to API) to generate sounds

    All models provide functions to change the sound parameters at runtime. This makes linking parameters to in-game events very easy.
    In your c# file
    Make sure you have

    using System.Runtime.InteropServices

    To enable communication with the plugin
    The functions related to the models can be accessed by using
    
                        #if UNITY_IOS
    [DllImport("__Internal")]
    #else
    [DllImport("audioplugin_PluginName")] static extern void setFloatValue(float channel, int index, float value);
    where setFloatValue is the name of the function.

    A list of functions associated with each plugin can be found in the controller script for each plugin
    or scroll down to the API section for a list of all the functions
    If you want to import multiple function add another similar block right after the previous #endif with the required function name.
    you can import multiple plugins and call their respective functions if required

    Example 1:
    in the following example the pace paramter of Footsteps is set to 0.5f on game start.

    
                        using UnityEditor;
                        using UnityEngine;
                        using System.Runtime.InteropServices;
                        using UnityEngine.SceneManagement;
    
                        public class Footsteps_Controller : MonoBehaviour
                        {
                          #if UNITY_IOS
                            [DllImport("__Internal")]
                          #else
                            [DllImport("audioplugin_Footsteps")] static extern void setFloatValue(float channel, int index, float value);
                          #endif
    
                          #if UNITY_IOS
                            [DllImport("__Internal")]
                          #else
                            [DllImport("audioplugin_Footsteps")] static extern float getFloatValue(int index);
                          #endif
    
                          #if UNITY_IOS
                            [DllImport("__Internal")]
                          #else
                            [DllImport("audioplugin_Footsteps")] static extern float setPace(float channel, float value);
                          #endif
    
                          void Start()  { setPace(0, 0.5f) }
                            // Update is called once per frame
                          void Update(){}
                        }
                        



    Every plugin is provided with a setFloatValue(int channel, int index, float value) function and a getFlowValue(int channel, int index) function to enable easy communication between the plugin via scripting.
    
                  setFloatValue(int channel, int index, float value)
                  
    Channel : is the current plugin instance that can be explicitly mentioned by the user. Each plugin can have a different or the same instance and the parameters in that particular instance can be accessed by mentioning the plugin instance value here.
    There are a total of 32 channels specified which means that there can be 32 different instances of any plugin running at once in your project.
    Index: is index of the plugin parameter, this is marked in the plugin interface right in front of the parameters name.This is used to access that specific parameter in the chosen plugin instance.
    Value: is used to set the value of the chosen audio parameter.
    Example: To set the carrier frequency of the 0th instance of an alarm plugin to 1500Hz.
    
                  setFloatValue(0,1,1500)
                  
    can be used Similarly to get the carrier frequency of the same alarm plugin
    
                  getFloatValue(0,1)
                  
    can be used In addition to the setFloatValue function you can also additionally address each of these parameters specifically using the plugin dedicated functions listed below:

    Alarm
    The Alarm model has 5 parameters:

    Alert
    The Alert model has 2 parameters:

    Explosion
    The Explosion model has 10 parameters:

    Fire
    The Fire model has 5 parameters:

    Footsteps
    The Footsteps model has 21 parameters:

    Gunshot
    The Gunshot model has 6 parameters:

    Helicopter
    The Helicopter model has 12 parameters:

    Jet
    The Jet model has 5 parameters:

    Propeller
    The Propeller model has 5 parameters:

    Rifle
    The Rifle model has 6 parameters:

    Rocket
    The Rocket model has 3 parameters:

    Siren
    The Siren model has 2 different modes, Whelen-style and Two-tone.

  • Siren Type: Select the siren type:
  • setType     (float channel, float value); //Select between a multi-tone siren and the whelen style siren 

    Whelen-Style Parameters:

    Two-Tone Parameters:

    Each plugin contains a set of presets accessible form the preset drop down box in the plugin UI.
    You can also add your own preset to the UI using the following steps
    In every plugin’s UI script (available under the Nemisindo Action Pack / Plugin Name / Editor folder) find the comment which says:
    “//Here you can add the name of your new preset”
    Right after that add the name of your new preset inside

    
                        pluginName_parameter_options = new string[] { }
                      
    Then inside:
    
                        if(pluginName_prevPreset != pluginName_Presets) { }
                      
    Add your own preset code, Best practice is to copy code from another preset and paste it towards the end of the list
    of presets and change the required parameter values.
    Example: To add a new preset to the explosion plugin open the Explosion_UI.cs file in your code editor and find “//Here you can add the name of your new preset” in the file.
    Now, add new preset names to the parameter_options and add audio parameter values for the new preset inside the condition block.
    
                        if(Explosion_prevPreset != Explosion_Presets).
                        GUILayout.BeginHorizontal();
                        //Here you can add the name of your new preset
                        string[] explosion_parameter_options = new string[]
                        {
                          "Use Slider Values","NewPreset”
                        };
                        Explosion_Presets = EditorGUILayout.Popup("Presets", Explosion_Presets, explosion_parameter_options, GUILayout.Width(400));
                        if(Explosion_prevPreset != Explosion_Presets)
                        {
                          //Here you can add your own presets to the plugin.
                          if (Explosion_Presets == 0)
                        {
                            Explosion_LowGain = 0.5f;
                            Explosion_LowDecay = 4.0f;
                            Explosion_WhiteGain = 0.5f;
                            Explosion_WhiteDecay = 4.0f;
                            Explosion_PinkGain = 0.5f;
                            Explosion_PinkDecay = 4.0f;
                            Explosion_highDelay = 30.0f;
                            Explosion_gritLevel = 0.0f;
                            Explosion_GritSwitch = false;
                            Explosion_Ott = false;
                            Explosion_trigger = false;
                        }
                        //New Preset Code
                        if (Explosion_Presets == 1)
                        {
                            Explosion_LowGain = 0.53f;
                            Explosion_LowDecay = 3.0f;
                            Explosion_WhiteGain = 0.8f;
                            Explosion_WhiteDecay = 1.0f;
                            Explosion_PinkGain = 0.1f;
                            Explosion_PinkDecay = 1.0f;
                            Explosion_highDelay = 3.0f;
                            Explosion_gritLevel = 0.1f;
                            Explosion_GritSwitch = true;
                            Explosion_Ott = true;
                            Explosion_trigger = true;
                        }
                      }
                      

    The provided controller script can be attached to any object to control the plugin audio parmeters in runtime.
    from any object but if you want to create your own controller script for any plugin.
    In your c# script component
    Make sure you have

    
                      using System.Runtime.InteropServices;
                      
    To enable communication with the plugin In your monoscript class make sure you’ve imported the required function from the plugin as follows:
    
                      #if UNITY_IOS
                            [DllImport("__Internal")]
                      #else
                          [DllImport("audioplugin_PluginName")] static extern void setFloatValue(float channel, int index, float value);
                      #endif
                      
    Example:
    
                        using UnityEditor;
                        using UnityEngine;
                        using System.Runtime.InteropServices;
                        using UnityEngine.SceneManagement;
    
                        public class Explosion_Controller : MonoBehaviour
                        {
                        #if UNITY_IOS
                              [DllImport("__Internal")]
                        #else
                            [DllImport("audioplugin_Explosion")] static extern void setFloatValue(float channel, int index, float value);
                        #endif
    
                        #if UNITY_IOS
                              [DllImport("__Internal")]
                        #else
                            [DllImport("audioplugin_Explosion")] static extern float getFloatValue(int index);
                        #endif
    
                        #if UNITY_IOS
                              [DllImport("__Internal")]
                        #else
                            [DllImport("audioplugin_Explosion")] static extern float setRumble(float channel, float value);
                        #endif
    
                         void Start()  { }
                            // Update is called once per frame
                            void Update(){}
                        }
                      

    Currently the plugins can be panned using the inbuilt spatialization in each audio source.
    The pitch and doppler effects donot affect the plugin output. You can apply post processing effects to the plugin outputs by loading them after the native audio plugin

    Can't find what you're looking for? Let us know.