Skip to content

Commit a765183

Browse files
committed
fixes #641 -- properly restore beat factor after leaving divide beat factor block
1 parent 1d59ffc commit a765183

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/logo.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,7 +2503,11 @@ function Logo(pitchtimematrix, pitchdrummatrix, rhythmruler,
25032503
logo.noteOctaves[turtle].push(4);
25042504
logo.noteCents[turtle].push(0);
25052505
logo.noteHertz[turtle].push(0);
2506-
logo.noteBeatValues[turtle].push(1);
2506+
if (turtle in logo.beatFactor) {
2507+
logo.noteBeatValues[turtle].push(logo.beatFactor[turtle]);
2508+
} else {
2509+
logo.noteBeatValues[turtle].push(1);
2510+
}
25072511
logo.pushedNote[turtle] = true;
25082512
break;
25092513
case 'steppitch':
@@ -3832,7 +3836,7 @@ function Logo(pitchtimematrix, pitchdrummatrix, rhythmruler,
38323836
logo._setDispatchBlock(blk, turtle, listenerName);
38333837

38343838
var __listener = function (event) {
3835-
logo.beatFactor[turtle] /= factor;
3839+
logo.beatFactor[turtle] *= factor;
38363840
};
38373841

38383842
logo._setListener(turtle, listenerName, __listener);

0 commit comments

Comments
 (0)