Bionic VisionS

Electronic Music Band

<!-- wp:code -->
<pre class="wp-block-code"><code>&lt;!DOCTYPE html&gt;
&lt;html lang="it"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;title&gt;Korg Z1 Random Patch Generator&lt;/title&gt;
    &lt;style&gt;
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Courier New', monospace;
            background: linear-gradient(135deg, #1a1a2e, #16213e);
            color: #e94560;
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: rgba(0, 0, 0, 0.8);
            border-radius: 15px;
            padding: 30px;
            box-shadow: 0 20px 40px rgba(233, 69, 96, 0.3);
        }

        h1 {
            text-align: center;
            font-size: 2.5em;
            margin-bottom: 30px;
            text-shadow: 0 0 20px #e94560;
            animation: glow 2s ease-in-out infinite alternate;
        }

        @keyframes glow {
            from { text-shadow: 0 0 20px #e94560; }
            to { text-shadow: 0 0 30px #e94560, 0 0 40px #e94560; }
        }

        .controls {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 30px;
            flex-wrap: wrap;
        }

        button {
            background: linear-gradient(45deg, #e94560, #0f3460);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 25px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        button:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(233, 69, 96, 0.4);
        }

        button:active {
            transform: translateY(0);
        }

        .patch-display {
            background: rgba(15, 52, 96, 0.3);
            border: 2px solid #e94560;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .patch-name {
            font-size: 1.5em;
            font-weight: bold;
            margin-bottom: 15px;
            text-align: center;
            color: #00d4ff;
        }

        .section {
            margin-bottom: 25px;
            background: rgba(0, 0, 0, 0.3);
            padding: 15px;
            border-radius: 8px;
            border-left: 4px solid #e94560;
        }

        .section h3 {
            color: #00d4ff;
            margin-bottom: 10px;
            font-size: 1.2em;
            text-transform: uppercase;
        }

        .parameter-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 10px;
        }

        .parameter {
            display: flex;
            justify-content: space-between;
            padding: 5px 0;
            border-bottom: 1px solid rgba(233, 69, 96, 0.2);
        }

        .param-name {
            color: #ffffff;
            font-weight: bold;
        }

        .param-value {
            color: #00ff88;
            font-weight: bold;
        }

        .export-section {
            background: rgba(0, 212, 255, 0.1);
            border: 2px solid #00d4ff;
            border-radius: 10px;
            padding: 20px;
            margin-top: 20px;
        }

        textarea {
            width: 100%;
            height: 150px;
            background: rgba(0, 0, 0, 0.8);
            color: #00ff88;
            border: 1px solid #e94560;
            border-radius: 5px;
            padding: 10px;
            font-family: 'Courier New', monospace;
            font-size: 12px;
            resize: vertical;
        }

        .footer {
            text-align: center;
            margin-top: 30px;
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.9em;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div class="container"&gt;
        &lt;h1&gt;🎹 KORG Z1 PATCH GENERATOR 🎹&lt;/h1&gt;
        
        &lt;div class="controls"&gt;
            &lt;button onclick="generateRandomPatch()"&gt;🎲 GENERA PATCH RANDOM&lt;/button&gt;
            &lt;button onclick="generateInitPatch()"&gt;🔄 RESET INIT PATCH&lt;/button&gt;
            &lt;button onclick="exportPatch()"&gt;💾 ESPORTA PARAMETRI&lt;/button&gt;
        &lt;/div&gt;

        &lt;div class="patch-display" id="patchDisplay"&gt;
            &lt;div class="patch-name" id="patchName"&gt;Inizializza una patch...&lt;/div&gt;
            &lt;div id="patchContent"&gt;&lt;/div&gt;
        &lt;/div&gt;

        &lt;div class="export-section"&gt;
            &lt;h3&gt;📋 Esportazione Parametri&lt;/h3&gt;
            &lt;textarea id="exportText" placeholder="I parametri della patch appariranno qui..." readonly&gt;&lt;/textarea&gt;
        &lt;/div&gt;

        &lt;div class="footer"&gt;
            Korg Z1 Random Patch Generator - Esplora nuovi suoni della sintesi fisica!
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;script&gt;
        let currentPatch = {};

        // Definizione dei parametri del Korg Z1
        const z1Parameters = {
            oscillator: {
                'Osc Type': &#91;'Brass', 'Reed', 'Pipe', 'Flute', 'Sax', 'Violin', 'Cello', 'Guitar', 'Harp', 'Bell'],
                'Pitch': () =&gt; Math.floor(Math.random() * 128),
                'Fine Tune': () =&gt; Math.floor(Math.random() * 128) - 64,
                'Breath': () =&gt; Math.floor(Math.random() * 128),
                'Pressure': () =&gt; Math.floor(Math.random() * 128),
                'Embouchure': () =&gt; Math.floor(Math.random() * 128),
                'Tongue': () =&gt; Math.floor(Math.random() * 128)
            },
            dwgs: {
                'String Length': () =&gt; Math.floor(Math.random() * 128),
                'Pick Position': () =&gt; Math.floor(Math.random() * 128),
                'Pick Depth': () =&gt; Math.floor(Math.random() * 128),
                'Pick Velocity': () =&gt; Math.floor(Math.random() * 128),
                'Damper': () =&gt; Math.floor(Math.random() * 128),
                'Decay': () =&gt; Math.floor(Math.random() * 128),
                'Body Type': &#91;'Wood1', 'Wood2', 'Steel', 'Electric', 'Synthetic']
            },
            filter: {
                'Cutoff': () =&gt; Math.floor(Math.random() * 128),
                'Resonance': () =&gt; Math.floor(Math.random() * 128),
                'Type': &#91;'LPF', 'HPF', 'BPF', 'BRF'],
                'Key Track': () =&gt; Math.floor(Math.random() * 128),
                'Velocity': () =&gt; Math.floor(Math.random() * 128) - 64
            },
            amp: {
                'Attack': () =&gt; Math.floor(Math.random() * 128),
                'Decay': () =&gt; Math.floor(Math.random() * 128),
                'Sustain': () =&gt; Math.floor(Math.random() * 128),
                'Release': () =&gt; Math.floor(Math.random() * 128),
                'Key Track': () =&gt; Math.floor(Math.random() * 128) - 64,
                'Velocity': () =&gt; Math.floor(Math.random() * 128)
            },
            lfo: {
                'Rate': () =&gt; Math.floor(Math.random() * 128),
                'Delay': () =&gt; Math.floor(Math.random() * 128),
                'Depth': () =&gt; Math.floor(Math.random() * 128),
                'Waveform': &#91;'Triangle', 'Square', 'Saw', 'Random'],
                'Sync': &#91;'Off', 'On'],
                'Destination': &#91;'Pitch', 'Cutoff', 'Amplitude', 'Pan']
            },
            effects: {
                'Reverb': () =&gt; Math.floor(Math.random() * 128),
                'Chorus': () =&gt; Math.floor(Math.random() * 128),
                'Delay': () =&gt; Math.floor(Math.random() * 128),
                'Distortion': () =&gt; Math.floor(Math.random() * 128),
                'EQ Low': () =&gt; Math.floor(Math.random() * 128) - 64,
                'EQ Mid': () =&gt; Math.floor(Math.random() * 128) - 64,
                'EQ High': () =&gt; Math.floor(Math.random() * 128) - 64
            }
        };

        const patchNames = &#91;
            'Mystic Brass', 'Digital Dreams', 'Cyber Flute', 'Neural Strings', 'Quantum Reed',
            'Synthetic Sax', 'Electric Violin', 'Matrix Bells', 'Neon Pipes', 'Virtual Cello',
            'Plasma Guitar', 'Crystal Harp', 'Binary Brass', 'Holographic Horn', 'Laser Lead',
            'Orbital Organ', 'Robotic Reed', 'Stellar Strings', 'Cosmic Clarinet', 'Digital Drone'
        ];

        function generateRandomValue(param) {
            if (Array.isArray(param)) {
                return param&#91;Math.floor(Math.random() * param.length)];
            } else if (typeof param === 'function') {
                return param();
            }
            return param;
        }

        function generateRandomPatch() {
            currentPatch = {};
            
            // Genera nome random
            const patchName = patchNames&#91;Math.floor(Math.random() * patchNames.length)];
            
            // Genera parametri per ogni sezione
            for (const &#91;sectionName, parameters] of Object.entries(z1Parameters)) {
                currentPatch&#91;sectionName] = {};
                for (const &#91;paramName, paramValue] of Object.entries(parameters)) {
                    currentPatch&#91;sectionName]&#91;paramName] = generateRandomValue(paramValue);
                }
            }
            
            displayPatch(patchName);
        }

        function generateInitPatch() {
            currentPatch = {
                oscillator: {
                    'Osc Type': 'Brass',
                    'Pitch': 64,
                    'Fine Tune': 0,
                    'Breath': 64,
                    'Pressure': 64,
                    'Embouchure': 64,
                    'Tongue': 64
                },
                dwgs: {
                    'String Length': 64,
                    'Pick Position': 64,
                    'Pick Depth': 64,
                    'Pick Velocity': 64,
                    'Damper': 0,
                    'Decay': 64,
                    'Body Type': 'Wood1'
                },
                filter: {
                    'Cutoff': 127,
                    'Resonance': 0,
                    'Type': 'LPF',
                    'Key Track': 64,
                    'Velocity': 0
                },
                amp: {
                    'Attack': 0,
                    'Decay': 64,
                    'Sustain': 127,
                    'Release': 64,
                    'Key Track': 0,
                    'Velocity': 64
                },
                lfo: {
                    'Rate': 32,
                    'Delay': 0,
                    'Depth': 0,
                    'Waveform': 'Triangle',
                    'Sync': 'Off',
                    'Destination': 'Pitch'
                },
                effects: {
                    'Reverb': 32,
                    'Chorus': 0,
                    'Delay': 0,
                    'Distortion': 0,
                    'EQ Low': 0,
                    'EQ Mid': 0,
                    'EQ High': 0
                }
            };
            
            displayPatch('Init Patch');
        }

        function displayPatch(name) {
            document.getElementById('patchName').textContent = name;
            
            const content = document.getElementById('patchContent');
            content.innerHTML = '';
            
            const sectionTitles = {
                oscillator: '🎺 OSCILLATORE',
                dwgs: '🎸 DWGS (Digital Waveguide Synthesis)',
                filter: '🔊 FILTRO',
                amp: '📢 AMPLIFICATORE',
                lfo: '🌊 LFO',
                effects: '✨ EFFETTI'
            };
            
            for (const &#91;sectionName, parameters] of Object.entries(currentPatch)) {
                const section = document.createElement('div');
                section.className = 'section';
                
                const title = document.createElement('h3');
                title.textContent = sectionTitles&#91;sectionName] || sectionName.toUpperCase();
                section.appendChild(title);
                
                const grid = document.createElement('div');
                grid.className = 'parameter-grid';
                
                for (const &#91;paramName, paramValue] of Object.entries(parameters)) {
                    const param = document.createElement('div');
                    param.className = 'parameter';
                    
                    const nameSpan = document.createElement('span');
                    nameSpan.className = 'param-name';
                    nameSpan.textContent = paramName;
                    
                    const valueSpan = document.createElement('span');
                    valueSpan.className = 'param-value';
                    valueSpan.textContent = paramValue;
                    
                    param.appendChild(nameSpan);
                    param.appendChild(valueSpan);
                    grid.appendChild(param);
                }
                
                section.appendChild(grid);
                content.appendChild(section);
            }
        }

        function exportPatch() {
            if (Object.keys(currentPatch).length === 0) {
                document.getElementById('exportText').value = 'Genera prima una patch!';
                return;
            }
            
            let exportText = `=== KORG Z1 PATCH EXPORT ===\n`;
            exportText += `Patch Name: ${document.getElementById('patchName').textContent}\n`;
            exportText += `Generated: ${new Date().toLocaleString()}\n\n`;
            
            for (const &#91;sectionName, parameters] of Object.entries(currentPatch)) {
                exportText += `&#91;${sectionName.toUpperCase()}]\n`;
                for (const &#91;paramName, paramValue] of Object.entries(parameters)) {
                    exportText += `${paramName}: ${paramValue}\n`;
                }
                exportText += '\n';
            }
            
            document.getElementById('exportText').value = exportText;
        }

        // Genera una patch init all'avvio
        generateInitPatch();
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
<!-- /wp:code -->