Exemplo n.º 1
0
    // initialize audio
    void InitAudio()
    {
        // run the sequencer
        GetComponent <ChuckSubInstance>().RunFile("chickencer.ck", true);

        // add the float sync
        m_ckPlayheadPos = gameObject.AddComponent <ChuckFloatSyncer>();
        m_ckPlayheadPos.SyncFloat(GetComponent <ChuckSubInstance>(), "playheadPos");
        // add the int sync
        m_ckCurrentChicken = gameObject.AddComponent <ChuckIntSyncer>();
        m_ckCurrentChicken.SyncInt(GetComponent <ChuckSubInstance>(), "currentChicken");
    }
Exemplo n.º 2
0
 void SetChuckVars()
 {
     //metronome
     myChuckTempo      = GetComponent <ChuckSubInstance>();
     myMetronomeSyncer = gameObject.AddComponent <ChuckFloatSyncer>();
     myMetronomeSyncer.SyncFloat(myChuckTempo, "BEATS_PER_MIN"); //current instance of chuck is determining pos value
     //instruments
     myTempoSyncer = gameObject.AddComponent <ChuckFloatSyncer>();
     myTempoSyncer.SyncFloat(myChuck, "BEATS_PER_MIN");  //current instance of chuck is determining pos value
     myMeterSyncer = gameObject.AddComponent <ChuckFloatSyncer>();
     myMeterSyncer.SyncFloat(myChuck, "BEATS_PER_MEAS"); //current instance of chuck is determining pos value
     myInstrumentSyncer = gameObject.AddComponent <ChuckIntSyncer>();
     myInstrumentSyncer.SyncInt(myChuck, "instrument");
 }