On Thu, Nov 25, 2010 at 10:24:36PM +0000, Ian Gardner wrote: > There's a putative implementation of having a relative transposition on a > linked segment, committed to the linked_segments_ian branch.
Sounds interesting. > I'm operating at the misty outer limits of my understanding of musical > notation here, but I *think* I've done the right thing! Sorry I didn't notice this thread earlier - I dabbled in the accidentals and transposition stuff a while back and guess I should take some responsibility ;). > As my implementation stands, there's no facility for editing the transpose > on a linked segment. You can set the transpose on an untransposed segment, > or remove the transpose on a transposed one. This is because I don't know > how to handle a composite transpose. i.e. if a transposition is represented > by m1 semitones and n1 steps, and we apply another transpose of m2 > semitones and n2 steps, is it true that the composite transposition is > always represented by (m1+m2) semitones and (n1+n2) steps? Yes, I think that is a correct assumption. > If so, maybe it's not much work to implement an edit function > for the transposition on a linked segment. > > The code also makes the (possibly false) assumption that if a transposition > is characterised by m semitones and n steps, then the inverse transposition > is always characterised by -m semitones and -n steps. Is this a safe > assumption? Yes, that looks OK to me too. To wrap my head around these things back then I recorded a number of examples and added them as a kind of 'unit test' that verifies the code (still) exhibits the desired behavior: http://rosegarden.svn.sourceforge.net/viewvc/rosegarden/branches/linked_segments_ian/test/segmenttransposecommand.cpp?revision=12123&view=markup I looked through the commit at http://rosegarden.svn.sourceforge.net/viewvc/rosegarden?view=revision&revision=12149 for a bit and it seems reasonable to me, but I don't have a C++ development environment handy right now so I haven't tried anything out in-depth. Kind regards, Arnout ------------------------------------------------------------------------------ Forrester recently released a report on the Return on Investment (ROI) of Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even within 7 months. Over 3 million businesses have gone Google with Google Apps: an online email calendar, and document program that's accessible from your browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew _______________________________________________ Rosegarden-devel mailing list Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel