locity / 127})`;
        }

        // Add pattern to sequence notes
        strudelPattern += `.seq()`;
        
        return strudelPattern;
    }

    // Add function to update Strudel code display
    function updateStrudelCode() {
        const strudelCodeDiv = document.getElementById('strudelCode');
        if (!currentLines || currentLines.length === 0) {
            strudelCodeDiv.querySelector('code').textContent = '// No lines active';
            return;
        }

        let code = '';
      