From ad873d33163e25d8fdf03c88b96114eebb8a5a93 Mon Sep 17 00:00:00 2001 From: Tom White Date: Tue, 10 Sep 2019 22:59:41 +1200 Subject: [PATCH] Tweaked music.js variable names --- music.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/music.js b/music.js index 9d74cbb..c98fb82 100755 --- a/music.js +++ b/music.js @@ -3,22 +3,22 @@ function draw_one_frame(vocal, drum, bass, other) { rectMode(CENTER); let bar_spacing = width/5; - let bar_height = height/2; let bar_width = width/6; + let bar_pos_y = height/2; // vocal bar is red fill(200, 0, 0); - rect(1 * bar_spacing, bar_height, bar_width, vocal); + rect(1 * bar_spacing, bar_pos_y, bar_width, 4 * vocal); // drum bar is green fill(0, 200, 0); - rect(2 * bar_spacing, bar_height, bar_width, drum); + rect(2 * bar_spacing, bar_pos_y, bar_width, 4 * drum); // bass bar is blue fill(0, 0, 200); - rect(3 * bar_spacing, bar_height, bar_width, bass); + rect(3 * bar_spacing, bar_pos_y, bar_width, 4 * bass); // other bar is white fill(200, 200, 200); - rect(4 * bar_spacing, bar_height, bar_width, other); + rect(4 * bar_spacing, bar_pos_y, bar_width, 4 * other); }