From: Joe E. <jo...@em...> - 2011-09-05 00:32:46
|
On 09/04/2011 01:44 PM, fra...@us... wrote: > Updated list of supported synths: > > I have added all the drivers in SVN that are not mentioned. I have judged whether patch/bank/editing is supported based on the existence of files with Driver/Editor in their names, but have not performed any checks beyond this. This, coming on the heels of Bill's alteration of build.xml so that it always builds a new synthdrivers.properties gave me a thought... Would it be worthwhile to make a method which could interrogate all of the synthdriver classes and generate the synths.html file automatically, and to include that with the part of build.xml which generates the properties file? - Joe |
From: William Z. <wrz...@po...> - 2011-09-05 00:58:14
|
On Sun, Sep 4, 2011 at 5:32 PM, Joe Emenaker <jo...@em...> wrote: > Would it be worthwhile to make a method which could interrogate all of > the synthdriver classes and generate the synths.html file automatically, > and to include that with the part of build.xml which generates the > properties file? > Grape minds drink alike! I just checked in an overhaul of DeviceListWriter that does just that. Doesn't work very well, cuz: * There's no source for the code to get those short comments, and the long infoText is WAY to big for this table. * Probing the device capabilities requires calling constructor(Preferences), which fails in a few cases. * Probing for the patch editor requires *creating* the patch editor, which crashes and/or hangs in most cases. Feel free to improve it. -Bill Zwicky |
From: frankster <jsy...@te...> - 2011-09-05 07:32:54
|
On 05/09/2011 01:57, William Zwicky wrote: > On Sun, Sep 4, 2011 at 5:32 PM, Joe Emenaker <jo...@em...> wrote: > >> Would it be worthwhile to make a method which could interrogate all of >> the synthdriver classes and generate the synths.html file automatically, >> and to include that with the part of build.xml which generates the >> properties file? >> This sounds like a good plan. frankie |
From: Joe E. <jo...@em...> - 2011-09-05 05:45:15
|
On 09/04/2011 05:57 PM, William Zwicky wrote: > I just checked in an overhaul of DeviceListWriter that does just that. > Doesn't work very well, cuz: > * There's no source for the code to get those short comments, and the long > infoText is WAY to big for this table. > * Probing the device capabilities requires calling > constructor(Preferences), which fails in a few cases. > * Probing for the patch editor requires *creating* the patch editor, which > crashes and/or hangs in most cases. Well, I was *also* thinking that, if we're going to have dynamically-loadable or downloadable synthdrivers, then there's going to need to be some kind of way to interrogate the synthdrivers to ask them what they can do. We may be able to get some mileage out of merely parsing the classnames and pulling off "BankDriver" off of the end and whatnot... and we can also use Java's inspection features to find out what each class' superclass is (ie, Driver or BankDriver, etc.). However, one could argue that the *right* way to do it is to add some static identifier methods (like getManufacturer(), getSynthName(), getDriverType(), etc.) which would be abstract in Driver or BankDriver (so that every synthdriver had to define them). If we decided to do this, we should implement it sooner than later, because there will only be more drivers in the future. - Joe |
From: William Z. <wrz...@po...> - 2011-09-05 06:55:00
|
On Sun, Sep 4, 2011 at 10:45 PM, Joe Emenaker <jo...@em...> wrote: > Well, I was *also* thinking that, if we're going to have > dynamically-loadable or downloadable synthdrivers, then there's going to > need to be some kind of way to interrogate the synthdrivers to ask them > what they can do. We may be able to get some mileage out of merely > parsing the classnames and pulling off "BankDriver" off of the end and > whatnot... and we can also use Java's inspection features to find out > what each class' superclass is (ie, Driver or BankDriver, etc.). > > However, one could argue that the *right* way to do it is to add some > static identifier methods (like getManufacturer(), getSynthName(), > getDriverType(), etc.) which would be abstract in Driver or BankDriver > (so that every synthdriver had to define them). If we decided to do > this, we should implement it sooner than later, because there will only > be more drivers in the future. > You might look at ServiceLoader<http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html>. Granted, Devices aren't services, but this seems to implement some of the mechanism we want. Not all of it; I don't think it will load jar files after the app has started up. However, the really right way to do it is with a config file that allows us to examine available drivers without actually loading the classes. This conserves memory, and also holds down startup time. This isn't a problem for us right now, but some professional apps have plugin synths that are incredibly huge. If by some fluke JSynthLib becomes popular, we may need this. Googling 'round the net, I also found a toy system: http://sourceforge.net/projects/javasps/ A more powerful system: http://jpf.sourceforge.net/ And extreme overkill: http://en.wikipedia.org/wiki/OSGi -Bill Zwicky |