Data source ----------- Datas sources are used as bridge between ES and UI (see General file). Data sources have structure like a database. Some table, where are some columns and lines. General source -------------- General source provides list of properties which are available in given data source object. Data sources are divided into 2 parts: 1. data source itselfs doesn't provide _REAL_ datas - it is just 'template' - it need to be 'created' by using some alias which then provides real datas. It can provide only 'list' of all items (which then can be used to create real data source) 2. instance of source created from (1) using alias name Defined columns: 1. Alias Used while referecing property 2. Type Prioerty type (general) 3. TypeFlags flags related to type 4. Callback callbacks for get/set 5. Flags general flags Types ----- Every property need to have some 'base' type. 1. int integer 2. float float 3. list list which can consists of more types 4. string string 5. data source another data source Values list ----------- Values list are basically 2 tables. First defines all available types and second physical list. List can be single selcatable or multi selectable (flags) Type table ---------- 1. alias alias used while referencing column 2. text name text name which user see in 'header' 3. type same as above Data table ---------- Physical list. Number of columns is equal to length of type table Example: IT data source alias | type | description -----------|-------------|----------------------------- ins | data src | list of all instruments name | string | song name ... ins data source alias | type | description -----------|-------------|----------------------------- alias | string | ins alias name | string | instrument name provider | string | instrument provider name envelopes | data src | envelopes events | data src | events scripts | data src | scripts ... envelopers data source alias | type | description -----------|-------------|----------------------------- points | data src | physical envelope points connection | list | type of points connection loops | data src | loops vib_frq | int | vibrato frq ... So, in real, if we want to edit 'vibaro' freq, the only thing we need to do is create editor box, connect to 'relevant' data source and set item to 'vib_frq' There is some root base data source (such as 'song list'). All other is hierarchy of data connected data sources. EXAMPLE: defition of 'sample manager' (simple version - not real) +----------------------------------------------------------------+ | |new| |delete| |sort| |X| | +----------------+-----------------------------------------+-----+ | sample 1 | _____________ | __ | | sample 2 | / \ | || | | drum | / \ | __ | | vzuuum | / \ | || | | booom | | | | __ | | bleeee | | | | || | | | | | /\ | __ | | | / |______/ \ | || | | | / \ | | | | / \ | | | +-----------------------------------------+-----+ | | |copy| |paste| |cut| |normalize| |load| | | | |save| | | | |size: 12345| | | | |frq: 44100| | +----------------+-----------------------------------------------+ Window have PRIVATE 'sample source instance' called 'smp'. For this data source we need access 'instrument providers' of general data sources - and if there is alias 'wave' by which we can assec 'samples' which we need. If there is not 'wave' record then song doesn't have created wave ip - and window stay empty. Global data sources are passed while creating and can be also changed runtime (menu, whatever). Sample view connected to 'smp.data' Size connected to 'smp.size' etc.