Live Coding Web Drum Machine 0.1

  • Volume Data: Click a drum to select quiet or loud volume.
  • Duration Data: Shift + Click to select the duration of a drum.
  • Select both volume and duration data to create music. Happy playing!
Instructions for Added Functions:
  • pattern(): takes in an equations that is used to map beats.
    • The equation must take in the form of "(val,i)=>_____".
    • Example: b.track4vol = pattern((val,i)=>1-i%2);
  • setAll() : creates a 16-length array with the given value
    • Example: b.track4vol = setAll(1);
  • backBeat(): takes no parameter, creates a track that sounds on beats 2,4, 6,... etc.
    • Example: b.track4vol = backBeat();
  • p(): takes in a String parameter or a numeric value to change the pitch.
    • Numeric value: should be between 0 to 1(inclusive)
    • String value: should be a letter between A and G(inclusive)
    • Example: s.track6_thumb = p(0.5); s.track6_thumb = p("C");

  • Recordings:
    1. Track 1
      Track 2
      Track 3
      Track 4
      Track 5
      Track 6
      Effect Level
      track1 Pitch
      track2 Pitch
      track3 Pitch
      track4 Pitch
      track5 Pitch
      track6 Pitch

      Save a Beat

      For security reasons, web browsers don't make it easy to save files directly to your hard drive. But to save your beat just copy and paste the data block below into a text file. To load the beat later click the Load button then paste the data block from your text file into the blank window.

      Load a Beat

      Paste the beat data into the blank window below and click OK.

      Input: Output: