Hi JSynthLib fans,
Well, after many hours of careful troubleshooting and tinkering, I was able to
pull in a patch from my Korg Poly-800 that had been retrofitted with the
HAWK-800 upgrade kit.
But
as with most things in life, I now have more questions than I started
with. I am hoping that someone who has more experience with JSynthLib
than me can help me out.
To get the patch "get" and "paste" to
work required that a) I set sysexID = "F0422106*"; this is the header
for a patch dump coming from the Poly-800. and b) that I comment out
sending a bank change in requestPatchDump.
Now, I guess that the sysexID must be a generic way for JSynthLib to identify a
valid patch for this particular synth but I sure as heck couldn't find anything
in the core drivers that told me this. Was I looking in the wrong place? Can
anyone show me where the doc's or commented code said that?
Next, the Poly-800 sends out an
acknowledgment sysex message after it receives a bank change. So the
"Get" code seems to have choked on the 7 bytes that it received after the bank
change was sent which is just
prior to receiving the patch sysex message itself. That happens because
requestPatchDump has to set the bank first before requesting the required patch
from that patch bank.
So anyway, I could
just rewrite the sysex implementation on the Poly-800 (since I am the creator
of the HAWK-800) so that it
doesn't send an acknowledgment sysex message but that seems to be a bit
of a cop out and especially so if there is a way that I could rewrite
the requestPatchDump so that it would intercept that ack. message and
just ignore it (dump in the bit bucket) instead of choking on it?
Now, I don't want to be too
pushy here because I like JSynthLib and I like the idea of an open
source patch editor but hopefully someone on this list can answer a
question or two because it has taken me many hours to get this far and I
have many more questions that need answering. At this rate, it could take me
another year before I am able to create a slider volume control (OK that's a
slight exaggeration).
Here is another
question, the Poly-800 does not support patch names in its sysex
implementation nor programming but does that stop JSynthLib from using patch
names within JSynthLib itself? Is it possible to save patch names outside
of the sysex message but inside the patch when stored in JSynthLib?
Anyway, in advance, I would like to thank anyone that might provide me with
some assistance.
I really hope I get some help because this could be a long, hard road to travel
alone, in silence, blindly trudging ever more lonely toward the eternal abyss.
:-)
Here's my singledriver below:
/*
* @version $Id: KorgHAWK800SingleDriver.java 111 2009-08-20 04:05:40Z hawkins $
*/
package synthdrivers.KorgHAWK800;
import core.Driver;
import core.ErrorMsg;
import core.JSLFrame;
import core.Patch;
import core.SysexHandler;
public class KorgHAWK800SingleDriver extends Driver
{
private int curBank = 0, curPatch = 0;
public KorgHAWK800SingleDriver() {
super("Single", "Michael Hawkins");
sysexID = "F0422106*";
sysexRequestDump=new SysexHandler("F0 42 21 07 *patchNum* F7");
patchSize=262;
deviceIDoffset=-1;
bankNumbers = new String[] {
"0-Bank1", "1-Bank2","2-Bank3", "3-Bank4"
};
// patch numbers use octal representation with no zeroes (11-88)
patchNumbers=new String[] {"11","12","13","14","15","16","17","18",
"21","22","23","24","25","26","27","28",
"31","32","33","34","35","36","37","38",
"41","42","43","44","45","46","47","48",
"51","52","53","54","55","56","57","58",
"61","62","63","64","65","66","67","68",
"71","72","73","74","75","76","77","78",
"81","82","83","84","85","86","87","88"};
}
public void setBankNum(int bankNum)
{
try {
send(new byte[] {
(byte)0xF0,(byte)0x42,(byte)0x21,(byte)0x0E,
(byte)bankNum,(byte)0xF7
});
} catch (Exception e) {}
}
public void requestPatchDump(int bankNum, int patchNum) {
//setBankNum(bankNum);
try {Thread.sleep(250); } catch (Exception e){}
byte sysex[] = {
(byte)0xF0, (byte) 0x42, (byte) 0x21, (byte) 0x07,
(byte)patchNum, (byte) 0xF7
};
send(sysex);
}
public void storePatch (Patch p, int bankNum,int patchNum)
{
setBankNum(bankNum);
try {Thread.sleep(250); } catch (Exception e){}
//patchNum=patchNum&0x3F;
((Patch)p).sysex[4]=(byte)patchNum;
sendPatchWorker(p);
setPatchNum(patchNum);
}
public void sendPatch (Patch p)
{
byte [] newsysex = new byte[262];
System.arraycopy(((Patch)p).sysex,0,newsysex,0,262);
newsysex[4] = (byte)(0x40);
try {
send(newsysex);
}catch (Exception e) {ErrorMsg.reportStatus(e);}
}
public Patch createNewPatch()
{
byte [] sysex = new byte[262];
sysex[0]=(byte)0xF0; sysex[1]=(byte)0x42; sysex[2]=(byte)0x21;
sysex[3]=(byte)0x06; sysex[261]=(byte)0xF7;
Patch p = new Patch(sysex, this);
//setPatchName(p,"NewPatch");
calculateChecksum(p);
return p;
}
protected void calculateChecksum(Patch p,int start,int end,int ofs)
{
// no checksum
}
//public JSLFrame editPatch(Patch p) {
// return new KorgHAWK800SingleEditor((Patch)p);
protected JSLFrame editPatch(Patch p) {
return (new synthdrivers.Generic.HexDumpEditorFrame(p));
}
}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Jsynthlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsynthlib-devel