From: Joachim B. <jba...@pi...> - 2005-03-15 08:29:21
|
> This is similar to the check-sum handling.=20 Maybe. > Encapsulating a simple thing > may make it just complicated. That's the question. Benefits of my suggestion: 1. Less redundancy 2. Simplified maintenance as the code is in the core classes and not copied to any driver. Disadvantages: 1. May make the reading of the driver code more complicated. But is this really so? Would it help to include the setBankNum codes in the JavaDoc and a chapter for that in the programming.html? In most cases it makes no difference, because the default value would be BANK_CHANGE_METHOD_MSB_LSB which is the same as now. And for another bank change method you would simply add this.setBankChangeMethod(Constants.BANK_CHANGE_METHOD_MSB) or this.setBankChangeMethod(Constants.BANK_CHANGE_METHOD_LSB) in the constructor. And the core/Constants class would not look that empty anymore. ;) Regards, Joachim Backhaus > -----Urspr=FCngliche Nachricht----- > Von: jsy...@li... > [mailto:jsy...@li...]Im=20 > Auftrag von Hiroo > Hayashi > Gesendet: Sonntag, 13. M=E4rz 2005 21:35 > An: JSynthLib Development > Betreff: Re: [Jsynthlib-devel] Suggestion for setBankNum >=20 >=20 > Joachim, >=20 > Joachim> Five minutes ago I thought this idea is very good.=20 > Joachim> Now I'm not shure anymore. ;) >=20 > If a driver uses 'BANK_CHANGE_METHOD_LSB', for example, it is=20 > more clear > and easy to be read just writing >=20 > msg.setMessage(ShortMessage.CONTROL_CHANGE, getChannel() - 1, > 0x20, // Bank Select (LSB) > bankNum); // Bank Number (MSB) > send(msg); >=20 > then using your method, isn't it? >=20 > This is similar to the check-sum handling. Encapsulating a=20 > simple thing > may make it just complicated. > --=20 > Hiroo Hayashi >=20 >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from=20 > real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick > _______________________________________________ > Jsynthlib-devel mailing list > Jsy...@li... > https://lists.sourceforge.net/lists/listinfo/jsynthlib-devel >=20 |