Skip to content

Commit

Permalink
use fraction format for console output of note values
Browse files Browse the repository at this point in the history
  • Loading branch information
walterbender committed Dec 10, 2017
1 parent 7a63a96 commit 57d0f55
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions js/logo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6268,10 +6268,11 @@ function Logo () {
}
}

var obj = rationalToFraction(1 / noteBeatValue);
if (that.justCounting[turtle].length === 0) {
console.log('notes to play ' + notes + ' 1/' + noteBeatValue);
console.log('notes to play ' + notes + ' ' + obj[0] + '/' + obj[1]);
} else {
console.log('notes to count ' + notes + ' 1/' + noteBeatValue);
console.log('notes to count ' + notes + ' ' + obj[0] + '/' + obj[1]);
}

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

if (!that.suppressOutput[turtle]) {
Expand Down

0 comments on commit 57d0f55

Please sign in to comment.