Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:creating_events.txt [2013/09/04 19:49]
tehom Massive update & restructuring
dev:creating_events.txt [2022/05/06 16:07] (current)
Line 36: Line 36:
 To create a new sort of event, you will need these things: To create a new sort of event, you will need these things:
   * A unique name as a std:string   * A unique name as a std:string
-  * A unique name for each new property, also as a std:string.+  * A unique name for each new property, as a PropertyName which is basically an interned std::string.
   * A subordering, which controls whether it is first if there are two events at the same time.  It's an integer that means sorting priority.  You probably shouldn't make the subordering negative, which is the realm of key signatures and time signatures.   * A subordering, which controls whether it is first if there are two events at the same time.  It's an integer that means sorting priority.  You probably shouldn't make the subordering negative, which is the realm of key signatures and time signatures.
  
Line 116: Line 116:
 ===== Saving and restoring properties ===== ===== Saving and restoring properties =====
  
-This part is easy.  You don't have to do anything special when you use a new property type.  Rosegarden automatically writes all of an event's properties to the savefile, and automatically reads all of them when you restore.+This part is easy.  You don't have to do anything special when you use a new property type.  Rosegarden automatically writes all of an event's properties to the savefile, and automatically reads all of them when you restore.  See [[XML_format]]
  
 ===== Adapters ===== ===== Adapters =====
Line 131: Line 131:
   * One constructor that constructs it just from a reference to Event.   * One constructor that constructs it just from a reference to Event.
   * A method named getAsEvent that, given a time, returns a new Event (on the heap) corresponding to that adapter's data.   * A method named getAsEvent that, given a time, returns a new Event (on the heap) corresponding to that adapter's data.
- 
-===== XML format ===== 
- 
-Rosegarden's file format is a gzipped XML file with 
-a .rg extension.  (We use zlib to read and write files.) 
- 
-The most basic XML elements are event and property. 
-Event has a type, subordering (sorry, forgot to describe 
-that, it's not terribly important, it just indicates the 
-ordering of events in a segment where the absolute times 
-are equal -- so we can display clef before key before any 
-notes at that time, etc) and duration, and then the event 
-element contains a series of property elements each of 
-which specifies a single property by name and type.  Events 
-are assumed to start at the time at which the previous 
-event ended, except when overridden by a chord element 
-(within which all events start at once) or a resync 
-element (which specifies the starting time of the 
-following event, after which events continue to count from 
-there -- this is too verbose, we should change it to an 
-optional absolute time property on the event element).  
  
  
 
 
dev/creating_events.txt.1378324152.txt.gz ยท Last modified: 2022/05/06 16:07 (external edit)
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki