| スライダー | 再生パラメータ |
|---|---|
| Volume Control | ボリューム |
| Pitch Control | ピッチ |
| Bus Send 00 | バスセンド0: マスタバス |
| Bus Send 01 | バスセンド1: リバーブ |
| Bus Send 02 | バスセンド2: ピッチシフタ |
| Bus Send 03 | バスセンド3: エコー、サラウンダ |
| Bus Send 04 | バスセンド4: コンプレッサ |
| Bus Send 05 | バスセンド5: コーラス |
| Bus Send 06 | バスセンド6: BiQuadローパスフィルタ |
| Bus Send 07 | バスセンド7: ディストーション |
| ミドルウェア | CRI ADX2 (CRI Atom) |
| サンプル | Basicサンプル |
| 格納場所 | /cri/unity/samples/UnityProject/Assets/Scenes/criatom/basic/ |
| シーンファイル | Scene_04_ControlParameter.unity |
/* ボリューム */ private float volumeValue = 1.0f; /* ピッチ */ private float pitchValue = 0.0f; /* PitchコントロールGUI */ GUI.Label (new Rect(20, 18 * (gui_i++), 200, 24), "Pitch Control Value " + this.pitchValue.ToString("0.00")); this.pitchValue = GUI.HorizontalSlider(new Rect(20, 18 * (gui_i++), 200, 12), pitchValue, -1200.0f, 1200.0f); if (GUI.changed || on_reset == true) { CriAtomSource atom_source = gameObject.GetComponent<CriAtomSource>(); /* Inspector側にパラメータがある場合はInspector側をコントロールする */ atom_source.volume = volumeValue; atom_source.pitch = pitchValue; }
/* Bus send 0-7 */ private float[] busSendlevelValue = new float[maxBus]; ... GUILayout.BeginVertical(); for (int i = 0; i < maxBus / 2; i++) { GUILayout.Label ("[" + i.ToString() + "] " + this.busSendlevelValue[i].ToString("0.00") + busEffectType[i]); this.busSendlevelValue[i] = Scene_00_GUI.HorizontalSlider(busSendlevelValue[i], 0.0f, 1.0f); } GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.Space(12); GUILayout.EndVertical(); GUILayout.BeginVertical(); for (int i = maxBus / 2; i < maxBus; i++) { GUILayout.Label ("[" + i.ToString() + "] " + this.busSendlevelValue[i].ToString("0.00") + busEffectType[i]); this.busSendlevelValue[i] = Scene_00_GUI.HorizontalSlider(busSendlevelValue[i], 0.0f, 1.0f); } GUILayout.EndVertical(); ... /* Update the bus send level. */ /* A parameter that does not exist on the Inspector side, control it by functions. */ /* Bus 0 is 1.0f by default, and multiplication is applied. */ atom_source.SetBusSendLevel(0, this.busSendlevelValue[0]); for (int i = 1; i < maxBus; i++) { /* Bus 1-7 is 0.0f by default, and addition is applied.(specifying offset) */ atom_source.SetBusSendLevelOffset(i, this.busSendlevelValue[i]); }