Package org.jsynthlib.xmldevice

Examples of org.jsynthlib.xmldevice.XmlPatchDriverSpecDocument


    }

    void createPatchDriver(FrameWrapper patchEditor, String infoText,
            IPatchDriver driver) throws IllegalAccessException,
            NoSuchFieldException, IOException {
        XmlPatchDriverSpecDocument document =
                XmlPatchDriverSpecDocument.Factory.newInstance();
        XmlPatchDriverSpec driverSpec = document.addNewXmlPatchDriverSpec();

        XmlDriverDefs drivers = deviceSpec.getDrivers();
        XmlDriverDef deviceDriverSpec = drivers.addNewXmlDriverDef();
        deviceDriverSpec.setDriverClass(driver.getClass().getName());
        deviceDriverSpec.setDriverType(XmlDriverDef.DriverType.PATCH);

        addGenericFields(driver, driverSpec, infoText);

        PatchParams patchParams = driverSpec.addNewPatchParams();
        groupMap.put("", patchParams);

        List<SysexWidget> sysexWidgets =
                SysexWidgetFinder.findSysexWidgets(patchEditor);
        if (sysexWidgets.size() > 0) {
            for (SysexWidget sysexWidget : sysexWidgets) {
                handleSysexWidget(patchEditor, sysexWidget);
            }
            properties.put(newDriverKey(), driver.getClass().getSimpleName());
            document.save(new File(outDir, driver.getClass().getSimpleName()
                    + ".xml"));
        }
    }
View Full Code Here


        InputStream inputStream =
                getClass()
                        .getClassLoader()
                        .getResourceAsStream(
                                "org/jsynthlib/synthdrivers/RolandD50/D50SingleDriver.xml");
        XmlPatchDriverSpecDocument document =
                XmlPatchDriverSpecDocument.Factory.parse(inputStream);
        XmlPatchDriverSpec xmlDriverSpec = document.getXmlPatchDriverSpec();
        PatchParamSpec patchParamSpec =
                tested.getPatchParamSpec(xmlDriverSpec,
                        "D80ED8B0-B90A-11E3-A5E2-0800200C9A66");
        assertNotNull(patchParamSpec);
        assertTrue(patchParamSpec instanceof IntParamSpec);
View Full Code Here

TOP

Related Classes of org.jsynthlib.xmldevice.XmlPatchDriverSpecDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.