/** * Metronomes */ public static Metronome PlayMetronome(string name) { Metronome m = GetMetronome(name); m.Play(); return(m); }
protected void StartSong(Song nextsong) { // TODO: clean up current song. // TODO: play next song. timer.LoadSong(nextsong); timer.Play(); }
// Start is called before the first frame update void Start() { toLoad = new MusicMap(); toLoad.audioFilename = "resistance"; //toLoad.bpm = 30.0F; toLoad.bpm = 37.0F; toLoad.offset = 0.810810810810F; toLoad.beatsPerMeasure = 4; nome = GetComponent <Metronome>(); nome.AddBeatListener(() => cube.SetActive(!cube.active)); nome.LoadMap(toLoad);//Load a json from streaming assets. link to mp3 file nome.Play(); Debug.Log("Done"); }