Exemple #1
0
 // Update is called once per frame
 void Update()
 {
     if (mic.passThreshold())
     {
         int mid = mic.FrequencyToMidi(mic.GetPrincipalFrecuency());
         note.text   = notes [mid % 12];
         octave.text = (mid / 12).ToString();
     }
 }
Exemple #2
0
    // Update is called once per frame
    void Update()
    {
        notas = GameObject.FindGameObjectsWithTag("Good");

        int mid = mic.FrequencyToMidi(mic.GetPrincipalFrecuency());

        nota.text = Tuner.notes [mid % 12];

        for (int i = 0; i < notas.Length; i++)
        {
            micNote mn = notas[i].GetComponent <micNote>();
            if (mn.note == mid % 12)
            {
                Destroy(notas[i]);
            }
        }
    }