public override InstrumentData GetData()
    {
        DrumData data = new DrumData();

        data.deviceType = menuItem.deviceType.Drum;
        GetTransformData(data);
        data.jackOutSampID = sampOut.transform.GetInstanceID();
        data.jackOutSigID  = sigOut.transform.GetInstanceID();
        samp.getTapeInfo(out data.tapeLabel, out data.tapeFile);
        return(data);
    }
예제 #2
0
    public override InstrumentData GetData()
    {
        XyloRollData data = new XyloRollData();

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

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

        data.seqon = seqEnableButton.isHit;
        data.arpon = arpEnableButton.isHit;

        data.arpSetting   = arpPattern;
        data.arpSpeed     = arpSpeed;
        data.inputSetting = inputVal ? 1 : 0;

        data.inputSample = new string[2];

        samplerLoad tempSampLoad = sampleBank.GetComponent <samplerLoad>();

        if (tempSampLoad.queuedSample[0] != "")
        {
            data.inputSample[0] = tempSampLoad.queuedSample[0];
            data.inputSample[1] = tempSampLoad.queuedSample[1];
        }
        else
        {
            tempSampLoad.getTapeInfo(out data.inputSample[0], out data.inputSample[1]);
        }

        oscillatorBankComponentInterface _oscInterface = oscBank.GetComponent <oscillatorBankComponentInterface>();

        data.oscAamp  = _oscInterface.ampPercent[0];
        data.oscAfreq = _oscInterface.freqPercent[0];
        data.oscAwave = _oscInterface.wavePercent[0];

        data.oscBamp  = _oscInterface.ampPercent[1];
        data.oscBfreq = _oscInterface.freqPercent[1];
        data.oscBwave = _oscInterface.wavePercent[1];

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

        data.midiInConnection  = _midiIn.connectedDevice;
        data.midiOutConnection = _midiOut.connectedDevice;

        data.timelinePresent = true;
        data.timelineData    = _timeline.GetTimelineData();
        data.timelineHeight  = _timeline.heightHandle.transform.localPosition.y;
        List <timelineEvent.eventData> tempevents = new List <timelineEvent.eventData>();

        for (int i = 0; i < _timeline._tlEvents.Count; i++)
        {
            if (_timeline._tlEvents[i] != null)
            {
                tempevents.Add(_timeline._tlEvents[i].getEventInfo());
            }
        }
        data.timelineEvents = tempevents.ToArray();

        return(data);
    }