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

Description of the sample

Overview

cri4u_samples_criatom_scene03_game_mini.png

This sample demonstrates real-time parameter control using AISAC.
If you move the slider to the left or to the right, the sound of the engine changes.

Scene information


Middleware CRI ADX (CRI Atom)
Sample Basic sample
Location /CRIWARE/SDK/unity/samples/UnityProject/Assets/Scenes/criatom/basic/
Scene file Scene_03_AISAC.unity


Description of the program

Obtaining AISAC control information

This sample shows how to get the information about the AISAC from the script.
(This step can be omitted by defining the AISAC name when the data is created.)

void GetAisacControlInfo()
{
/* Obtain the information about the cues in the cue sheet */
CriAtomExAcb acb = CriAtom.GetAcb("DemoProj");
CriAtomEx.AisacControlInfo[] tmpAisacControlInfoList = acb.GetUsableAisacControlList(atomSource.cueName);
aisacControlInfoList.Clear();
foreach(CriAtomEx.AisacControlInfo aisacControlInfo in tmpAisacControlInfoList){
aisacControlInfoList.Add(aisacControlInfo);
}
for (int i = 0; i < 16; i++) {
this.aisacValueList[i] = 0.0f;
}
}

Setting the AISAC control value

This sample sets a value from 0.0 to 1.0 to the AISAC created in CRI Atom Craft.
The AISAC control ID is used to pass the value.

if (GUI.changed) {
/* Configure the AISAC */
atomSource.SetAisac(aisacControlInfo.id, this.aisacValueList[aisacControlInfo.id]);
}