void Awake() { if (!Application.isPlaying) { return; } MidiPlayer.deviceNum = midiOutputDevice; MidiPlayer.Start(); Metronome.setBPM(bpm); previousBpm = bpm; }
void Update() { if (!Application.isPlaying) { return; } MidiPlayer.Update(); if (bpm != previousBpm) { Metronome.setBPM(bpm); previousBpm = bpm; } }
public static void StartMetronome(int p_BPM) { Metronome.setBPM(p_BPM); metronomeStartTimeMs = AudioSettings.dspTime * 1000; }
public static void SetBPM(int p_BPM) { Metronome.setBPM(p_BPM); }