File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,8 @@ import "notehelper.js" as NoteHelper
1010import "selectionhelper.js" as SelHelper
1111
1212/**********************************************
13- /* 1.0.0: Initial version
14-
15- // TODO: track <> 0
16-
13+ /* 1.0.0 Beta1: Initial version
14+ /* 1.0.0 Beta2: Correct selection retrieval on selection change
1715
1816/**********************************************/
1917MuseScore {
@@ -102,11 +100,14 @@ MuseScore {
102100 console .log (" But busy" );
103101 return ;
104102 }
105- // Retrieving the starting position in score
106- positionInScore = retrieveCurrentPosition (); // assigning to "positionInScore" all properties at once
107103
108104 // Retrieving the notes that could be used for the rhythm
109105 selection = retrieveSelection ();
106+ console .log (" New selection is : " + ((selection .length > 0 )? selection[0 ].notes [0 ]: " --" ));
107+
108+ // Retrieving the starting position in score
109+ positionInScore = retrieveCurrentPosition (); // assigning to "positionInScore" all properties at once
110+
110111
111112 if (selection .length === 0 && useSelection .checked ) {
112113 useSelection .checked = false ;
@@ -1354,7 +1355,7 @@ MuseScore {
13541355
13551356 }
13561357 score .endCmd (); // -DEBUG
1357- ongoing= true ;
1358+ ongoing= false ;
13581359
13591360 }
13601361
Original file line number Diff line number Diff line change 1515/* - 26/2/23: v2.0.1 documentation
1616/* - 5/3/23: v2.0.2 correct length across bars
1717/* - 6/3/23: v2.0.2 some refactoring and documentation
18+ /* - 15/3/23: v2.0.2 changeNote: set the pitch note (I guess I assumed it was already set by the calling function, but this is more generic now).
1819/**********************************************/
1920// -----------------------------------------------------------------------
2021// --- Vesionning-----------------------------------------
@@ -413,6 +414,8 @@ function changeNote(note, toNote) {
413414 console . warn ( "changeNote: invalid note type. Expecting 'Note'. Received " + note . userName ( ) ) ;
414415 return ;
415416 }
417+
418+ note . pitch = toNote . pitch ;
416419
417420 if ( toNote . tpc1 !== undefined && toNote . tpc1 !== undefined ) {
418421 // tpc1 and tpc2 are defined ==> using them
You can’t perform that action at this time.
0 commit comments