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 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).