Skip navigation links
org.jsynthlib.device.model

Class AbstractPatchDriver

    • Constructor Detail

      • AbstractPatchDriver

        public AbstractPatchDriver(String patchType,
                                   String authors)
        Creates a new Driver instance.
        Parameters:
        patchType - The patch type. eg. "Single", "Bank", "Drumkit", etc.
        authors - The names of the authors of this driver.
      • AbstractPatchDriver

        public AbstractPatchDriver(String authors)
    • Method Detail

      • isSingleDriver

        public final boolean isSingleDriver()
        Description copied from interface: IDriver
        Returns whether this driver is a Single Driver.
        Specified by:
        isSingleDriver in interface IDriver
      • isBankDriver

        public final boolean isBankDriver()
        Description copied from interface: IDriver
        Returns whether this driver is a Bank Driver.
        Specified by:
        isBankDriver in interface IDriver
      • isConverter

        public boolean isConverter()
        Description copied from interface: IDriver
        Returns whether this driver is a Converter. Equivalent with instanceof IConverter. Note that there can be a Driver which are both Single Driver and Converter.
        Specified by:
        isConverter in interface IDriver
        See Also:
        IConverter
      • getPatchNumbersForStore

        public String[] getPatchNumbersForStore()
        Description copied from interface: IPatchDriver
        Returns String[] list of patch numbers for writable patches. This can be overridden if some patch locations are read only. e.g. the Waldorf Pulse has 100 patches, but only 0 to 39 are writable. Currently writable patches are assumed to start at patch location 0. (This has nothing to with the "Storable" class in JSynthLib.)
        Specified by:
        getPatchNumbersForStore in interface IPatchDriver
        See Also:
        DriverUtil#generateNumbers
      • getPatchName

        public String getPatchName(Patch p)
        Gets the name of the patch from the sysex. If the patch uses some weird format or encoding, this needs to be overidden in the particular driver.
        Specified by:
        getPatchName in interface IDriver
        See Also:
        Patch.getName()
      • setPatchName

        public void setPatchName(Patch p,
                                 String name)
        Set the name of the patch in the sysex. If the patch uses some weird format or encoding, this needs to be overidden in the particular driver.
        Specified by:
        setPatchName in interface IDriver
        See Also:
        Patch.setName(String)
      • storePatch

        public void storePatch(Patch p,
                               int bankNum,
                               int patchNum)
        Sends a patch to a set location on a synth.

        Override this if required.

        Specified by:
        storePatch in interface IDriver
        See Also:
        Patch.send(int, int)
      • getFullPatchName

        protected String getFullPatchName(Patch p)
        Returns String .. full name for referring to this patch for debugging purposes.

Copyright © 2014. All Rights Reserved.