Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Synthesizer - Quantum Music</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/animejs/lib/anime.iife.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <style> | |
| :root { | |
| --quantum-purple: #6e45e2; | |
| --quantum-teal: #88d3ce; | |
| --quantum-pink: #ff2a6d; | |
| --quantum-blue: #05d9e8; | |
| --quantum-dark: #0c0f1f; | |
| --quantum-darker: #080a1a; | |
| } | |
| .quantum-bg { | |
| background: linear-gradient(135deg, var(--quantum-dark), var(--quantum-darker)); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .quantum-bg::before { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background: | |
| radial-gradient(circle at 10% 20%, rgba(110, 69, 226, 0.1) 0%, transparent 20%), | |
| radial-gradient(circle at 90% 80%, rgba(136, 211, 206, 0.1) 0%, transparent 20%), | |
| radial-gradient(circle at 50% 50%, rgba(5, 217, 232, 0.05) 0%, transparent 30%); | |
| z-index: 0; | |
| } | |
| .quantum-card { | |
| background: rgba(255, 255, 255, 0.05); | |
| backdrop-filter: blur(10px); | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| border-radius: 16px; | |
| transition: all 0.3s ease; | |
| } | |
| .quantum-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 30px rgba(110, 69, 226, 0.2); | |
| border-color: rgba(110, 69, 226, 0.3); | |
| } | |
| .quantum-header { | |
| background: rgba(12, 15, 31, 0.8); | |
| backdrop-filter: blur(10px); | |
| position: sticky; | |
| top: 0; | |
| z-index: 100; | |
| border-bottom: 1px solid rgba(255, 255, 255, 0.05); | |
| } | |
| .quantum-nav a { | |
| position: relative; | |
| padding: 8px 0; | |
| } | |
| .quantum-nav a::after { | |
| content: ''; | |
| position: absolute; | |
| bottom: 0; | |
| left: 0; | |
| width: 0; | |
| height: 2px; | |
| background: var(--quantum-blue); | |
| transition: width 0.3s ease; | |
| } | |
| .quantum-nav a:hover::after { | |
| width: 100%; | |
| } | |
| .waveform-container { | |
| height: 250px; | |
| background: rgba(10, 12, 25, 0.7); | |
| border-radius: 12px; | |
| position: relative; | |
| overflow: hidden; | |
| border: 1px solid rgba(110, 69, 226, 0.2); | |
| } | |
| .waveform { | |
| position: absolute; | |
| bottom: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| .control-group { | |
| margin-bottom: 1.5rem; | |
| } | |
| .control-label { | |
| display: block; | |
| margin-bottom: 0.5rem; | |
| font-weight: 500; | |
| } | |
| .slider { | |
| width: 100%; | |
| height: 6px; | |
| background: rgba(255, 255, 255, 0.1); | |
| border-radius: 3px; | |
| outline: none; | |
| -webkit-appearance: none; | |
| } | |
| .slider::-webkit-slider-thumb { | |
| -webkit-appearance: none; | |
| width: 18px; | |
| height: 18px; | |
| border-radius: 50%; | |
| background: var(--quantum-purple); | |
| cursor: pointer; | |
| box-shadow: 0 0 10px rgba(110, 69, 226, 0.5); | |
| } | |
| .quantum-btn { | |
| background: linear-gradient(45deg, var(--quantum-purple), var(--quantum-teal)); | |
| border: none; | |
| border-radius: 30px; | |
| padding: 12px 20px; | |
| font-weight: 600; | |
| transition: all 0.3s ease; | |
| width: 100%; | |
| color: white; | |
| } | |
| .quantum-btn:hover { | |
| transform: translateY(-3px); | |
| box-shadow: 0 5px 20px rgba(110, 69, 226, 0.4); | |
| } | |
| .control-btn { | |
| width: 50px; | |
| height: 50px; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| background: rgba(110, 69, 226, 0.2); | |
| border: 1px solid rgba(110, 69, 226, 0.3); | |
| color: white; | |
| transition: all 0.3s ease; | |
| } | |
| .control-btn:hover { | |
| background: rgba(110, 69, 226, 0.4); | |
| transform: scale(1.1); | |
| } | |
| .sequence-item { | |
| background: rgba(110, 69, 226, 0.2); | |
| border: 1px solid rgba(110, 69, 226, 0.3); | |
| border-radius: 8px; | |
| padding: 8px 16px; | |
| transition: all 0.3s ease; | |
| } | |
| .sequence-item:hover { | |
| background: rgba(110, 69, 226, 0.3); | |
| transform: translateY(-2px); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-900 text-white min-h-screen"> | |
| <div class="quantum-bg min-h-screen"> | |
| <!-- Header --> | |
| <header class="quantum-header container mx-auto py-4 px-4"> | |
| <div class="flex justify-between items-center"> | |
| <h1 class="text-3xl font-bold">Quantum Music Synthesizer</h1> | |
| <nav class="quantum-nav"> | |
| <ul class="flex space-x-8"> | |
| <li><a href="index.html" class="hover:text-purple-300 font-medium">Home</a></li> | |
| <li><a href="synthesizer.html" class="hover:text-purple-300 font-medium">Synthesizer</a></li> | |
| <li><a href="quantum.html" class="hover:text-purple-300 font-medium">Quantum</a></li> | |
| <li><a href="visualization.html" class="hover:text-purple-300 font-medium">Visualization</a></li> | |
| <li><a href="about.html" class="hover:text-purple-300 font-medium">About</a></li> | |
| <li><a href="api.html" class="hover:text-purple-300 font-medium">API</a></li> | |
| <li><a href="agent.html" class="hover:text-purple-300 font-medium">Agent</a></li> | |
| </ul> | |
| </nav> | |
| </div> | |
| </header> | |
| <!-- Synthesizer Section --> | |
| <section class="container mx-auto py-16 px-4"> | |
| <h2 class="text-4xl font-bold text-center mb-12">Quantum Synthesizer</h2> | |
| <div class="max-w-6xl mx-auto quantum-card p-8"> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-12"> | |
| <div> | |
| <h3 class="text-2xl font-bold mb-6">Parameters</h3> | |
| <div class="space-y-6"> | |
| <div class="control-group"> | |
| <label class="control-label">Mode</label> | |
| <select class="w-full bg-gray-800 rounded-lg p-3 border border-gray-700 focus:border-purple-500 focus:outline-none"> | |
| <option>Cinematic</option> | |
| <option>Ambient</option> | |
| <option>Electronic</option> | |
| <option>Classical</option> | |
| <option>Experimental</option> | |
| </select> | |
| </div> | |
| <div class="control-group"> | |
| <label class="control-label">Complexity Factor</label> | |
| <input type="range" min="0" max="1" step="0.01" value="0.5" class="slider"> | |
| <div class="flex justify-between text-sm mt-2"> | |
| <span>Simple</span> | |
| <span>Complex</span> | |
| </div> | |
| </div> | |
| <div class="control-group"> | |
| <label class="control-label">Duration (seconds)</label> | |
| <input type="range" min="5" max="60" step="5" value="20" class="slider"> | |
| <div class="flex justify-between text-sm mt-2"> | |
| <span>5s</span> | |
| <span>60s</span> | |
| </div> | |
| </div> | |
| <div class="control-group"> | |
| <label class="control-label">Harmonic Richness</label> | |
| <input type="range" min="0" max="100" step="1" value="75" class="slider"> | |
| <div class="flex justify-between text-sm mt-2"> | |
| <span>Minimal</span> | |
| <span>Rich</span> | |
| </div> | |
| </div> | |
| </div> | |
| <button class="mt-8 quantum-btn"> | |
| Generate Quantum Sequence | |
| </button> | |
| </div> | |
| <div> | |
| <h3 class="text-2xl font-bold mb-6">Waveform</h3> | |
| <div class="waveform-container"> | |
| <div class="waveform" id="waveform"></div> | |
| </div> | |
| <div class="mt-6 flex justify-center space-x-6"> | |
| <button class="control-btn"> | |
| <i data-feather="play"></i> | |
| </button> | |
| <button class="control-btn"> | |
| <i data-feather="pause"></i> | |
| </button> | |
| <button class="control-btn"> | |
| <i data-feather="stop"></i> | |
| </button> | |
| <button class="control-btn"> | |
| <i data-feather="rotate-ccw"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mt-12"> | |
| <h3 class="text-2xl font-bold mb-6">Generated Sequence</h3> | |
| <div class="bg-gray-800/50 rounded-xl p-6"> | |
| <div class="flex flex-wrap gap-3"> | |
| <div class="sequence-item">440.0 Hz</div> | |
| <div class="sequence-item">523.25 Hz</div> | |
| <div class="sequence-item">659.25 Hz</div> | |
| <div class="sequence-item">440.0 Hz</div> | |
| <div class="sequence-item">523.25 Hz</div> | |
| <div class="sequence-item">783.99 Hz</div> | |
| <div class="sequence-item">523.25 Hz</div> | |
| <div class="sequence-item">440.0 Hz</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Footer --> | |
| <footer class="container mx-auto py-8 px-4 text-center border-t border-gray-800"> | |
| <p class="text-gray-400">Powered by QuantumToolbox.jl, Amazon Braket, and Lindblad Solvers</p> | |
| </footer> | |
| </div> | |
| <script> | |
| feather.replace(); | |
| // Create waveform visualization | |
| function createWaveform() { | |
| const waveform = document.getElementById('waveform'); | |
| waveform.innerHTML = ''; | |
| // Create SVG for waveform | |
| const svgNS = "http://www.w3.org/2000/svg"; | |
| const svg = document.createElementNS(svgNS, "svg"); | |
| svg.setAttribute("width", "100%"); | |
| svg.setAttribute("height", "100%"); | |
| // Create path for waveform | |
| const path = document.createElementNS(svgNS, "path"); | |
| let d = "M 0 125 "; | |
| for (let i = 0; i <= 100; i++) { | |
| const x = i * 10; | |
| const y = 125 + Math.sin(i * 0.2) * 50 + Math.sin(i * 0.5) * 30; | |
| d += `L ${x} ${y} `; | |
| } | |
| path.setAttribute("d", d); | |
| path.setAttribute("stroke", "url(#waveGradient)"); | |
| path.setAttribute("stroke-width", "2"); | |
| path.setAttribute("fill", "none"); | |
| // Create gradient | |
| const defs = document.createElementNS(svgNS, "defs"); | |
| const gradient = document.createElementNS(svgNS, "linearGradient"); | |
| gradient.setAttribute("id", "waveGradient"); | |
| gradient.setAttribute("x1", "0%"); | |
| gradient.setAttribute("y1", "0%"); | |
| gradient.setAttribute("x2", "100%"); | |
| gradient.setAttribute("y2", "0%"); | |
| const stop1 = document.createElementNS(svgNS, "stop"); | |
| stop1.setAttribute("offset", "0%"); | |
| stop1.setAttribute("stop-color", "#6e45e2"); | |
| const stop2 = document.createElementNS(svgNS, "stop"); | |
| stop2.setAttribute("offset", "100%"); | |
| stop2.setAttribute("stop-color", "#88d3ce"); | |
| gradient.appendChild(stop1); | |
| gradient.appendChild(stop2); | |
| defs.appendChild(gradient); | |
| svg.appendChild(defs); | |
| svg.appendChild(path); | |
| waveform.appendChild(svg); | |
| // Animate waveform | |
| anime({ | |
| targets: path, | |
| d: [ | |
| {value: d}, | |
| {value: d.replace(/L (\d+) (\d+(\.\d+)?)/g, (match, x, y) => `L ${x} ${125 + Math.sin(x * 0.2 + 2) * 50 + Math.sin(x * 0.5 + 2) * 30}`)} | |
| ], | |
| duration: 2000, | |
| loop: true, | |
| easing: 'linear' | |
| }); | |
| } | |
| // Initialize waveform when page loads | |
| window.addEventListener('load', createWaveform); | |
| </script> | |
| </body> | |
| </html> | |