unityの自分用備忘録

unityの勉強をメモ的に書いてます

Koreographer 自分用メモ 雑多

koreograhper 使いこなせないのでいじっている最中メモ

タイミングの取り出しをしたい(予定)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using SonicBloom.Koreo;
using SonicBloom.Koreo.Players;

public class Koreotiming_get : MonoBehaviour
{
    
    [EventID]
    public string trackID;
    public Koreography rhythmKoreo;

    public int count;

    int curCheckIdx = 0;
    public List<KoreographyEvent> rhythmEvents;
    public int bufferInSamples;

    public void Start()
    {

        rhythmEvents = rhythmKoreo.GetTrackByID(trackID).GetAllEvents();
        bufferInSamples = Koreographer.GetSampleRate() ;

    }
    public void Update()
    {
        int curTime = Koreographer.GetSampleTime();

    }
}

大きな勘違いpayloadに合わせて毎回イベントを呼んで、ノートを発生させているかと思っていたらそうではなく。
全体のイベントのタイミングを一括で読み込んでノートを発生させているみたい。
koereograpyのsampleの数値から時間を割り出して発生位置と終点までの距離を逆算させる?