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 > |
From: <tt_...@gm...> - 2004-08-03 12:47:57
|
Hi Joachim, Joachim Backhaus wrote: >>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. > It calls only "super.playPatch()" because of my changes. Original it calls "super.playPatch(Patch)", but the old driver.playPatch(Patch p) method did nothing with Patch p. From this point your are right. But I don't what the 2 lines "sysex[1180]..." and "sysex[1181]..." should do. These two lines doesn't appear in the sendPatch(IPatch) method. > 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? For me it's OK. I'm always a little bit carefull because I don't like to break someones code. Bye Torsten |
From: Hiroo H. <hir...@co...> - 2004-08-03 13:05:38
|
Hi, Joachim> Hmm, I suggest to replace the playPatch(IPatch) method Joachim> on the other synthdrivers with playPatch(), This OK. But... Joachim> remove the deprecated tag from playPatch(IPatch) Joachim> and change playPatch(IPatch) in the Driver class Joachim> to be an empty method, so that no new synthdriver Joachim> will use it until the method is overriden. My take is to leave Driver.playPatch(IPatch) marked as @deprecated until next release (0.20). It it just call Driver.playPatch(). This does not break any code and synth driver developer can know what's going on. BTW I have a basic question. Why we need playPatch() in each synth drivers? I think a driver independent dialog window is enough. It will include Torsten's MIDI sequencer. -- Hiroo Hayashi |
From: <tt_...@gm...> - 2004-08-05 08:15:30
|
Hi Hiroo Hayashi wrote: > Hi, > > Joachim> Hmm, I suggest to replace the playPatch(IPatch) method > Joachim> on the other synthdrivers with playPatch(), > This OK. But... > > Joachim> remove the deprecated tag from playPatch(IPatch) > Joachim> and change playPatch(IPatch) in the Driver class > Joachim> to be an empty method, so that no new synthdriver > Joachim> will use it until the method is overriden. > > My take is to leave Driver.playPatch(IPatch) marked as @deprecated until > next release (0.20). It it just call Driver.playPatch(). This does not > break any code and synth driver developer can know what's going on. > > > BTW I have a basic question. Why we need playPatch() in each > synth drivers? I think a driver independent dialog window is enough. It > will include Torsten's MIDI sequencer. I see only the reason that the playPatch() method needs the information of the assoziated MIDI port of the concerned driver. But generally I aggree to Hiroo. Bye Torsten |