From: <tt_...@gm...> - 2004-10-06 09:22:02
|
Hi Hiroo, Hiroo Hayashi wrote: > Hi, > > I'd like to propose another core interface change. > > summary: > 1. more OO (Object Oriented) interfaces for Patch related methods. > 2. introduce ISinglePatch and IBankPatch interfaces instead of > ISingleDriver and IBankDriver interfaces. > 3. number of interface methods was reduced by 6 (=9-3). > 4. most of delegation methods in Driver class was removed. (For > example we need Driver.export(Patch) but don't need > Driver.export(IPatch) any more. > 5. No affect on synth drivers (except minor changes for the XML driver > which uses new interfaces.) These items sound very good. > I found this during I made the change for calculateChecksum() I made > last week. I see this makes code clearer and think this is the way to > go. (This may be one of proposals Rib and/or Torsten made before, but I > could not understand at that time.) > > If you have any comments, let me know. > > ------------------------------------------------------------ > IPatchDriver.export(IPatch) -> IPatch.export() > IPatchDriver.send(IPatch, int, int) -> send(int, int) > IPatchDriver.hasEditor() -> IPatch.hasEditor() > IPatchDriver.edit(IPatch) -> IPatch.edit() All OK. > IPatchDriver.isNullDriver() -> IPatch.hasNullDriver() Currently I'm not understanding what a NullDriver is. Is it the currently used generic driver? Or is this just a method to determine if no driver is assigned to a patch? > ISingleDriver.play(IPatch) -> ISinglePatch.play() > ISingleDriver.send(IPatch) -> ISinglePatch.send() Good. But maybe IPatch.play()/IPatch.send() are more advisable, because of concerning future (more) general kinds of patches (like collected Patches). For example, if we introduce a "collecting Patch", which collect the TX7 voice patch and the TX7 performance patch (both determine the voice completely), it's more useful to send/play both together than each one separated. I hope the term "collected patch" is clear. I don't know the common term for what I mean. Of course I know that both methods are useless for bank patches, so the base definition has to check what kind of patch is actually choosen. But maybe larger code changes are necessary to implement my idea, so it's ok to make your step first. > IBankDriver.getNumPatches() -> IBankPatch.getNumPatches() > IBankDriver.getNumColumns() -> IBankPatch.getNumColumns() > IBankDriver.getPatchName(IPatch, int) -> IBankPatch.getName(int) > IBankDriver.setPatchName(IPatch, int, String) -> IBankPatch.setName(int, String) > IBankDriver.getPatch(IPatch, int) -> IBankPatch.get(int) > IBankDriver.checkAndPutPatch(IPatch, IPatch, int) -> IBankPatch.put(IPatch, int) > IBankDriver.deletePatch(IPatcha, int) -> IBankPatch.delete(int) Very good. We also need ISinglePatch.getName() resp. ISinglePatch.setName(), but both are already defined in IPatch interface. Why we need to define these methods in IBankPatch interface again? Is IBankPatch class not extending/implementing the IPatch interface? > new IPatch methods > getType() > isSinglePatch() > isBankPatch() Don't we need a method isConverterPatch() ? > removed IPatch methods > play() > send() > getNumPatches() > getNumColumns() > getName(int) > setName(int, String) > get(int) > put(IPatch, int) > delete(int) OK. Hope it's help. Bye Torsten |