On Sunday 12 Oct 2003 10:46 am, Chris Cannam wrote: > I already regret storing > TimeSignature in an Event at all, as it makes everyone assume they > can turn up in Segments, which isn't true.
In fact grepping for TimeSignature::EventType shows up a couple of serious errors of this sort in AnalysisTypes.C. I really should make the Event type/subordering data in TimeSignature private to avoid this kind of thing. I'm not sure why the Tempo equivalent in Composition.h is public either -- that predates this change -- but it also shouldn't be. I will probably fix both of those. The message here is: There is a perfectly good API for tempo and time signatures, and you should use it. Exposing and using ReferenceSegment is no different from hacking into the internal storage of some third-party container class because you're too lazy to use the API, even though it provides everything you need. It's extremely error prone, leads to harder to understand code, and is liable to break in future. It's just wrong. You also wrote: > But it *is* comprehensible code right now. I just get the > ReferenceSegment But right there you've implied a whole extra level of knowledge: what the hell is a ReferenceSegment? The answer is specific to the internals of the Composition, it's not obvious, and without it the code is indeed incomprehensible. Just work in terms of tempo and time signature, everyone knows what they are. Chris ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Rosegarden-devel mailing list [EMAIL PROTECTED] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
