@jonalex05/

Drum Loop Machine App

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • audio
  • drums.jpg
  • script.js
  • style.css
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>repl.it</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <div class = "wrapper">
      <div class = "pads">

        <div class = "pad" id = "pad-1" onclick = "melodyone()">
          <div>
            <h4>Piano</h4>
            <p><i>Press A</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-2" onclick = "melodytwo()">
          <div>
            <h4>Dramatic</h4>
            <p><i>Press S</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-3" onclick = "melodythree()">
          <div>
            <h4>BOOMMMMM</h4>
            <p><i>Press D</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-4" onclick = "melodyfour()">
          <div>
            <h4>Dramatic</h4>
            <p><i>Press F</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-5" onclick = "drumone()">
          <div>
            <h4>Drum</h4>
            <p><i>Press H</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-6" onclick = "drumtwo()">
          <div>
            <h4>Snare</h4>
            <p><i>Press J</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-7" onclick = "drumthree()">
          <div>
            <h4>
              <h4>Snap</h4>
            <p><i>Press K</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-8" onclick = "drumfour()">
          <div>
            <h4>Bell</h4>
            <p><i>Press L</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-9" onclick = "synthone()">
          <div>
            <h4>Sci-Fi</h4>
            <p><i>Press C</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-10" onclick = "synthtwo()">
          <div>
            <h4>Even More Dramatic</h4>
            <p><i>Press V</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-11" onclick = "synththree()">
          <div>
            <h4>Build-Up</h4>
            <p><i>Press B</i></p>
          </div>
        </div>
        <div class = "pad" id = "pad-12" onclick = "synthfour()">
          <div>
            <h4>Band</h4>
            <p><i>Press N</i></p>
          </div>
        </div>
        
      </div>
    </div>

    <audio src = "audio/melody1.wav" autostart = "false" id = "melody1"></audio>
    <audio src = "audio/melody2.wav" autostart = "false" id = "melody2"></audio>
    <audio src = "audio/melody3.wav" autostart = "false" id = "melody3"></audio>
    <audio src = "audio/melody4.wav" autostart = "false" id = "melody4"></audio>
    <audio src = "audio/synth1.wav" autostart = "false" id = "synth1"></audio>
    <audio src = "audio/synth2.wav" autostart = "false" id = "synth2"></audio>
    <audio src = "audio/synth3.wav" autostart = "false" id = "synth3"></audio>
    <audio src = "audio/synth4.wav" autostart = "false" id = "synth4"></audio>
    <audio src = "audio/drum1.wav" autostart = "false" id = "drum1"></audio>
    <audio src = "audio/drum2.wav" autostart = "false" id = "drum2"></audio>
    <audio src = "audio/drum3.wav" autostart = "false" id = "drum3"></audio>
    <audio src = "audio/drum4.wav" autostart = "false" id = "drum4"></audio>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="script.js"></script>
  </body>
</html>
result
console