Skip to content

Commit

Permalink
Tweaked music.js variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
dribnet committed Sep 10, 2019
1 parent fb596b7 commit ad873d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions music.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit ad873d3

Please sign in to comment.