public override void Load(InstrumentData d)
    {
        ReverbData data = d as ReverbData;

        base.Load(data);
        input.ID  = data.jackInID;
        output.ID = data.jackOutID;

        level.setPercent(data.dialState);
        reverbControl.setPercent(data.reverbPercent);
    }
    public override void Load(InstrumentData d)
    {
        OscillatorData data = d as OscillatorData;

        base.Load(data);

        freqDial.setPercent(data.freq);
        ampDial.setPercent(data.amp);
        waveSlider.setPercent(data.wave);
        lfoSwitch.setSwitch(!data.lfo);

        ID = data.ID;
        signalOutput.ID = data.jackOutID;
        ampInput.ID     = data.jackInAmpID;
        freqInput.ID    = data.jackInFreqID;
    }
    void Start()
    {
        midipanel.newColor(colorGreen);
        jackpanel.newColor(colorGreen);
        handlepanel.newColor(colorGreen);

        glowSlider.setPercent(masterControl.instance.glowVal);
        for (int i = 0; i < panels.Length; i++)
        {
            panels[i].keyHit(i == curSelect);
        }

        if (PlayerPrefs.GetInt("midiOut") == 1)
        {
            string s = "DISABLE MIDI OUT";
            midipanel.label.text = s;
            midipanel.newColor(Color.HSVToRGB(0f, 230f / 255, 118f / 255));
        }
    }
Exemple #4
0
    public void updateFaderLength(float f)
    {
        faderLength               = f;
        faderBody.localScale      = new Vector3(1, 1, faderLength);
        faderSliderBar.localScale = new Vector3(1, 1, faderLength - .25f);

        Vector3 jackPos = new Vector3(.0005f, .001f, faderLength * .14f - .015f);

        inputA.transform.localPosition = jackPos;
        jackPos.z *= -1;
        inputB.transform.localPosition = jackPos;

        //change slider bounds
        fadeSlider.xBound = .095f * faderLength - .025f;

        //move slider
        if (fadeSlider.curState != manipObject.manipState.grabbed)
        {
            fadeSlider.setPercent(fadeSlider.percent);
        }
    }