From: Hiroo H. <hir...@co...> - 2004-10-22 04:16:23
|
> > I think it is more consistent for IBankPatch.delete(int) to put a single > > patch which createPatch() method of the bank driver uses. > > BankPatch.createPatch() is an abstract method. core code cannot not know > > what single patch is filled in by createPatch(). What we can do is to > > document on IBankPatch.delete(int) method. > > I don't know if I understood you right. > Yes, IBankPatch.delete should replace the desired bank patch place > with a new, default single patch. > Is it possible to evaluate the appropriate SinglePatch.createPatch() > method from the bank patch? Yes, it is. BankEditor.java gets the single driver by myModel.getPatchAt(0, 0).getDriver() First I saw the code, I thought it was tricky. But it should work well. > I think it should be possible, because BankDriver knows its Device > and the singleSysexID of the single patch, which it's holding. It may be possible to use Device and syngleSysexID but it would be an expensive way. > If yes, we could use the single patch createPatch() method to create > the patch and then we can use the BankDriver.putPatch(Patch bank, > Patch single, int patchNum) method to replace the old patch from the > bank patch. Is it clear? I think I understand you. But as I wrote, BankPatch.createPatch() is an abstract method. We cannot do what you wrote in core. What we can do is to document clearly and to let synth driver developers do that. > BTW, maybe "erasePatch(int)" is a better name for this purpose than delete(int). Good idea. -- Hiroo Hayashi |