public interface IDriver
IPatchDriver
,
IConverter
Modifier and Type | Method and Description |
---|---|
void |
calculateChecksum(byte[] sysex,
int start,
int end,
int ofs)
Caluculate check sum of a byte array
sysex . |
void |
calculateChecksum(Patch patch)
Calculate check sum of a
Patch . |
boolean |
canCreatePatch()
Check if this driver supports (implements createPatch()) creating a new
patch.
|
Patch |
createPatch()
Create a new Patch for this driver.
|
Patch |
createPatch(byte[] sysex)
Create a patch from a byte array for the driver.
|
Patch[] |
createPatches(SysexMessage[] msgs)
Create an array of patches from an array of SysexMessage for the driver.
|
JSLFrame |
editPatch(Patch patch)
Override this if your driver implement Patch Editor.
|
String |
getAuthors()
return the names of the authors of this driver.
|
String[] |
getBankNumbers()
Returns String[] returns full list of bankNumbers.
|
int |
getChannel()
Return MIDI channel number.
|
int |
getChecksumEnd() |
int |
getChecksumOffset() |
int |
getChecksumStart() |
Device |
getDevice()
Return
Device with which this driver go.. |
int |
getDeviceID()
Return MIDI devide ID.
|
int |
getDeviceIDoffset() |
String |
getPatchName(Patch patch)
Gets the name of the patch from the sysex.
|
int |
getPatchNameSize()
Getter of patchNameSize.
|
int |
getPatchNameStart() |
String[] |
getPatchNumbers()
Returns String[] returns full list of patchNumbers.
|
int |
getPatchSize()
Return the size of the patch which the driver handles.
|
String |
getPatchType()
return type of patch which the driver handles.
|
String |
getSysexID() |
SysexHandler |
getSysexRequestDump() |
int |
getTrimSize() |
boolean |
hasEditor() |
boolean |
isBankDriver()
Returns whether this driver is a Bank Driver.
|
boolean |
isConverter()
Returns whether this driver is a Converter.
|
boolean |
isSingleDriver()
Returns whether this driver is a Single Driver.
|
void |
playPatch(Patch patch)
Play note.
|
void |
requestPatchDump(int bankNum,
int patchNum)
Request the synth to send a patch dump.
|
void |
send(MidiMessage msg)
Send a MidiMessage to the MIDI outport for this driver.
|
void |
sendPatch(Patch patch)
Sends a patch to the synth's edit buffer.
|
void |
setBankNumbers(String[] bankNumbers) |
void |
setChecksumEnd(int checksumEnd) |
void |
setChecksumOffset(int checksumOffset) |
void |
setChecksumStart(int checksumStart) |
void |
setDevice(Device device)
Set
Device with which this driver go. |
void |
setDeviceIDoffset(int deviceIDoffset) |
void |
setPatchName(Patch patch,
String s)
Set the name of the patch in the sysex.
|
void |
setPatchNameSize(int patchNameSize) |
void |
setPatchNameStart(int patchNameStart) |
void |
setPatchNumbers(String[] patchNumbers) |
void |
setPatchSize(int patchSize) |
void |
setSysexID(String sysexID) |
void |
setSysexRequestDump(SysexHandler sysexRequestDump) |
void |
setTrimSize(int trimSize) |
void |
storePatch(Patch patch,
int bankNum,
int patchNum)
Sends a patch to a set location on a synth.
|
boolean |
supportsPatch(String patchString,
byte[] sysex)
Compares the header & size of a Patch to this driver to see if this
driver is the correct one to support the patch.
|
String |
toString()
Returns full name for referring to this Driver.
|
int |
trimSysex(Patch patch)
This method trims a patch, containing more than one real patch to a
correct size.
|
String getPatchType()
String getAuthors()
void setDevice(Device device)
Device
with which this driver go.Device getDevice()
Device
with which this driver go..boolean supportsPatch(String patchString, byte[] sysex)
patchString
- the result of Patch.getPatchHeader()
.sysex
- a byte array of sysex messagetrue
if this driver supports the Patch.boolean isSingleDriver()
boolean isBankDriver()
boolean isConverter()
instanceof IConverter
. Note that there can be a Driver which
are both Single Driver and Converter.IConverter
int trimSysex(Patch patch)
patch
- the patch, which should be trimmed to the right size#fixPatch(Patch, String)
,
createPatches(SysexMessage[])
String getPatchName(Patch patch)
Patch.getName()
void setPatchName(Patch patch, String s)
Patch.setName(String)
boolean hasEditor()
Patch.hasEditor()
JSLFrame editPatch(Patch patch)
Patch.edit()
void calculateChecksum(Patch patch)
Patch
.
Need to be overridden if a patch is consist from multiple SysEX messages.
p
- a Patch
valuevoid storePatch(Patch patch, int bankNum, int patchNum)
Override this if required.
Patch.send(int, int)
int getPatchNameSize()
void playPatch(Patch patch)
Patch.play()
,
ISinglePatch#play()
void sendPatch(Patch patch)
Override this in the subclass if parameters or warnings need to be sent to the user (aka if the particular synth does not have a edit buffer or it is not MIDI accessable).
Patch.send()
,
ISinglePatch#send()
void send(MidiMessage msg)
String[] getPatchNumbers()
DriverUtil#generateNumbers
int getPatchSize()
SysexGetDialog
uses this to estimate timeout value.SysexGetDialog
String[] getBankNumbers()
DriverUtil#generateNumbers
Patch[] createPatches(SysexMessage[] msgs)
requestPatchDump(int, int)
.msgs
- an array of SysexMessage.IPatch
value.requestPatchDump(int, int)
,
SysexGetDialog
void requestPatchDump(int bankNum, int patchNum)
Patch createPatch(byte[] sysex)
IDriver.supportsPatch()
returns true
.sysex
- a byte array of sysex data.IPatch
object.supportsPatch(String, byte[])
,
DriverUtil#createPatch(byte[])
boolean canCreatePatch()
createPatch()
String toString()
Patch createPatch()
int getChannel()
void calculateChecksum(byte[] sysex, int start, int end, int ofs)
sysex
.
The checksum calculation method of this method is used by Roland, YAMAHA, etc.
Compatibility Note: This method became 'static' method.
sysex
- a byte arraystart
- start offsetend
- end offsetofs
- offset of the checksum dataAbstractDriver.calculateChecksum(Patch)
int getDeviceID()
String getSysexID()
void setSysexID(String sysexID)
int getDeviceIDoffset()
void setDeviceIDoffset(int deviceIDoffset)
SysexHandler getSysexRequestDump()
void setSysexRequestDump(SysexHandler sysexRequestDump)
int getChecksumOffset()
void setChecksumOffset(int checksumOffset)
int getChecksumStart()
void setChecksumStart(int checksumStart)
int getChecksumEnd()
void setChecksumEnd(int checksumEnd)
int getPatchNameStart()
void setPatchNameStart(int patchNameStart)
int getTrimSize()
void setTrimSize(int trimSize)
void setPatchSize(int patchSize)
void setPatchNumbers(String[] patchNumbers)
void setBankNumbers(String[] bankNumbers)
void setPatchNameSize(int patchNameSize)
Copyright © 2014. All Rights Reserved.