This is my thought... as Tommy has mention an midi CC (Controller
Change) has no duration at all but somehow it is needed to represent the
event visually in a ControlRuler.
Yes we can represent CC with a diamond at event start or by an bar as it
is today.
I prefer the bar and with that comes the question "how is an event with
no duration visually represented as a bar?" 

My suggestion to that is represented in 2 cases: 

When a single event is created @ a time, use an as minimal duration as
possible making it more visible distinctive as an event in time and not
something with a duration.

When a series of events are inserted, for a example as the line draw
tool, set the duration of event to fill up to next time where next event
in serie is insert.
This will make the series of events display in a consistent chart
without "empty" room between each event.

Any comments on this thoughts?







<-----Ursprungligt Meddelande----->

                From: Chris Cannam [EMAIL PROTECTED]
Sent: 11/11/2008 10:30:31 AM
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: Re: [Rosegarden-devel] Question concerning rev. 9523 

I haven't tested this patch yet and I don't want to distract anyone 
from answering Julie's query, but I would like to comment on one thing 
in the patch: 

int width=m_rulerScale->getXForTime(e->getDuration()); 

The mapping from time to pixel position provided by a RulerScale is 
not necessarily linear. You can't just call getXForTime with a 
duration and expect to get the right pixel width back -- the pixel 
width corresponding to a given duration may vary depending on where in 
the timeline that duration begins. 

Always use RulerScale::getWidthForDuration(timeT startTime, timeT 
duration) when you want to map from duration to pixel width. 

In a perfect world, "time" and "duration" would have different data 
types, and this sort of confusion would be prevented by the compiler. 
In hindsight, I really wish we had done that in Rosegarden. 

(Of course, calling getXForTime will work by accident much of the 
time. In the matrix, the mapping _is_ linear. But it's a pattern 
that it pays to get right, as there are plenty of places in Rosegarden 
where this kind of mix-up can lead to serious consequences -- most 
notably when using the conceptually similar conversions between 
musical time and real-time in Composition.h, where mixing up time and 
duration will give you the wrong result as soon as you hit a tempo 
change.) 


Chris 

------------------------------------------------------------------------
- 
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge 
Build the coolest Linux based applications with Moblin SDK & win great
prizes 
Grand prize is a trip for two to an Open Source event anywhere in the
world 
http://moblin-contest.org/redirect.php?banner_id=100&url=/ 
_______________________________________________ 
Rosegarden-devel mailing list 
[email protected] - use the link below to
unsubscribe 
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel 
. 
        
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to