Skip to content

Commit 57d0f55

Browse files
committed
use fraction format for console output of note values
1 parent 7a63a96 commit 57d0f55

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

js/logo.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6268,10 +6268,11 @@ function Logo () {
62686268
}
62696269
}
62706270

6271+
var obj = rationalToFraction(1 / noteBeatValue);
62716272
if (that.justCounting[turtle].length === 0) {
6272-
console.log('notes to play ' + notes + ' 1/' + noteBeatValue);
6273+
console.log('notes to play ' + notes + ' ' + obj[0] + '/' + obj[1]);
62736274
} else {
6274-
console.log('notes to count ' + notes + ' 1/' + noteBeatValue);
6275+
console.log('notes to count ' + notes + ' ' + obj[0] + '/' + obj[1]);
62756276
}
62766277

62776278
if (!that.suppressOutput[turtle]) {
@@ -6423,10 +6424,11 @@ function Logo () {
64236424
// If it is > 0, we already counted this note
64246425
// (e.g. pitch & drum combination).
64256426
if (that.notePitches[turtle][last(that.inNoteBlock[turtle])].length === 0) {
6427+
var obj = rationalToFraction(1 / noteBeatValue);
64266428
if (that.justCounting[turtle].length === 0) {
6427-
console.log('notes to play ' + notes + ' 1/' + noteBeatValue);
6429+
console.log('notes to play ' + notes + ' ' + obj[0] + '/' + obj[1]);
64286430
} else {
6429-
console.log('notes to count ' + notes + ' 1/' + noteBeatValue);
6431+
console.log('notes to count ' + notes + ' ' + obj[0] + '/' + obj[1]);
64306432
}
64316433

64326434
if (!that.suppressOutput[turtle]) {

0 commit comments

Comments
 (0)