Skip to content

Commit 61bfa9f

Browse files
committed
fix: group tuplet notes into single row for correct proportional timing
1 parent 96d7ea5 commit 61bfa9f

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

js/blocks/RhythmBlockPaletteBlocks.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,18 @@ function setupRhythmBlockPaletteBlocks(activity) {
127127
logo.phraseMaker.addColBlock(blk, arg0);
128128
}
129129

130-
const tupletIndex = logo.tupletParams.length - 1;
131-
for (let i = 0; i < arg0; i++) {
132-
logo.tupletRhythms.push(["individual", tupletIndex, noteBeatValue]);
130+
if (logo.tuplet) {
131+
for (let i = 0; i < arg0; i++) {
132+
if (!logo.addingNotesToTuplet) {
133+
logo.tupletRhythms.push(["notes", logo.tupletParams.length - 1]);
134+
logo.addingNotesToTuplet = true;
135+
}
136+
last(logo.tupletRhythms).push(noteBeatValue);
137+
}
138+
} else {
139+
for (let i = 0; i < arg0; i++) {
140+
logo.tupletRhythms.push(["individual", 1, noteBeatValue]);
141+
}
133142
}
134143

135144
for (let i = 0; i < args[0]; i++) {

0 commit comments

Comments
 (0)