ength === 0) {
                previewElement.innerHTML = '';
                return;
            }

            const rect = previewElement.getBoundingClientRect();
            previewElement.innerHTML = ScoreUtilities.makePianoRollSVG(notes, rect.width, rect.height);
        });
    }

    // Add root note name update:
    document.getElementById('root').addEventListener('input', function() {
        const rootValue = parseInt(this.value);
        
        document.getElementById('rootNoteName').textConte