File size: 18,883 Bytes
7ddcf6c | 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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Psychedelic Binaural Studio</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<link rel="stylesheet" href="style.css">
</head>
<body class="bg-gray-900 text-white min-h-screen overflow-x-hidden">
<!-- Animated Background -->
<div class="fixed inset-0 z-0">
<div class="absolute inset-0 bg-gradient-to-br from-purple-900 via-blue-900 to-pink-900 animate-gradient"></div>
<div class="absolute inset-0 opacity-30 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-yellow-400 via-red-500 to-purple-600 animate-pulse-slow"></div>
<canvas id="particleCanvas" class="absolute inset-0 w-full h-full"></canvas>
</div>
<!-- Main Container -->
<div class="relative z-10 container mx-auto px-4 py-8 max-w-6xl">
<!-- Header -->
<header class="text-center mb-12">
<h1 class="text-5xl md:text-7xl font-bold mb-4 text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 via-purple-400 to-pink-400 animate-text-shimmer drop-shadow-lg">
Binaural Studio
</h1>
<p class="text-lg md:text-xl text-purple-200 font-light tracking-wide">
Customize your consciousness journey 🧘♀️✨
</p>
</header>
<!-- Main Control Panel -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<!-- Binaural Controls -->
<div class="glass-panel rounded-3xl p-8 shadow-2xl border border-white/20">
<div class="flex items-center justify-between mb-6">
<h2 class="text-2xl font-semibold text-cyan-300 flex items-center gap-2">
<i data-lucide="activity" class="w-6 h-6"></i>
Binaural Beats
</h2>
<div class="flex gap-2">
<span class="text-xs px-3 py-1 rounded-full bg-cyan-500/20 text-cyan-300 border border-cyan-400/30">Spatial</span>
<span class="text-xs px-3 py-1 rounded-full bg-pink-500/20 text-pink-300 border border-pink-400/30">Monaural</span>
</div>
</div>
<!-- Mode Selection -->
<div class="mb-6 p-4 bg-black/20 rounded-2xl border border-white/10">
<label class="text-sm text-purple-200 mb-3 block font-medium">Beat Mode</label>
<div class="grid grid-cols-2 gap-3">
<button id="spatialBtn" class="mode-btn active bg-gradient-to-r from-cyan-500 to-blue-500 text-white py-3 px-4 rounded-xl font-medium transition-all hover:scale-105 shadow-lg shadow-cyan-500/30 border-2 border-transparent">
🎧 Spatial (Binaural)
</button>
<button id="monauralBtn" class="mode-btn bg-white/10 text-purple-200 py-3 px-4 rounded-xl font-medium transition-all hover:scale-105 border-2 border-transparent hover:bg-white/20">
🔊 Monaural
</button>
</div>
<p class="text-xs text-purple-300 mt-2 italic" id="modeDescription">
Different frequencies in each ear create the beat perception
</p>
</div>
<!-- Frequency Controls -->
<div class="space-y-6 mb-6">
<div class="control-group">
<div class="flex justify-between mb-2">
<label class="text-cyan-300 font-medium">Carrier Frequency (Base)</label>
<span id="carrierValue" class="text-cyan-300 font-mono bg-cyan-900/30 px-3 py-1 rounded-lg">200 Hz</span>
</div>
<input type="range" id="carrierSlider" min="40" max="500" value="200" class="w-full h-3 bg-black/30 rounded-full appearance-none cursor-pointer accent-cyan-400 hover:accent-cyan-300">
<div class="flex justify-between text-xs text-purple-300 mt-1">
<span>40 Hz (Deep)</span>
<span>500 Hz (Bright)</span>
</div>
</div>
<div class="control-group">
<div class="flex justify-between mb-2">
<label class="text-pink-300 font-medium">Beat Frequency (Difference)</label>
<span id="beatValue" class="text-pink-300 font-mono bg-pink-900/30 px-3 py-1 rounded-lg">10 Hz</span>
</div>
<input type="range" id="beatSlider" min="0.5" max="40" step="0.5" value="10" class="w-full h-3 bg-black/30 rounded-full appearance-none cursor-pointer accent-pink-400 hover:accent-pink-300">
<div class="flex justify-between text-xs text-purple-300 mt-1">
<span>0.5 Hz (Delta)</span>
<span>40 Hz (Gamma)</span>
</div>
</div>
</div>
<!-- Brainwave Presets -->
<div class="grid grid-cols-5 gap-2 mb-6">
<button class="brainwave-btn bg-indigo-500/20 hover:bg-indigo-500/40 border border-indigo-400/30 rounded-lg py-2 text-xs font-medium transition-all" data-carrier="100" data-beat="0.5">
Delta<br><span class="text-[10px] opacity-70">Sleep</span>
</button>
<button class="brainwave-btn bg-blue-500/20 hover:bg-blue-500/40 border border-blue-400/30 rounded-lg py-2 text-xs font-medium transition-all" data-carrier="150" data-beat="6">
Theta<br><span class="text-[10px] opacity-70">Relax</span>
</button>
<button class="brainwave-btn bg-green-500/20 hover:bg-green-500/40 border border-green-400/30 rounded-lg py-2 text-xs font-medium transition-all" data-carrier="200" data-beat="10">
Alpha<br><span class="text-[10px] opacity-70">Focus</span>
</button>
<button class="brainwave-btn bg-yellow-500/20 hover:bg-yellow-500/40 border border-yellow-400/30 rounded-lg py-2 text-xs font-medium transition-all" data-carrier="250" data-beat="20">
Beta<br><span class="text-[10px] opacity-70">Active</span>
</button>
<button class="brainwave-btn bg-red-500/20 hover:bg-red-500/40 border border-red-400/30 rounded-lg py-2 text-xs font-medium transition-all" data-carrier="300" data-beat="40">
Gamma<br><span class="text-[10px] opacity-70">Peak</span>
</button>
</div>
<!-- Ramp Controls -->
<div class="mb-6 p-4 bg-black/20 rounded-2xl border border-white/10">
<label class="text-sm text-purple-200 mb-3 block font-medium">Volume Ramping</label>
<div class="grid grid-cols-3 gap-2">
<button id="rampNone" class="ramp-btn active bg-gradient-to-r from-purple-500 to-pink-500 text-white py-2 px-3 rounded-lg text-sm font-medium transition-all">
Instant
</button>
<button id="rampUp" class="ramp-btn bg-white/10 text-purple-200 py-2 px-3 rounded-lg text-sm font-medium transition-all hover:bg-white/20">
Ramp Up ⬆️
</button>
<button id="rampDown" class="ramp-btn bg-white/10 text-purple-200 py-2 px-3 rounded-lg text-sm font-medium transition-all hover:bg-white/20">
Ramp Down ⬇️
</button>
</div>
<div class="mt-3 flex items-center gap-3">
<label class="text-xs text-purple-300">Duration:</label>
<input type="range" id="rampDuration" min="5" max="300" value="60" class="flex-1 h-2 bg-black/30 rounded-full accent-purple-400">
<span id="rampDurationValue" class="text-xs text-purple-300 font-mono w-12">60s</span>
</div>
</div>
<!-- Main Play Button -->
<button id="playBinauralBtn" class="w-full bg-gradient-to-r from-cyan-400 via-purple-500 to-pink-500 hover:from-cyan-300 hover:via-purple-400 hover:to-pink-400 text-white font-bold py-4 px-8 rounded-2xl text-xl shadow-lg shadow-purple-500/50 transition-all transform hover:scale-[1.02] active:scale-95 flex items-center justify-center gap-3">
<i data-lucide="play" class="w-6 h-6"></i>
<span>Generate Binaural Beat</span>
</button>
</div>
<!-- Noise Controls -->
<div class="glass-panel rounded-3xl p-8 shadow-2xl border border-white/20">
<div class="flex items-center justify-between mb-6">
<h2 class="text-2xl font-semibold text-amber-300 flex items-center gap-2">
<i data-lucide="waves" class="w-6 h-6"></i>
Spatial Noise
</h2>
<span class="text-xs px-3 py-1 rounded-full bg-amber-500/20 text-amber-300 border border-amber-400/30">Always Spatial</span>
</div>
<div class="space-y-4 mb-6">
<p class="text-sm text-purple-200 mb-4">
Immersive 3D noise environment with stereo spatialization. Each noise type is rendered in true stereo field for maximum immersion.
</p>
<!-- Noise Presets -->
<div class="grid grid-cols-1 gap-4">
<button id="pinkNoiseBtn" class="noise-btn group relative overflow-hidden bg-gradient-to-r from-pink-400 to-rose-500 hover:from-pink-300 hover:to-rose-400 text-white p-6 rounded-2xl transition-all transform hover:scale-[1.02] active:scale-95 shadow-lg shadow-pink-500/30 border border-pink-300/50">
<div class="relative z-10 flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="w-12 h-12 rounded-full bg-white/20 flex items-center justify-center backdrop-blur-sm">
<i data-lucide="cloud" class="w-6 h-6"></i>
</div>
<div class="text-left">
<h3 class="font-bold text-lg">Pink Noise</h3>
<p class="text-sm text-pink-100">Balanced, natural, soothing</p>
</div>
</div>
<i data-lucide="play-circle" class="w-8 h-8 opacity-80 group-hover:opacity-100 transition-opacity"></i>
</div>
<div class="absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000"></div>
</button>
<button id="brownNoiseBtn" class="noise-btn group relative overflow-hidden bg-gradient-to-r from-amber-600 to-orange-700 hover:from-amber-500 hover:to-orange-600 text-white p-6 rounded-2xl transition-all transform hover:scale-[1.02] active:scale-95 shadow-lg shadow-orange-500/30 border border-orange-300/50">
<div class="relative z-10 flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="w-12 h-12 rounded-full bg-white/20 flex items-center justify-center backdrop-blur-sm">
<i data-lucide="flame" class="w-6 h-6"></i>
</div>
<div class="text-left">
<h3 class="font-bold text-lg">Brown Noise</h3>
<p class="text-sm text-orange-100">Deep, rumbling, intense</p>
</div>
</div>
<i data-lucide="play-circle" class="w-8 h-8 opacity-80 group-hover:opacity-100 transition-opacity"></i>
</div>
<div class="absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000"></div>
</button>
<button id="whiteNoiseBtn" class="noise-btn group relative overflow-hidden bg-gradient-to-r from-slate-400 to-gray-500 hover:from-slate-300 hover:to-gray-400 text-white p-6 rounded-2xl transition-all transform hover:scale-[1.02] active:scale-95 shadow-lg shadow-gray-500/30 border border-gray-300/50">
<div class="relative z-10 flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="w-12 h-12 rounded-full bg-white/20 flex items-center justify-center backdrop-blur-sm">
<i data-lucide="wind" class="w-6 h-6"></i>
</div>
<div class="text-left">
<h3 class="font-bold text-lg">White Noise</h3>
<p class="text-sm text-gray-100">Sharp, masking, crisp</p>
</div>
</div>
<i data-lucide="play-circle" class="w-8 h-8 opacity-80 group-hover:opacity-100 transition-opacity"></i>
</div>
<div class="absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000"></div>
</button>
</div>
</div>
<!-- Noise Volume -->
<div class="mb-6 p-4 bg-black/20 rounded-2xl border border-white/10">
<div class="flex justify-between mb-2">
<label class="text-amber-300 font-medium">Noise Volume</label>
<span id="noiseVolumeValue" class="text-amber-300 font-mono bg-amber-900/30 px-3 py-1 rounded-lg">70%</span>
</div>
<input type="range" id="noiseVolumeSlider" min="0" max="100" value="70" class="w-full h-3 bg-black/30 rounded-full appearance-none cursor-pointer accent-amber-400">
</div>
<!-- Spatial Width -->
<div class="mb-6 p-4 bg-black/20 rounded-2xl border border-white/10">
<div class="flex justify-between mb-2">
<label class="text-purple-300 font-medium">Spatial Width (Stereo Separation)</label>
<span id="spatialWidthValue" class="text-purple-300 font-mono bg-purple-900/30 px-3 py-1 rounded-lg">Wide</span>
</div>
<input type="range" id="spatialWidthSlider" min="0" max="100" value="80" class="w-full h-3 bg-black/30 rounded-full appearance-none cursor-pointer accent-purple-400">
<p class="text-xs text-purple-300 mt-2">Adjust the perceived width of the noise field</p>
</div>
<!-- Stop All Button -->
<button id="stopAllBtn" class="w-full bg-gradient-to-r from-red-500 to-rose-600 hover:from-red-400 hover:to-rose-500 text-white font-bold py-4 px-8 rounded-2xl text-xl shadow-lg shadow-red-500/50 transition-all transform hover:scale-[1.02] active:scale-95 flex items-center justify-center gap-3 opacity-50 cursor-not-allowed" disabled>
<i data-lucide="square" class="w-6 h-6"></i>
<span>Stop All Audio</span>
</button>
</div>
</div>
<!-- Visualizer Section -->
<div class="mt-8 glass-panel rounded-3xl p-6 shadow-2xl border border-white/20">
<div class="flex items-center justify-between mb-4">
<h3 class="text-xl font-semibold text-cyan-300 flex items-center gap-2">
<i data-lucide="bar-chart-2" class="w-5 h-5"></i>
Real-time Visualization
</h3>
<div class="flex gap-2 text-xs">
<span class="flex items-center gap-1 text-cyan-300">
<span class="w-2 h-2 rounded-full bg-cyan-400 animate-pulse"></span>
Left Channel
</span>
<span class="flex items-center gap-1 text-pink-300">
<span class="w-2 h-2 rounded-full bg-pink-400 animate-pulse"></span>
Right Channel
</span>
</div>
</div>
<canvas id="audioVisualizer" class="w-full h-48 md:h-64 rounded-2xl bg-black/40 border border-white/10"></canvas>
</div>
<!-- Info Section -->
<div class="mt-8 grid grid-cols-1 md:grid-cols-3 gap-4 text-center">
<div class="glass-panel rounded-2xl p-4 border border-white/10">
<i data-lucide="headphones" class="w-8 h-8 mx-auto mb-2 text-cyan-400"></i>
<p class="text-sm text-purple-200">Use headphones for best binaural effect</p>
</div>
<div class="glass-panel rounded-2xl p-4 border border-white/10">
<i data-lucide="timer" class="w-8 h-8 mx-auto mb-2 text-pink-400"></i>
<p class="text-sm text-purple-200">Ramping helps gentle entry/exit</p>
</div>
<div class="glass-panel rounded-2xl p-4 border border-white/10">
<i data-lucide="volume-2" class="w-8 h-8 mx-auto mb-2 text-amber-400"></i>
<p class="text-sm text-purple-200">Spatial noise creates 3D soundscape</p>
</div>
</div>
</div>
<script src="script.js"></script>
<script>
lucide.createIcons();
</script>
<script src="https://deepsite.hf.co/deepsite-badge.js"></script>
</body>
</html> |