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

        base.Load(data);

        output.ID = data.jackOutID;
        input.ID  = data.jackInID;

        for (int i = 0; i < 3; i++)
        {
            _adsrInterface.xyHandles[i].setPercent(data.ADSRdata[i]);
        }
        _adsrInterface.setDefaults = false;
    }
    public override InstrumentData GetData()
    {
        ADSRData data = new ADSRData();

        data.deviceType = menuItem.deviceType.ADSR;
        GetTransformData(data);

        data.ADSRdata = new Vector2[3];
        for (int i = 0; i < 3; i++)
        {
            data.ADSRdata[i] = _adsrInterface.xyHandles[i].percent;
        }

        data.jackOutID = output.transform.GetInstanceID();
        data.jackInID  = input.transform.GetInstanceID();

        return(data);
    }