@@ -631,10 +631,10 @@ function Matrix() {
631631 var noteValueToDisplay = calcNoteValueToDisplay ( param [ 0 ] [ 1 ] , param [ 0 ] [ 0 ] ) ;
632632
633633 // Set the cells to "rest"
634- for ( var j = 0 ; j < numberOfNotes ; j ++ ) {
634+ for ( var i = 0 ; i < numberOfNotes ; i ++ ) {
635635 // The tuplet time factor * percentage of the tuplet that
636636 // is dedicated to this note
637- this . _notesToPlay . push ( [ [ 'R' ] , ( totalNoteInterval * param [ 0 ] [ 1 ] ) / ( 32 / param [ 1 ] [ j ] ) ] ) ;
637+ this . _notesToPlay . push ( [ [ 'R' ] , ( totalNoteInterval * param [ 0 ] [ 1 ] ) / ( 32 / param [ 1 ] [ i ] ) ] ) ;
638638 }
639639
640640 // First, ensure that the matrix is set up for tuplets.
@@ -690,13 +690,14 @@ function Matrix() {
690690 // Add cell for tuplet note values
691691 var noteRow = docById ( 'ptmTupletNoteValueRow' ) ;
692692 var cell = noteRow . insertCell ( - 1 ) ;
693+ var numerator = 32 / param [ 1 ] [ i ] ;
694+ var thisNoteValue = 1 / ( numerator / ( totalNoteInterval / tupletTimeFactor ) ) ;
693695 cell . style . backgroundColor = MATRIXTUPLETCELLCOLOR ;
694- cell . style . width = this . _noteWidth ( tupletNoteValue ) + 'px' ;
696+ cell . style . width = this . _noteWidth ( thisNoteValue ) + 'px' ;
695697 cell . style . minWidth = cell . style . width ;
696698 cell . style . maxWidth = cell . style . width ;
697699 cell . style . height = Math . floor ( 1.5 * MATRIXSOLFEHEIGHT * this . _cellScale ) + 'px' ;
698700 cell . setAttribute ( 'id' , 1 / tupletNoteValue ) ;
699- var numerator = 32 / param [ 1 ] [ 0 ] ;
700701 cell . style . lineHeight = 60 + '%' ;
701702 cell . style . fontSize = this . _cellScale * 75 + '%' ;
702703 cell . style . textAlign = 'center' ;
0 commit comments