Example #1
0
 void Awake()
 {
     if (!Application.isPlaying)
     {
         return;
     }
     MidiPlayer.deviceNum = midiOutputDevice;
     MidiPlayer.Start();
     Metronome.setBPM(bpm);
     previousBpm = bpm;
 }
Example #2
0
        void Update()
        {
            if (!Application.isPlaying)
            {
                return;
            }
            MidiPlayer.Update();

            if (bpm != previousBpm)
            {
                Metronome.setBPM(bpm);
                previousBpm = bpm;
            }
        }
Example #3
0
 public static void StartMetronome(int p_BPM)
 {
     Metronome.setBPM(p_BPM);
     metronomeStartTimeMs = AudioSettings.dspTime * 1000;
 }
Example #4
0
 public static void SetBPM(int p_BPM)
 {
     Metronome.setBPM(p_BPM);
 }