@@ -371,6 +371,7 @@ MuseScore {
371371 var dd= _degrees .map (function (e ) { return {text: e, step: e}});
372372 // dd.unshift({text: '<html><span style="font-family:\'MScore Text\'; font-size: 20px; text-align: center; vertical-align: middle">\uE4E5</span></html>', step: 'R'});
373373 dd .unshift ({text: ' (R)' , step: ' R' });
374+ // dd.unshift({text: String.fromCharCode(7694), step: 'R'});
374375 dd .unshift ({text: ' ' , step: ' ' });
375376 return dd;
376377 }
@@ -388,14 +389,14 @@ MuseScore {
388389 {text: ' \uECA2 ' , duration: 4 , fraction: fraction ( 1 , 1 ) },
389390 {text: ' \uECA3 \uECB7 ' , duration: 3 , fraction: fraction ( 3 , 4 ) },
390391 {text: ' \uECA3 ' , duration: 2 , fraction: fraction ( 1 , 2 ) },
391- {text: ' \uECA5 \uECB7 \uECB7 ' , duration: 1.75 , fraction: fraction ( 7 ,16 ) },
392+ // {text: '\uECA5 \uECB7 \uECB7', duration: 1.75 , fraction: fraction( 7,16) },
392393 {text: ' \uECA5 \uECB7 ' , duration: 1.5 , fraction: fraction ( 3 , 8 ) },
393394 {text: ' \uECA5 ' , duration: 1 , fraction: fraction ( 1 , 4 ) },
394- {text: ' \uECA7 \uECB7 \uECB7 ' , duration: 0.875 , fraction: fraction ( 7 ,32 ) },
395+ // {text: '\uECA7 \uECB7 \uECB7', duration: 0.875 , fraction: fraction( 7,32) },
395396 {text: ' \uECA7 \uECB7 ' , duration: 0.75 , fraction: fraction ( 3 ,16 ) },
396397 {text: ' \uECA7 ' , duration: 0.5 , fraction: fraction ( 1 , 8 ) },
397- {text: ' \uECA9 \uECB7 \uECB7 ' , duration: 0.4375 , fraction: fraction ( 7 ,64 ) },
398- {text: ' \uECA9 \uECB7 ' , duration: 0.375 , fraction: fraction ( 3 ,32 ) },
398+ // {text: '\uECA9 \uECB7 \uECB7', duration: 0.4375, fraction: fraction( 7,64) },
399+ // {text: '\uECA9 \uECB7', duration: 0.375 , fraction: fraction( 3,32) },
399400 {text: ' \uECA9 ' , duration: 0.25 , fraction: fraction ( 1 ,16 ) },
400401 ]
401402
@@ -814,14 +815,15 @@ MuseScore {
814815
815816 var notes = [];
816817
817- var p= (! chkInvert .checked || ((r % 2 ) == 0 ))? basesteps: reversePattern (basesteps);
818- for (var j = 0 ; j < p .length ; j++ ) {
819- console .log (" >>> Looking at note " + j + " : " + p[j].note );
820- // notes.push(root + p[j]);
821- var _n= (p[j].note !== null )? (root + p[j].note ): null ;
822- // var _n=(p[j].note!==null)?root + p[j].note:0;
823- notes .push ({" note" : _n, " duration" : p[j].duration });
824- }
818+ var _base= (! chkInvert .checked || ((r % 2 ) == 0 ))? basesteps: reversePattern (basesteps);
819+
820+ for (var j = 0 ; j < _base .length ; j++ ) {
821+ console .log (" >>> Looking at note " + j + " : " + _base[j].note );
822+ // notes.push(root + _base[j]);
823+ var _n= (_base[j].note !== null )? (root + _base[j].note ): null ;
824+ // var _n=(_base[j].note!==null)?root + _base[j].note:0;
825+ notes .push ({" note" : _n, " duration" : _base[j].duration });
826+ }
825827
826828
827829 pages[page].push ({
@@ -2625,8 +2627,8 @@ MuseScore {
26252627 Layout .rightMargin : 2
26262628 Layout .leftMargin : 2
26272629 Layout .bottomMargin : 5
2628-
2629- property var stepIndex: index
2630+
2631+ property var stepIndex: index
26302632
26312633 Label {
26322634 text: (index + 1 )
@@ -2637,21 +2639,21 @@ MuseScore {
26372639
26382640 textRole: " text"
26392641 property var valueRole: " duration"
2640- property var duration: 1
2642+ property var duration: 1
26412643
26422644 onActivated: {
26432645 // loopMode = currentValue;
26442646 duration = model[currentIndex][valueRole];
26452647 console .log (duration);
2646-
2647- for (var i = 0 ; i < _max_patterns; i++ ) {
2648- var raw= mpatterns .get (i);
2649-
2650- // console.log("Setting duration of step/pattern "+index+"/"+i+" to "+duration);
2651-
2652- raw .steps .get (stepIndex).duration = duration;
2653- }
2654-
2648+
2649+ for (var i = 0 ; i < _max_patterns; i++ ) {
2650+ var raw = mpatterns .get (i);
2651+
2652+ // console.log("Setting duration of step/pattern "+index+"/"+i+" to "+duration);
2653+
2654+ raw .steps .get (stepIndex).duration = duration;
2655+ }
2656+
26552657 }
26562658
26572659 Binding on currentIndex {
@@ -2661,10 +2663,10 @@ MuseScore {
26612663 }
26622664
26632665 implicitHeight: 30
2664- implicitWidth: 60
2666+ implicitWidth: 50
26652667
26662668 font .family : ' MScore Text'
2667- font .pointSize : 9
2669+ font .pointSize : 10
26682670
26692671 delegate: ItemDelegate {
26702672 contentItem: Text {
@@ -2675,20 +2677,51 @@ MuseScore {
26752677 highlighted: durations .highlightedIndex === index
26762678
26772679 }
2680+ indicator: Canvas {
2681+ id: canvas
2682+ x: lstStepDuration .width - width - lstStepDuration .rightPadding
2683+ y: lstStepDuration .topPadding + (lstStepDuration .availableHeight - height) / 2
2684+ width: 8
2685+ height: width * 1.5
2686+
2687+ contextType: " 2d"
2688+
2689+ Connections {
2690+ target: lstStepDuration
2691+ function onPressedChanged () {
2692+ canvas .requestPaint ();
2693+ }
2694+ }
26782695
2696+ onPaint: {
2697+ context .reset ();
2698+ context .lineWidth = 1.5 ;
2699+ context .strokeStyle = " black" ;
2700+ context .beginPath ();
2701+ context .moveTo (0 , height / 2 - 1 );
2702+ context .lineTo (width / 2 , 0 );
2703+ context .lineTo (width, height / 2 - 1 );
2704+ context .stroke ();
2705+ context .beginPath ();
2706+ context .moveTo (0 , height / 2 + 1 );
2707+ context .lineTo (width / 2 , height);
2708+ context .lineTo (width, height / 2 + 1 );
2709+ context .stroke ();
2710+ }
2711+ }
26792712 }
26802713 }
2681- }
2682- Repeater {
2683- id: idStepNotes
2684- model: mpatterns
2685-
2714+ }
26862715 Repeater {
2716+ id: idStepNotes
2717+ model: mpatterns
2718+
2719+ Repeater {
26872720
2688- id: idSingleStep
2689- property var patternIndex: index
2721+ id: idSingleStep
2722+ property var patternIndex: index
26902723
2691- model: steps
2724+ model: steps
26922725
26932726 // Row {
26942727 StackLayout {
@@ -2735,6 +2768,8 @@ MuseScore {
27352768
27362769 editable: false
27372770 implicitWidth: 30
2771+
2772+ // font.family: "FreeSerif"
27382773
27392774 delegate: ItemDelegate {
27402775 contentItem: Text {
@@ -2755,6 +2790,8 @@ MuseScore {
27552790 horizontalAlignment: Qt .AlignHCenter
27562791 }
27572792
2793+
2794+
27582795 }
27592796 ComboBox {
27602797 id: lstGStep
0 commit comments