@@ -167,7 +167,7 @@ const transcribeMidi = async (midi) => {
167167 let st = sched [ j ] . start ;
168168 let ed = sched [ j ] . end ;
169169 let dur = ed - st ;
170- let temp = this . activity . getClosestStandardNoteValue ( dur * 3 / 8 ) ;
170+ let temp = activity . getClosestStandardNoteValue ( dur * 3 / 8 ) ;
171171 shortestNoteDenominator = Math . max ( shortestNoteDenominator , temp [ 1 ] ) ;
172172 }
173173
@@ -214,7 +214,7 @@ const transcribeMidi = async (midi) => {
214214 }
215215 return ar ;
216216 } ;
217- let obj = this . activity . getClosestStandardNoteValue ( duration * 3 / 8 ) ;
217+ let obj = activity . getClosestStandardNoteValue ( duration * 3 / 8 ) ;
218218 // let scalingFactor=1;
219219 // if(shortestNoteDenominator>32)
220220 // scalingFactor=shortestNoteDenominator/32;
@@ -225,7 +225,7 @@ const transcribeMidi = async (midi) => {
225225 // obj[0]=obj[0]*scalingFactor;
226226
227227 // To get the reduced fraction for 4/2 to 2/1
228- obj = this . activity . getClosestStandardNoteValue ( obj [ 0 ] / obj [ 1 ] ) ;
228+ obj = activity . getClosestStandardNoteValue ( obj [ 0 ] / obj [ 1 ] ) ;
229229
230230 // Since we are going to add action block in the front later
231231 if ( k != 0 ) val = val + 2 ;
@@ -251,7 +251,7 @@ const transcribeMidi = async (midi) => {
251251 }
252252
253253 if ( totalnoteblockCount >= MAX_NOTEBLOCKS ) {
254- this . textMsg ( "MIDI file is too large.. Generating only 100 noteblocks" ) ;
254+ activity . textMsg ( "MIDI file is too large.. Generating only 100 noteblocks" ) ;
255255 stopProcessing = true ;
256256 break ;
257257 }
@@ -335,7 +335,7 @@ const transcribeMidi = async (midi) => {
335335
336336 }
337337
338- this . activity . blocks . loadNewBlocks ( jsONON ) ;
338+ activity . blocks . loadNewBlocks ( jsONON ) ;
339339 // this.textMsg("MIDI import is not currently precise. Consider changing the speed with the Beats Per Minute block or modifying note value with the Multiply Note Value block");
340340 return null ;
341341} ;
0 commit comments