On 16/02/14 17:46, Lasconic wrote: > Hi, > > What do you want to do exactly? I can only guess, but you might want > to check Score::cmdAddSpanner > https://github.com/musescore/MuseScore/blob/master/libmscore/cmd.cpp#L212
Hi, easy explanation: I'd like to update my old patch on automatic repeat detection http://musescore.org/node/17031 as I just needed it once again yesterday after months of inactivity for my self-teaching music hobby :-)! So, in that patch, I was adding a volta with custom endings -- the /^^^^^^^^\ volta, plus the /1.^^^^^^ and /2.^^^^^^ custom endings --, by creating a Volta instance, then calling its methods setStartMeasure() and set EndMeasure() to specify where it was starting and ending, and finally linking it to the start measure via a ??::add() method, namely see [1]. So, as from the comment I'm seeing in the code you pointed me to, // cmdAddSpanner // drop VOLTA, OTTAVA, TRILL, PEDAL, DYNAMIC // HAIRPIN, and TEXTLINE now we use cmdAddSpanner() to instantiate a Volta, right? So, while I dig into the new Spanner methods, just any concrete hints as to how to instantiate specifically the 3 object items above, would be helpful :-) namely: -) /^^^^^^^^^^^^\ -) /1.^^^^^^^^^ -) /2.^^^^^^^^^ Shall I expect API changes also to drop the bars for begin and end of a repeating segment ? Thanks, bye. T. [1] + Volta *v1 = new Volta(_score); + v1->setVoltaType(VoltaType::CLOSED); + v1->setLen(_score->spatium() * 7); + v1->setText("1."); + QList<int> il; + il.append(1); + v1->setEndings(il); + v1->setTrack(0); + + v1->setStartMeasure(dr.m3); + v1->setEndMeasure(dr.m2_prev); + dr.m3->add(v1); + + Volta *v2 = new Volta(_score); + v2->setVoltaType(VoltaType::CLOSED); + v2->setLen(_score->spatium() * 7); + v2->setText("2."); + il.clear(); + il.append(2); + v2->setEndings(il); + v2->setTrack(0); + + Measure *m5 = dr.m4; + for (int len = dr.len; len < dr.repeat_len - 1; ++len) + m5 = m5->nextMeasure(); + + v2->setStartMeasure(dr.m4); + v2->setEndMeasure(m5); + dr.m4->add(v2); ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk _______________________________________________ Mscore-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mscore-developer
