/// <summary> /// ノート(音符)に対応したボタン押下時のアクションを返します /// </summary> /// <returns>The on note button click action.</returns> /// <param name="noteNo">Note no.</param> UnityAction GetOnNoteButtonClickAction(int noteNo) { return(() => { if (!audioManager.bgm.isPlaying) { return; } song.AddNote(audioManager.bgm.time, noteNo); audioManager.notes[noteNo].Play(); noteButtons[noteNo].Select(); StartCoroutine(DeselectCoroutine(noteButtons[noteNo])); }); }
public void AddNoteToSong(int midiNum, float frequency) { trackedSongData.AddNote(new Note(midiNum, frequency)); }