From: Rib R. <ri...@gm...> - 2005-03-18 01:04:32
|
On Thu, 17 Mar 2005 14:41:57 -0800, Joe Emenaker <jo...@em...> wrote: > Bill Zwicky wrote: > > > Joe Emenaker wrote: > > > >> ... addWidget could discover what kind of parameter a ParamModel is > >> and automatically give it the correct widget (ie, BooleanParamModel > >> gets a CheckBoxWidget, NumericParamModel might get a spinner, > >> EnumParamModel would get a ComboBoxWidget, etc). > > > > Wow, that would be *really* cool. I'd love to just whip up a sysex > > parser, and have the GUI automatically appear. > > My hope is that we can reduce the work involved in writing a driver (for > synths that don't do crazy stuff in their sysex) so that 90% of the work > is just defining the params (ie, location, data type, and name). That's exactly what the XML driver does. You give some basic information (manufacturer, model, etc), specify the type of checksum and encoding, then give a list of parameters. I thought about automatically generating the editor, but that would just look ugly. Instead, I'm working on EditorBuilder. You load up the XML driver you wrote, and it gives you a list of parameters. Then you drag parameters from the list into the editor. By default you get a combo box for lookup parameters, and a knob for range parameters. If you want a different type then you select the parameter and change the type in the properties window. That's about all that EB supports at the moment, but I plan to add support for lots of things including envelopes, scripts (so you can do things like make the range of one parameter depend on the value of another), and multiple containers (ie JTabbedPane, or another JSLFrame that pops up when you click a button). I think you're right that allowing the user to change the widget types would mess up the layout. But with the XML driver, you can just create your own editor in EditorBuilder if you don't like the standard one. At one point we talked about supporting multiple editors for a given patch type, and then allowing the user to choose which to use. |