From: Mathias L. <mat...@br...> - 2004-06-27 20:06:36
|
sön 2004-06-27 klockan 12.29 skrev Werner Schweer: > On Saturday 26 June 2004 12:46, Mathias Lundgren wrote: > > Ayh! > > > > Hope you had/are having a good time in Karlsruhe. I'll do my best to get > > there next year. > > > > Anyways, I'm thinking of unifying settings for the midi editors, since I > > think it's pretty annoying that everytime you close an editor, or reopen > > a song, the ctrl-panes are closed etc etc etc... Major annoyance, but > > hopefully not for long. > > > > I think the best data element to use for associating editor settings > > would be the parts. It would work if the serials for the parts are saved > > (did a little test, and it seems to work fine with snGen through saves). > > That gives each part a unique id (persistant through load/save), so it's > > possible to make a match between the id and a setting for an editor > > (which will be a new class). When opening a part in either the pianoroll > > or drumeditor, make a match between part and editor settings, and apply > > these settings (if any custom changes were made - otherwise, use > > default). The tables/lists for the parts and the editor settings will be > > stored in the song, and read when the project is loaded. If many parts > > are opened for editing at once, ermmm, do something funny like check if > > one part is associated with a custom setting, and if so, use the latest > > one, or something like that. > > > > Any objections? Werner? > > > > /Mathias > > that whould be a very comfortable solution. Something much simpler is > implemented to remember some settings between different editor invocations. > Size/Geometry raster and maybe some other values are stored as static > variables in the editor class. Everytime an editor object changes raster > the static variable is also changed. If an new editor is instantiated this > static values are used for initialization (e.g. the last editor settings > are remembered). Maby it helps if we extend this mechanism to other editor > settings as ctrl-pane values. This "dynamic config values" are already > saved in the song file. Of course this editor settings are not bound to > specific parts so your proposel whould be more comfortable (but also > more work to implement). > > /werner So I've noticed. Yes, ctrl-pane values will definitely be part of the mechanism. I've also noticed that settings for toolbars and other things in the gui are not stored when closing. I'm thinking of implementing this too (+ other things). However, I still think it's necessary for certain attributes to be global throughout the editors (f.ex. movements of toolbars), but probably not very many. One thing though; I'm not completely happy with the current class design for the midieditors. Right now, I'm trying to create another class (ExtendedMidiEditor or something like that) specifically for the DrumEdit + Pianoroll (perhaps WaveEdit too), since a lot of the things that goes into MidiEditor right now, are only used for these two (f.ex. quant, ctrl-panes etc etc etc...). If we connect the "custom settings" with different parts, this class can implement all the functions for matching parts to a specific configuration, and the ListEdit, MasterEdit etc, based on MidiEditor, can ignore this completely and become much cleaner. /Mathias |