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); }