Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions js/blocks/RhythmBlockPaletteBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,8 @@ function setupRhythmBlockPaletteBlocks(activity) {
arg1 = args[1];
}

const noteBeatValue = (1 / arg1) * activity.turtles.ithTurtle(turtle).singer.beatFactor;
const totalDuration = (1 / arg1) * activity.turtles.ithTurtle(turtle).singer.beatFactor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You just changed the variable name.

const noteBeatValue = totalDuration / arg0;
if (logo.inMatrix || logo.tuplet) {
logo.phraseMaker.addColBlock(blk, arg0);
if (logo.tuplet) {
Expand Down Expand Up @@ -977,7 +978,7 @@ function setupRhythmBlockPaletteBlocks(activity) {
const bpmFactor =
TONEBPM / tur.singer.bpm.length > 0 ? last(tur.singer.bpm) : Singer.masterBPM;

const beatValue = bpmFactor / noteBeatValue / arg0;
const beatValue = noteBeatValue;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beatValue is used as a parameter and you have updated it.


const __rhythmPlayNote = (thisBeat, blk, turtle, callback, timeout) => {
setTimeout(
Expand All @@ -997,8 +998,10 @@ function setupRhythmBlockPaletteBlocks(activity) {
__callback = null;
}

const delay = i * beatValue * 1000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unused declaration.


__rhythmPlayNote(
noteBeatValue * arg0,
noteBeatValue,
blk,
turtle,
__callback,
Expand Down