Skip to content

Experimental drum machine toy written in Javascript, based on a bouncing ball inside a resizable rectangle

Notifications You must be signed in to change notification settings

adamcogen/drum-square

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drum Square

This project implements a simple drum machine that uses a bouncing ball inside a rectangle to determine when drum sounds should be triggered. A different drum sound plays based on which edge of the rectangle the ball bounces off of, with the following orientation:

  • Bottom edge: bass drum
  • Left edge: high hi-hat
  • Rigth edge: low hi-hat
  • Top edge: snare

I mostly wrote this as a way to learn Javascript, but it's also fun to mess around with and can produce unusual drum patterns that most other drum machines wouldn't be able to replicate.

Drum Square

Controls

  • Click the red dot in the top left corner to pause the drum machine
  • Click the grey dot in the top left corner to show or hide the number panel
  • Click inside the drum machine rectangle to randomize all of the drum machine's colors and variables
  • To change the values of drum machine parameters manually, pause the drum machine, change values in the number panel, then click 'set' to apply the changes
  • Click and drag the bottom left corner of the drum machine rectangle to adjust the height of the rectangle
  • Click and drag the top right corner of the drum machine rectangle to adjust the width of the rectangle
  • Click and drag the bottom right corner of the drum machine rectangle to evenly scale the height and width of the rectangle at the same time
  • Click and drag the grey dot at the bottom right of the drum machine rectangle to freely adjust both the height and width of the rectangle at the same time

Drum Square screenshot 2

About

Experimental drum machine toy written in Javascript, based on a bouncing ball inside a resizable rectangle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published