Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
momentollogy committed Apr 15, 2023
1 parent 52437c0 commit 539d9f2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ <h1>Arduino Piano Buzzer Song Creator V1 <br> <small>by momentollogy</small><br>
2592: "NOTE_WHOLE",
};

// if (!isRest) {
// if (sliderValue >= 0.5) {
// delete noteLengths[108]; // Remove 32nd notes based on the slider value
// }
// if (sliderValue >= 1) {
// delete noteLengths[216]; // Remove 16th notes based on the slider value
// }
// }
if (!isRest) {
if (sliderValue >= 0.5) {
delete noteLengths[108]; // Remove 32nd notes based on the slider value
}
if (sliderValue >= 1) {
delete noteLengths[216]; // Remove 16th notes based on the slider value
}
}

let closestDuration = Object.keys(noteLengths).reduce((prev, curr) => {
return Math.abs(curr - duration) < Math.abs(prev - duration) ? curr : prev;
Expand Down

0 comments on commit 539d9f2

Please sign in to comment.