Exemplo n.º 1
0
    void PresetFirstMIDI()
    {
#if UNITY_EDITOR
        _path = string.Format("{0}/MIDI/{1}.mid", Application.streamingAssetsPath, MIDISongs[0].MIDIFile.name);
#else
        _path = string.Format("{0}/MIDI/{1}.mid", Application.streamingAssetsPath, MIDISongs[0].SongFileName);
#endif
        _midi     = new MidiFileInspector(_path);
        MidiNotes = _midi.GetNotes();

        _preset = true;
    }
Exemplo n.º 2
0
    void PlayCurrentMIDI()
    {
        _timer = 0;

#if UNITY_EDITOR
        _path = string.Format("{0}/MIDI/{1}.mid", Application.streamingAssetsPath, MIDISongs[_midiIndex].MIDIFile.name);
#else
        _path = string.Format("{0}/MIDI/{1}.mid", Application.streamingAssetsPath, MIDISongs[_midiIndex].SongFileName);
#endif
        _midi      = new MidiFileInspector(_path);
        MidiNotes  = _midi.GetNotes();
        _noteIndex = 0;

        OnPlayTrack.Invoke();
    }