void Awake() { txt = GameObject.Find("HRText").GetComponent <TMPro.TMP_Text>(); heartText = GameObject.Find("hrui").GetComponent <TMPro.TMP_Text>(); beats = new List <Beat>(); onsetFeatures = new List <Onset>(); chromaFeatures = new List <Chroma>(); musicPlayer = GetComponent <MusicPlayer>(); audioSource = GetComponent <AudioSource>(); rhythmPlayer = GetComponent <RhythmPlayer>(); rhythmData.GetIntersectingFeatures(onsetFeatures, 0, 200); rhythmData.GetIntersectingFeatures(beats, 0, 200); rhythmData.GetFeatures(chromaFeatures, 0, 200); // UnityEngine.Debug.Log(onsetFeatures); foreach (var onset in onsetFeatures) //여기서생성 { SpawnRandomFootNote(onset.timestamp).importance = onset.strength; SpawnRandomNote(onset.timestamp).importance = onset.strength; } //foreach(var chroma in chromaFeatures) { // SpawnRandomNote(chroma.timestamp); } rhythmPlayer.Play(); }
private void OnInitialized(RhythmData rhythmData) { //Start playing the song. player.Play(); }