コード例 #1
0
    public override void Awake()
    {
        base.Awake();
        cubeList    = new List <List <Transform> >();
        jackList    = new List <Transform>();
        seqList     = new List <sequencer>();
        samplerList = new List <clipPlayerSimple>();

        cubeStates = new bool[max][];
        tapeList   = new string[max][];
        rowMute    = new bool[max];
        for (int i = 0; i < max; i++)
        {
            cubeStates[i] = new bool[max];
            tapeList[i]   = new string[] { "", "" };
        }

        beatSlider = GetComponentInChildren <sliderNotched>();
        swingDial  = GetComponentInChildren <dial>();

        _sampleDuration = 1.0 / AudioSettings.outputSampleRate;
        _beatManager    = ScriptableObject.CreateInstance <beatTracker>();

        for (int i = 0; i < dimensionDisplays.Length; i++)
        {
            dimensionDisplays[i].GetComponent <Renderer>().material.SetColor("_TintColor", Color.white);
            dimensionDisplays[i].gameObject.SetActive(false);
        }

        dimensionDisplays[0].GetComponent <Renderer>().material.SetFloat("_EmissionGain", .3f);
        dimensionDisplays[1].GetComponent <Renderer>().material.SetFloat("_EmissionGain", .3f);
    }
コード例 #2
0
 public override void Awake()
 {
     base.Awake();
     transcriber  = GetComponent <waveTranscribeLooper>();
     audioSource  = GetComponent <AudioSource>();
     durSlider    = GetComponentInChildren <sliderNotched>();
     _beatManager = ScriptableObject.CreateInstance <beatTracker>();
 }
コード例 #3
0
    public override void Awake()
    {
        base.Awake();
        _beatManager   = ScriptableObject.CreateInstance <beatTracker>();
        sticks         = GetComponentsInChildren <drumstick>();
        signal         = GetComponent <xylorollSignalGenerator>();
        _adsrInterface = GetComponentInChildren <adsrInterface>();
        inputSwitch    = GetComponentInChildren <basicSwitch>();
        signal.spawnVoices(voiceCount, _adsrInterface.volumes, _adsrInterface.durations);

        SpawnKeys();
        oscBank.SetActive(inputVal);
        sampleBank.SetActive(!inputVal);

        _timeline.setStartTracks(24);

        for (int i = 0; i < 24; i++)
        {
            keyStates[i] = new keyState(false);
        }
    }