@YatinBayya/

MusiK-it

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • images
  • sounds
  • 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
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<link rel="stylesheet" href="style.css">
	<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.9.0/css/all.css">
	<title>MusiK-it</title>
</head>
<body>
<div id="landing-page">
<div id="item">
  <img src="/images/icon1.png" id="icon">
  <div id="content">
    <h1 id="title1">Beat Seqeuncer</h1>
    <button id="opener" onclick="openBeatSequencer()">Open Editor</button>
    </div>
</div>
<div id="next"><i class="fas fa-chevron-right" onclick="arrows()"></i></div>
</div>

<div id="piano">
  <div id="instrument">
  <div id="note" style="background: #EE4035;" onclick="playPiano('a');"><p>A</p></div>
  <div id="note" style="background: #F37736;" onclick="playPiano('b');"><p>B</p></div>
  <div id="note" style="background: #e3cf00;" onclick="playPiano('c');"><p>C</p></div>
  <div id="note" style="background: #7BC043;" onclick="playPiano('d');"><p>D</p></div>
  <div id="note" style="background: #0392CF;" onclick="playPiano('e');"><p>E</p></div>
  <div id="note" style="background: #9903cf;" onclick="playPiano('f');"><p>F</p></div>
  </div>
</div>

<div id="guitar">
  <div id="instrument">
  <div id="note" style="background: #EE4035;" onclick="playGuitar('e');"><p>E</p></div>
  <div id="note" style="background: #F37736;" onclick="playGuitar('a');"><p>A</p></div>
  <div id="note" style="background: #e3cf00;" onclick="playGuitar('d');"><p>D</p></div>
  <div id="note" style="background: #7BC043;" onclick="playGuitar('g');"><p>G</p></div>
  <div id="note" style="background: #0392CF;" onclick="playGuitar('b');"><p>B</p></div>
  </div>
</div>

	<div id="beat-sequencer">
		<header>
			<div class="controls">
				<i class="fas fa-play" onclick="playMusic();"></i>
            <i class="fas fa-eraser" onclick="localstorage.setItem('reloading','true');location.reload();"></i>
            <input type="range" min="0" max="10" value="10" class="slider" id="volume">
        </div>
    </header><br>
    <div id="creation">
        <div class="beat" id="beat"></div>
        <div id="controls2">
            <p id="features"><button onclick="demo1()">Demo 1</button>|<button onclick="demo2()" >Demo 2</button>|</p>
            <p id="steps">Click the boxes to create beats then play to listen to your music</p>
        </div>
        <div id="audio">
            <audio id="kick">
                <source src="sounds/kick.mp3" type="audio/mp3">
            </audio>
            <audio id="clap">
                <source src="sounds/clap.mp3" type="audio/mp3">
            </audio>
            <audio id="snare">
                <source src="sounds/snare.mp3" type="audio/mp3">
            </audio>
            <audio id="tom">
                <source src="sounds/tom.mp3" type="audio/mp3">
            </audio>
            <audio id="shake">
                <source src="sounds/shaker.mp3" type="audio/mp3">
            </audio>
            <audio id="openHat">
                <source src="sounds/openhat.mp3" type="audio/mp3">
            </audio>
            <audio id="piano-a">
                <source src="sounds/piano_a.mp3" type="audio/mp3">
            </audio>
            <audio id="piano-b">
                <source src="sounds/piano_b.mp3" type="audio/mp3">
            </audio>
            <audio id="piano-c">
                <source src="sounds/piano_c.mp3" type="audio/mp3">
            </audio>
            <audio id="piano-d">
                <source src="sounds/piano_d.mp3" type="audio/mp3">
            </audio>
            <audio id="piano-e">
                <source src="sounds/piano_e.mp3" type="audio/wav">
            </audio>
            <audio id="piano-f">
                <source src="sounds/piano_f.mp3" type="audio/wav">
            </audio>
            <audio id="guitar-a">
                <source src="sounds/guitar-a.mp3" type="audio/wav">
            </audio>
            <audio id="guitar-b">
                <source src="sounds/guitar-b.mp3"" type="audio/mp3">
            </audio>
            <audio id="guitar-d">
                <source src="sounds/guitar-d.mp3"" type="audio/mp3">
            </audio>
            <audio id="guitar-e">
                <source src="sounds/guitar-e.mp3"" type="audio/mp3">
            </audio>
            <audio id="guitar-g">
                <source src="sounds/guitar-g.mp3"" type="audio/mp3">
            </audio>
        </div>
    </div>
    </div>
    <script src="script.js"></script>
</body>
</html>
result
console