CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
[CriAtom] McDSP Plugin

Description of the sample

Overview

This is a sample showcasing the McDSP effects.
cri4u_samples_criatom_expansion01_main.png

Operating instructions

  • If you press the "Play Cue 1" / "Play Cue 2" buttons on the left side, the corresponding sound will play in loop.

  • If you press on a button with an effect name on the right side, the corresponding effect will be applied to the sound currently being played.
    • Press the "MasterOut" button to switch to the original sound, without effect.

  • If you press on the "Snapshot 1" or "Snapshot 2" buttons, the effect parameters will gradually change from the current state to the DSP bus snapshot settings over a period of 3 seconds.

  • The names of the effect and snapshot applied are displayed in the text box in the bottom right corner.

  • Pressing the "Stop All" button stops all audio playback.

  • Pressing the "Reset Effect" button resets the effect and snapshot settings.

Scene information


Middleware CRI ADX (CRI Atom)
Sample Expansion sample
Location /CRIWARE/SDK/unity/samples/UnityProject/Assets/Scenes/criatom/expansion/
Location Scene_01_McDSP_Preview.unity
ACF file /CRIWARE/SDK/unity/samples/UnityProject/Assets/StreamingAssets/McDSP/ForMcDSPSample.acf
ACB file /CRIWARE/SDK/unity/samples/UnityProject/Assets/StreamingAssets/McDSP/ForMcDSPSample.acb


Description of the program

In this sample, ACF / ACB file that supports the McDSP effect is used.
In the Scene_ 01 _ McDSP_Preview.cs script, the output sound is switched on or off by setting the send level of the DSP bus corresponding to each effect to 0 or 1.
Effects can applied and switched on / off by following the steps below:
  1. The initialization of a McDSP effect is done automatically by "Assets/Plugins/CriWare/Expansions/CriAfxMcDspInitializer.cs" at startup. If manual registration is required, please use "CriAfxMcDspInitializer.AddInterfaces()".
    • Please make sure to call AddInterfaces() before registering the ACF file.

  2. By calling the CriAtomEx.AttachDspBussetting (string dspBusSettingName) function, you can apply the McDSP bus settings.
    • Please match the name of the DSP bus setting to the data setting value.

  3. By calling the CriAtomSource.SetBusSendLevel (string busName, float level) function, you can set the bus send level of the effect you want to output.
    • In the sample, the bus names etc. of each effect are defined in the effectList array, according to the data.

  4. By calling the CriAtomEx.ApplyDspBusSnapshot(string snapshotName, int timeMs) function, you can gradually change the effect parameters from their current values to the snapshot's values over a given period of time.
    • Please use a snapshot name preset in the data.
    • Snapshot settings affect all the effect buses.

  5. By calling the CriAtomEx.DetachDspBusSetting() function, you can reset the state of the effect and the snapshot at once.