MySafeCode commited on
Commit
43c3d79
·
verified ·
1 Parent(s): 93bd416

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +333 -263
index.html CHANGED
@@ -1,168 +1,185 @@
1
  <!DOCTYPE html>
2
  <html lang="en">
 
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Game Sound Synthesizer - 20 Effects</title>
7
- <script src="https://cdn.tailwindcss.com"></script>
8
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
- <style>
10
- @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');
11
-
12
- * {
13
- margin: 0;
14
- padding: 0;
15
- box-sizing: border-box;
16
- }
17
-
18
- body {
19
- font-family: 'Orbitron', monospace;
20
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
21
- min-height: 100vh;
22
- overflow-x: hidden;
23
- }
24
-
25
- .sound-button {
26
- background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
27
- backdrop-filter: blur(10px);
28
- border: 2px solid rgba(255,255,255,0.2);
29
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
30
- position: relative;
31
- overflow: hidden;
32
- }
33
-
34
- .sound-button::before {
35
- content: '';
36
- position: absolute;
37
- top: 50%;
38
- left: 50%;
39
- width: 0;
40
- height: 0;
41
- border-radius: 50%;
42
- background: rgba(255,255,255,0.5);
43
- transform: translate(-50%, -50%);
44
- transition: width 0.6s, height 0.6s;
45
- }
46
-
47
- .sound-button.playing::before {
48
- width: 300px;
49
- height: 300px;
50
- }
51
-
52
- .sound-button:hover {
53
- transform: translateY(-5px) scale(1.05);
54
- box-shadow: 0 20px 40px rgba(0,0,0,0.3);
55
- border-color: rgba(255,255,255,0.4);
56
- }
57
-
58
- .sound-button:active {
59
- transform: translateY(-2px) scale(1.02);
60
- }
61
-
62
- .visualizer {
63
- position: fixed;
64
- bottom: 0;
65
- left: 0;
66
- right: 0;
67
- height: 100px;
68
- background: rgba(0,0,0,0.3);
69
- backdrop-filter: blur(10px);
70
- display: flex;
71
- align-items: flex-end;
72
- justify-content: space-around;
73
- padding: 10px;
74
- z-index: 10;
75
- }
76
-
77
- .bar {
78
- width: 3px;
79
- background: linear-gradient(to top, #00ff88, #00ffff);
80
- transition: height 0.1s ease;
81
- border-radius: 2px;
82
- }
83
-
84
- @keyframes pulse {
85
- 0% { transform: scale(1); }
86
- 50% { transform: scale(1.05); }
87
- 100% { transform: scale(1); }
88
- }
89
-
90
- .pulse {
91
- animation: pulse 0.5s ease-in-out;
92
- }
93
-
94
- .glass-morphism {
95
- background: rgba(255, 255, 255, 0.1);
96
- backdrop-filter: blur(10px);
97
- border: 1px solid rgba(255, 255, 255, 0.2);
98
- }
99
-
100
- .neon-text {
101
- text-shadow: 0 0 10px rgba(255,255,255,0.8),
102
- 0 0 20px rgba(255,255,255,0.6),
103
- 0 0 30px rgba(255,255,255,0.4);
104
- }
105
-
106
- .category-badge {
107
- background: linear-gradient(135deg, #667eea, #764ba2);
108
- padding: 2px 8px;
109
- border-radius: 12px;
110
- font-size: 10px;
111
- text-transform: uppercase;
112
- letter-spacing: 1px;
113
- }
114
-
115
- @keyframes float {
116
- 0%, 100% { transform: translateY(0px); }
117
- 50% { transform: translateY(-10px); }
118
- }
119
-
120
- .float-animation {
121
- animation: float 3s ease-in-out infinite;
122
- }
123
- </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  </head>
 
125
  <body>
126
- <!-- Header -->
127
- <header class="glass-morphism sticky top-0 z-50 p-4 mb-8">
128
- <div class="container mx-auto flex justify-between items-center">
129
- <div class="flex items-center space-x-4">
130
- <div class="float-animation">
131
- <i class="fas fa-gamepad text-3xl text-white"></i>
132
- </div>
133
- <div>
134
- <h1 class="text-2xl font-bold text-white neon-text">Game Sound Synthesizer</h1>
135
- <p class="text-xs text-gray-200">20 Procedurally Generated Sound Effects</p>
136
- </div>
137
- </div>
138
- <div class="flex items-center space-x-4">
139
- <div class="flex items-center space-x-2">
140
- <i class="fas fa-volume-up text-white"></i>
141
- <input type="range" id="volumeControl" min="0" max="100" value="50"
142
  class="w-32 h-2 bg-white/30 rounded-lg appearance-none cursor-pointer">
143
- <span id="volumeValue" class="text-white text-sm">50%</span>
144
- </div>
145
- <button id="randomPlay" class="bg-white/20 hover:bg-white/30 text-white px-4 py-2 rounded-lg transition-all">
146
  <i class="fas fa-random mr-2"></i>Random Play
147
  </button>
148
- </div>
149
- </div>
150
- </header>
151
-
152
- <!-- Main Content -->
153
- <main class="container mx-auto px-4 pb-32">
154
- <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4" id="soundGrid">
155
- <!-- Sound buttons will be generated here -->
156
- </div>
157
- </main>
158
 
159
- <!-- Visualizer -->
160
- <div class="visualizer" id="visualizer">
161
- <!-- Bars will be generated here -->
 
162
  </div>
 
163
 
164
- <script>
165
- // Audio Context
 
 
 
 
 
166
  const audioContext = new (window.AudioContext || window.webkitAudioContext)();
167
  let masterGainNode = audioContext.createGain();
168
  masterGainNode.connect(audioContext.destination);
@@ -189,7 +206,17 @@
189
  { id: 17, name: 'Fire', icon: 'fa-fire', category: 'element' },
190
  { id: 18, name: 'Thunder', icon: 'fa-cloud-bolt', category: 'element' },
191
  { id: 19, name: 'Level Up', icon: 'fa-trophy', category: 'ui' },
192
- { id: 20, name: 'Game Over', icon: 'fa-skull', category: 'ui' }
 
 
 
 
 
 
 
 
 
 
193
  ];
194
 
195
  // Sound synthesis functions
@@ -670,117 +697,160 @@
670
 
671
  osc.start(audioContext.currentTime);
672
  osc.stop(audioContext.currentTime + 1);
673
- }
674
- };
675
-
676
- // Create visualizer bars
677
- function createVisualizer() {
678
- const visualizer = document.getElementById('visualizer');
679
- for (let i = 0; i < 50; i++) {
680
- const bar = document.createElement('div');
681
- bar.className = 'bar';
682
- bar.style.height = '5px';
683
- visualizer.appendChild(bar);
684
- }
685
- }
686
-
687
- // Animate visualizer
688
- function animateVisualizer() {
689
- const bars = document.querySelectorAll('.bar');
690
- bars.forEach(bar => {
691
- const height = Math.random() * 80 + 20;
692
- bar.style.height = `${height}px`;
693
- });
694
- }
695
-
696
- // Create sound buttons
697
- function createSoundButtons() {
698
- const grid = document.getElementById('soundGrid');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
699
 
700
- sounds.forEach(sound => {
701
- const button = document.createElement('button');
702
- button.className = 'sound-button rounded-xl p-6 text-white hover:shadow-2xl transition-all duration-300 group';
703
- button.innerHTML = `
704
- <div class="flex flex-col items-center space-y-3">
705
- <div class="text-4xl group-hover:scale-110 transition-transform">
706
- <i class="fas ${sound.icon}"></i>
707
- </div>
708
- <div class="text-center">
709
- <div class="font-bold text-sm">${sound.name}</div>
710
- <div class="category-badge mt-1">${sound.category}</div>
711
- </div>
712
- </div>
713
- `;
714
-
715
- button.addEventListener('click', () => {
716
- playSound(sound.id, button);
 
717
  });
 
 
 
 
 
 
718
 
719
- grid.appendChild(button);
720
- });
721
- }
722
-
723
- // Play sound function
724
- function playSound(soundId, buttonElement) {
725
- // Resume audio context if suspended
726
- if (audioContext.state === 'suspended') {
727
- audioContext.resume();
728
- }
 
 
 
 
 
 
 
729
 
730
- // Play the sound
731
- if (soundSynthesizers[soundId]) {
732
- soundSynthesizers[soundId]();
733
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
734
 
735
- // Visual feedback
736
- buttonElement.classList.add('playing', 'pulse');
737
- animateVisualizer();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
738
 
739
- setTimeout(() => {
740
- buttonElement.classList.remove('playing', 'pulse');
741
- }, 500);
742
- }
743
-
744
- // Volume control
745
- const volumeControl = document.getElementById('volumeControl');
746
- const volumeValue = document.getElementById('volumeValue');
747
-
748
- volumeControl.addEventListener('input', (e) => {
749
- const value = e.target.value;
750
- masterGainNode.gain.value = value / 100;
751
- volumeValue.textContent = `${value}%`;
752
- });
753
-
754
- // Random play
755
- document.getElementById('randomPlay').addEventListener('click', () => {
756
- const randomIndex = Math.floor(Math.random() * sounds.length);
757
- const randomSound = sounds[randomIndex];
758
- const buttons = document.querySelectorAll('.sound-button');
759
- playSound(randomSound.id, buttons[randomIndex]);
760
- });
761
-
762
- // Initialize
763
- createSoundButtons();
764
- createVisualizer();
765
-
766
- // Periodic visualizer animation
767
- setInterval(() => {
768
- if (audioContext.state === 'running') {
769
- animateVisualizer();
770
- }
771
- }, 100);
772
-
773
- // Add footer link
774
- const footer = document.createElement('footer');
775
- footer.className = 'fixed bottom-24 left-0 right-0 text-center p-2';
776
- footer.innerHTML = `
777
- <a href="https://huggingface.co/spaces/akhaliq/anycoder"
778
- target="_blank"
779
- class="text-white/80 hover:text-white text-sm transition-colors">
780
- Built with anycoder
781
- </a>
782
- `;
783
- document.body.appendChild(footer);
784
- </script>
785
- </body>
786
- </html>
 
1
  <!DOCTYPE html>
2
  <html lang="en">
3
+
4
  <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Game Sound Synthesizer - 30 Effects</title>
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
+ <style>
11
+ @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');
12
+
13
+ * {
14
+ margin: 0;
15
+ padding: 0;
16
+ box-sizing: border-box;
17
+ }
18
+
19
+ body {
20
+ font-family: 'Orbitron', monospace;
21
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
22
+ min-height: 100vh;
23
+ overflow-x: hidden;
24
+ }
25
+
26
+ .sound-button {
27
+ background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
28
+ backdrop-filter: blur(10px);
29
+ border: 2px solid rgba(255, 255, 255, 0.2);
30
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
31
+ position: relative;
32
+ overflow: hidden;
33
+ }
34
+
35
+ .sound-button::before {
36
+ content: '';
37
+ position: absolute;
38
+ top: 50%;
39
+ left: 50%;
40
+ width: 0;
41
+ height: 0;
42
+ border-radius: 50%;
43
+ background: rgba(255, 255, 255, 0.5);
44
+ transform: translate(-50%, -50%);
45
+ transition: width 0.6s, height 0.6s;
46
+ }
47
+
48
+ .sound-button.playing::before {
49
+ width: 300px;
50
+ height: 300px;
51
+ }
52
+
53
+ .sound-button:hover {
54
+ transform: translateY(-5px) scale(1.05);
55
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
56
+ border-color: rgba(255, 255, 255, 0.4);
57
+ }
58
+
59
+ .sound-button:active {
60
+ transform: translateY(-2px) scale(1.02);
61
+ }
62
+
63
+ .visualizer {
64
+ position: fixed;
65
+ bottom: 0;
66
+ left: 0;
67
+ right: 0;
68
+ height: 100px;
69
+ background: rgba(0, 0, 0, 0.3);
70
+ backdrop-filter: blur(10px);
71
+ display: flex;
72
+ align-items: flex-end;
73
+ justify-content: space-around;
74
+ padding: 10px;
75
+ z-index: 10;
76
+ }
77
+
78
+ .bar {
79
+ width: 3px;
80
+ background: linear-gradient(to top, #00ff88, #00ffff);
81
+ transition: height 0.1s ease;
82
+ border-radius: 2px;
83
+ }
84
+
85
+ @keyframes pulse {
86
+ 0% {
87
+ transform: scale(1);
88
+ }
89
+
90
+ 50% {
91
+ transform: scale(1.05);
92
+ }
93
+
94
+ 100% {
95
+ transform: scale(1);
96
+ }
97
+ }
98
+
99
+ .pulse {
100
+ animation: pulse 0.5s ease-in-out;
101
+ }
102
+
103
+ .glass-morphism {
104
+ background: rgba(255, 255, 255, 0.1);
105
+ backdrop-filter: blur(10px);
106
+ border: 1px solid rgba(255, 255, 255, 0.2);
107
+ }
108
+
109
+ .neon-text {
110
+ text-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
111
+ 0 0 20px rgba(255, 255, 255, 0.6),
112
+ 0 0 30px rgba(255, 255, 255, 0.4);
113
+ }
114
+
115
+ .category-badge {
116
+ background: linear-gradient(135deg, #667eea, #764ba2);
117
+ padding: 2px 8px;
118
+ border-radius: 12px;
119
+ font-size: 10px;
120
+ text-transform: uppercase;
121
+ letter-spacing: 1px;
122
+ }
123
+
124
+ @keyframes float {
125
+
126
+ 0%,
127
+ 100% {
128
+ transform: translateY(0px);
129
+ }
130
+
131
+ 50% {
132
+ transform: translateY(-10px);
133
+ }
134
+ }
135
+
136
+ .float-animation {
137
+ animation: float 3s ease-in-out infinite;
138
+ }
139
+ </style>
140
  </head>
141
+
142
  <body>
143
+ <!-- Header -->
144
+ <header class="glass-morphism sticky top-0 z-50 p-4 mb-8">
145
+ <div class="container mx-auto flex justify-between items-center">
146
+ <div class="flex items-center space-x-4">
147
+ <div class="float-animation">
148
+ <i class="fas fa-gamepad text-3xl text-white"></i>
149
+ </div>
150
+ <div>
151
+ <h1 class="text-2xl font-bold text-white neon-text">Game Sound Synthesizer</h1>
152
+ <p class="text-xs text-gray-200">30 Procedurally Generated Sound Effects</p>
153
+ </div>
154
+ </div>
155
+ <div class="flex items-center space-x-4">
156
+ <div class="flex items-center space-x-2">
157
+ <i class="fas fa-volume-up text-white"></i>
158
+ <input type="range" id="volumeControl" min="0" max="100" value="50"
159
  class="w-32 h-2 bg-white/30 rounded-lg appearance-none cursor-pointer">
160
+ <span id="volumeValue" class="text-white text-sm">50%</span>
161
+ </div>
162
+ <button id="randomPlay" class="bg-white/20 hover:bg-white/30 text-white px-4 py-2 rounded-lg transition-all">
163
  <i class="fas fa-random mr-2"></i>Random Play
164
  </button>
165
+ </div>
166
+ </div>
167
+ </header>
 
 
 
 
 
 
 
168
 
169
+ <!-- Main Content -->
170
+ <main class="container mx-auto px-4 pb-32">
171
+ <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4" id="soundGrid">
172
+ <!-- Sound buttons will be generated here -->
173
  </div>
174
+ </main>
175
 
176
+ <!-- Visualizer -->
177
+ <div class="visualizer" id="visualizer">
178
+ <!-- Bars will be generated here -->
179
+ </div>
180
+
181
+ <script>
182
+ // Audio Context
183
  const audioContext = new (window.AudioContext || window.webkitAudioContext)();
184
  let masterGainNode = audioContext.createGain();
185
  masterGainNode.connect(audioContext.destination);
 
206
  { id: 17, name: 'Fire', icon: 'fa-fire', category: 'element' },
207
  { id: 18, name: 'Thunder', icon: 'fa-cloud-bolt', category: 'element' },
208
  { id: 19, name: 'Level Up', icon: 'fa-trophy', category: 'ui' },
209
+ { id: 20, name: 'Game Over', icon: 'fa-skull', category: 'ui' },
210
+ { id: 21, name: 'Menu Click', icon: 'fa-mouse-pointer', category: 'ui' },
211
+ { id: 22, name: 'Pause', icon: 'fa-pause-circle', category: 'ui' },
212
+ { id: 23, name: 'Resume', icon: 'fa-play-circle', category: 'ui' },
213
+ { id: 24, name: 'Achievement', icon: 'fa-medal', category: 'ui' },
214
+ { id: 25, name: 'Critical Hit', icon: 'fa-crosshairs', category: 'impact' },
215
+ { id: 26, name: 'Dodge', icon: 'fa-wind', category: 'movement' },
216
+ { id: 27, name: 'Potion Drink', icon: 'fa-flask', category: 'power' },
217
+ { id: 28, name: 'Lockpick', icon: 'fa-key', category: 'environment' },
218
+ { id: 29, name: 'Chest Open', icon: 'fa-box-open', category: 'collect' },
219
+ { id: 30, name: 'Monster Roar', icon: 'fa-dragon', category: 'creature' }
220
  ];
221
 
222
  // Sound synthesis functions
 
697
 
698
  osc.start(audioContext.currentTime);
699
  osc.stop(audioContext.currentTime + 1);
700
+ },
701
+
702
+ 21: () => { // Menu Click
703
+ const osc = audioContext.createOscillator();
704
+ const gain = audioContext.createGain();
705
+
706
+ osc.connect(gain);
707
+ gain.connect(masterGainNode);
708
+
709
+ osc.type = 'sine';
710
+ osc.frequency.setValueAtTime(800, audioContext.currentTime);
711
+ osc.frequency.exponentialRampToValueAtTime(1200, audioContext.currentTime + 0.05);
712
+
713
+ gain.gain.setValueAtTime(0.2, audioContext.currentTime);
714
+ gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.05);
715
+
716
+ osc.start(audioContext.currentTime);
717
+ osc.stop(audioContext.currentTime + 0.05);
718
+ },
719
+
720
+ 22: () => { // Pause
721
+ const osc = audioContext.createOscillator();
722
+ const gain = audioContext.createGain();
723
+
724
+ osc.connect(gain);
725
+ gain.connect(masterGainNode);
726
+
727
+ osc.type = 'triangle';
728
+ osc.frequency.setValueAtTime(440, audioContext.currentTime);
729
+ osc.frequency.linearRampToValueAtTime(220, audioContext.currentTime + 0.2);
730
+
731
+ gain.gain.setValueAtTime(0.15, audioContext.currentTime);
732
+ gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.2);
733
+
734
+ osc.start(audioContext.currentTime);
735
+ osc.stop(audioContext.currentTime + 0.2);
736
+ },
737
+
738
+ 23: () => { // Resume
739
+ const osc = audioContext.createOscillator();
740
+ const gain = audioContext.createGain();
741
+
742
+ osc.connect(gain);
743
+ gain.connect(masterGainNode);
744
+
745
+ osc.type = 'triangle';
746
+ osc.frequency.setValueAtTime(220, audioContext.currentTime);
747
+ osc.frequency.linearRampToValueAtTime(440, audioContext.currentTime + 0.2);
748
+
749
+ gain.gain.setValueAtTime(0.15, audioContext.currentTime);
750
+ gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.2);
751
+
752
+ osc.start(audioContext.currentTime);
753
+ osc.stop(audioContext.currentTime + 0.2);
754
+ },
755
 
756
+ 24: () => { // Achievement
757
+ const notes = [523.25, 659.25, 783.99, 1046.5];
758
+ notes.forEach((freq, i) => {
759
+ const osc = audioContext.createOscillator();
760
+ const gain = audioContext.createGain();
761
+
762
+ osc.connect(gain);
763
+ gain.connect(masterGainNode);
764
+
765
+ osc.frequency.value = freq;
766
+ osc.type = 'sine';
767
+
768
+ gain.gain.setValueAtTime(0, audioContext.currentTime + i * 0.08);
769
+ gain.gain.linearRampToValueAtTime(0.25, audioContext.currentTime + i * 0.08 + 0.05);
770
+ gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + i * 0.08 + 0.3);
771
+
772
+ osc.start(audioContext.currentTime + i * 0.08);
773
+ osc.stop(audioContext.currentTime + i * 0.08 + 0.3);
774
  });
775
+ },
776
+
777
+ 25: () => { // Critical Hit
778
+ const osc = audioContext.createOscillator();
779
+ const gain = audioContext.createGain();
780
+ const filter = audioContext.createBiquadFilter();
781
 
782
+ osc.connect(filter);
783
+ filter.connect(gain);
784
+ gain.connect(masterGainNode);
785
+
786
+ osc.type = 'sawtooth';
787
+ osc.frequency.setValueAtTime(100, audioContext.currentTime);
788
+
789
+ filter.type = 'highpass';
790
+ filter.frequency.setValueAtTime(500, audioContext.currentTime);
791
+ filter.Q.value = 15;
792
+
793
+ gain.gain.setValueAtTime(0.5, audioContext.currentTime);
794
+ gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.3);
795
+
796
+ osc.start(audioContext.currentTime);
797
+ osc.stop(audioContext.currentTime + 0.3);
798
+ },
799
 
800
+ 26: () => { // Dodge
801
+ const noise = audioContext.createBufferSource();
802
+ const filter = audioContext.createBiquadFilter();
803
+ const gain = audioContext.createGain();
804
+ const bufferSize = audioContext.sampleRate * 0.15;
805
+ const buffer = audioContext.createBuffer(1, bufferSize, audioContext.sampleRate);
806
+ const output = buffer.getChannelData(0);
807
+
808
+ for (let i = 0; i < bufferSize; i++) {
809
+ output[i] = (Math.random() * 2 - 1) * Math.exp(-i / (bufferSize * 0.2));
810
+ }
811
+
812
+ noise.buffer = buffer;
813
+ filter.type = 'bandpass';
814
+ filter.frequency.setValueAtTime(3000, audioContext.currentTime);
815
+ filter.frequency.exponentialRampToValueAtTime(1000, audioContext.currentTime + 0.15);
816
+
817
+ noise.connect(filter);
818
+ filter.connect(gain);
819
+ gain.connect(masterGainNode);
820
+
821
+ gain.gain.setValueAtTime(0.2, audioContext.currentTime);
822
+ gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.15);
823
+
824
+ noise.start();
825
+ },
826
 
827
+ 27: () => { // Potion Drink
828
+ const osc1 = audioContext.createOscillator();
829
+ const osc2 = audioContext.createOscillator();
830
+ const gain = audioContext.createGain();
831
+
832
+ osc1.connect(gain);
833
+ osc2.connect(gain);
834
+ gain.connect(masterGainNode);
835
+
836
+ osc1.type = 'sine';
837
+ osc2.type = 'triangle';
838
+
839
+ osc1.frequency.setValueAtTime(349.23, audioContext.currentTime);
840
+ osc2.frequency.setValueAtTime(440, audioContext.currentTime);
841
+
842
+ osc1.frequency.exponentialRampToValueAtTime(698.46, audioContext.currentTime + 0.4);
843
+ osc2.frequency.exponentialRampToValueAtTime(880, audioContext.currentTime + 0.4);
844
+
845
+ gain.gain.setValueAtTime(0, audioContext.currentTime);
846
+ gain.gain.linearRampToValueAtTime(0.2, audioContext.currentTime + 0.05);
847
+ gain.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.6);
848
+
849
+ osc1.start(audioContext.currentTime);
850
+ osc2.start(audioContext.currentTime);
851
+ osc1.stop(audioContext.currentTime + 0.6);
852
+ osc2.stop(audioContext.currentTime + 0.6);
853
+ },
854
 
855
+ 28: () => { // Lockpick
856
+ const osc = audioContext.createO