From: Joachim B. <jba...@pi...> - 2004-08-03 08:32:07
|
> Only the AlesisA6 and SCIProphet600 drivers seem > to make some important things, which are not done by sendPatch(). > I like to change these drivers, but without the hardware it's > hard to test if I break something. So I let it be. Hmm, these are both written by "Kenneth L. Martinez". Does anyone on this list own an Alesis Andromeda or Sequential Circuits Prophet 600? I think removing the playPatch method there wouldn't change anything: // Kludge: A6 doesn't seem to receive edit buffer dump, so user mix 127 // is being used for that purpose. public void playPatch(IPatch p) { byte sysex[] = new byte[1182]; System.arraycopy(((Patch)p).sysex, 0, sysex, 0, 1180); sysex[6] = 0; // user bank sysex[7] = 127; // mix # 127 sysex[1180] = (byte)(0xC0 + getChannel() - 1); // program change sysex[1181] = (byte)127; // mix # 127 IPatch p2 = new Patch(sysex); try { super.playPatch(p2); } catch (Exception e) { ErrorMsg.reportStatus (e); } } The newly created Patch p2 is simply ignored as "super.playPatch(p2)" just calls "super.playPatch()". So the whole code in the A6 driver looks superfluous. In the Prophet 600 at least playPatch(IPatch) can be changed to playPatch() as the changes are send before using the Driver class's "send" method. Hmm, I suggest to replace the playPatch(IPatch) method on the other synthdrivers with playPatch(), remove the deprecated tag from playPatch(IPatch) and change playPatch(IPatch) in the Driver class to be an empty method, so that no new synthdriver will use it until the method is overriden. Is that OK? Regards, Joachim Backhaus > -----Ursprungliche Nachricht----- > Von: tt_...@gm... [mailto:tt_...@gm...] > Gesendet: Dienstag, 3. August 2004 07:29 > An: jsynthlib-devel@sourceforge > Betreff: Re: [Jsynthlib-devel] Deprecated methods questions > > > Hi Joachim, > > Joachim Backhaus wrote: > > ************************* > > > > /** Play note. > > * @param p a <code>IPatch</code> value, which isn't > used! !!!FIXIT!!! > > * @deprecated Use playPatch(). > > */ > > public void playPatch(IPatch p) { // called by core and > some Editors > > playPatch(); > > } > > > > Why is that deprecated? > > There are many drivers that override this method and > > change the sysex array values of the Patch. > > And this leads to many deprecation warnings. > > > > Shouldn't the Driver be modified so that the IPatch is used > inside the > > playPatch(IPatch p) method? > > Or shouldn't just the deprecation tag be removed? > > I've put this to deprecated, because the > core.driver.playPatch doesn't use the parameter Patch. > The current patch to play is send by the menu-, popupmenu-, > icon-actions. > These actions send the current patch to the synth and then > call the driver.playPatch method. > So the driver.playPatch doesn't need to send the patch. > The playPatch method does only play the patch. > > I took a look at the concerning drivers and many drivers > doing the same things as in the "sendPatch(IPatch)" method, > which isn't > necessary. Only the AlesisA6 and SCIProphet600 drivers seem > to make some important things, which are not done by sendPatch(). > I like to change these drivers, but without the hardware it's > hard to test if I break something. So I let it be. > > Maybe I was too aggressiv. So I can remove the deprecated flag again. > But I interpreted the comment at the playPatch method in this kind. > > Bye > Torsten > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the > changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source > Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > Jsynthlib-devel mailing list > Jsy...@li... > https://lists.sourceforge.net/lists/listinfo/jsynthlib-devel > |