Exemplo n.º 1
0
    public void MyCallbackEventHandler(BeatDetection.EventInfo eventInfo)
    {
        Component[] children;
        switch (eventInfo.messageInfo)
        {
        case BeatDetection.EventType.Energy:
            children = FountainEnergy.GetComponentsInChildren <ParticleSystem>();
            foreach (ParticleSystem childParticleSystem in children)
            {
                childParticleSystem.Play();
            }
//                StartCoroutine(showText(energy, genergy));
            break;

        case BeatDetection.EventType.HitHat:
//                StartCoroutine(showText(hithat, ghithat));
            break;

        case BeatDetection.EventType.Kick:
//                StartCoroutine(showText(kick, gkick));
            break;

        case BeatDetection.EventType.Snare:
            FireworkKicks.Play();
//                StartCoroutine(showText(snare, gsnare));
            break;
        }
    }
Exemplo n.º 2
0
 void OnBeatDetected(BeatDetection.EventInfo eventInfo)
 {
     for (int i = 0; i < beater.Length; i++)
     {
         beater[i]?.Beat();
     }
 }
Exemplo n.º 3
0
    public void MyCallbackEventHandler(BeatDetection.EventInfo eventInfo)
    {
        EventTypeCnt.AddEventType((int)eventInfo.messageInfo);
        //SideFountain.AddEventType((int)eventInfo.messageInfo);

        switch (eventInfo.messageInfo)
        {
        case BeatDetection.EventType.Energy:

            Debug.Log("Energy");
            break;

        case BeatDetection.EventType.HitHat:
            Debug.Log("Hithat");
            break;

        case BeatDetection.EventType.Kick:
            Debug.Log("Kick");
            break;

        case BeatDetection.EventType.Snare:
            Debug.Log("Snare");
            break;
        }
    }
Exemplo n.º 4
0
 public void MusicSphereEventHandler(BeatDetection.EventInfo eventInfo)
 {
     if (eventInfo.messageInfo == BeatDetection.EventType.Energy)
     {
         GetComponent <Renderer>().material.color = Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f);
     }
 }
Exemplo n.º 5
0
 public void MyCallbackEventHandler(BeatDetection.EventInfo eventInfo)
 {
     for (int i = 0; i < textSync.Count; i++)
     {
         textSync[i].RandomColor();
     }
     for (int i = 0; i < hueSync.Count; i++)
     {
         hueSync[i].Randomize();
     }
     Debug.Log(eventInfo.messageInfo);
 }
Exemplo n.º 6
0
    void OnBeat(BeatDetection.EventInfo eventInfo)
    {
        CreateOneNote(GetRandomNote());

        //switch (eventInfo.messageInfo)
        //{
        //    case BeatDetection.EventType.Energy:
        //        break;
        //    case BeatDetection.EventType.HitHat:
        //        break;
        //    case BeatDetection.EventType.Kick:
        //        break;
        //    case BeatDetection.EventType.Snare:
        //        break;
        //}
    }
Exemplo n.º 7
0
    private int minFreq, maxFreq;                       //Max and min frequencies window

    public void MyCallbackEventHandler(BeatDetection.EventInfo eventInfo)
    {
        switch (eventInfo.messageInfo)
        {
        case BeatDetection.EventType.Energy:
            StartCoroutine(showText(energy, genergy));
            break;

        case BeatDetection.EventType.HitHat:
            StartCoroutine(showText(hithat, ghithat));
            break;

        case BeatDetection.EventType.Kick:
            StartCoroutine(showText(kick, gkick));
            break;

        case BeatDetection.EventType.Snare:
            StartCoroutine(showText(snare, gsnare));
            break;
        }
    }
Exemplo n.º 8
0
    public void MyCallbackEventHandler(BeatDetection.EventInfo eventInfo)
    {
        switch (eventInfo.messageInfo)
        {
        case BeatDetection.EventType.Energy:
            RotateColor();
            PinkflareOn();
            break;

        case BeatDetection.EventType.HitHat:
            LightningOn();
            break;

        case BeatDetection.EventType.Kick:
            VLightOn();
            break;

        case BeatDetection.EventType.Snare:
            BlueflareOn();
            break;
        }
    }
Exemplo n.º 9
0
    public void MyCallbackEventHandler(BeatDetection.EventInfo eventInfo)
    {
        switch (eventInfo.messageInfo)
        {
        case BeatDetection.EventType.Energy:
            if (enableEnergy)
            {
                Debug.Log(string.Format("Energy: {0}", audioSource.time));
                StartCoroutine(showText(energy, genergy));
            }
            break;

        case BeatDetection.EventType.HitHat:
            if (enableHitHat)
            {
                Debug.Log(string.Format("HitHat: {0}", audioSource.time));
                StartCoroutine(showText(hithat, ghithat));
            }
            break;

        case BeatDetection.EventType.Kick:
            if (enableKick)
            {
                Debug.Log(string.Format("Kick: {0}", audioSource.time));
                StartCoroutine(showText(kick, gkick));
            }
            break;

        case BeatDetection.EventType.Snare:
            if (enableSnare)
            {
                Debug.Log(string.Format("Snare: {0}", audioSource.time));
                StartCoroutine(showText(snare, gsnare));
            }
            break;
        }
    }