Example #1
0
 // Start is called before the first frame update
 void Start()
 {
     Triangle.transform.position += new Vector3(0, DistanceToHit, 0);
     Cross.transform.position    += new Vector3(0, -DistanceToHit, 0);
     Circle.transform.position   += new Vector3(DistanceToHit, 0, 0);
     Square.transform.position   += new Vector3(-DistanceToHit, 0, 0);
     //StartCoroutine("SpawnTimer");
     midiFilePlayer.OnEventNotesMidi.AddListener(SpawnNotes);
     midiFileLoader.MPTK_Load();
 }
Example #2
0
        // Start is called before the first frame update
        void Start()
        {
            MidiLoader.MPTK_LogEvents = true;
            MidiLoader.MPTK_Load();
            Debug.Log(MidiLoader.MPTK_MidiName);
            List <MPTKEvent> events = MidiLoader.MPTK_ReadMidiEvents();

            foreach (MPTKEvent evt in events)
            {
                Debug.Log(evt);
            }
        }
Example #3
0
    // Start is called before the first frame update
    void Start()
    {
        instance            = this;
        AudioListener.pause = true;
        //TODO - create public variable to load song in
        MidiLoader.MPTK_Load();
        midiEvents = MidiLoader.MPTK_ReadMidiEvents();
        getMidiEvent(midiEvents);
        secondPerBeat = 60f / bpm;

        //record the time of the song when it starts
        dspTimeSong = (float)AudioSettings.dspTime;

        foreach (MidiNotes note in midiNotes)
        {
            // Debug.Log(note.NoteValue);
        }
    }