Oh actually, since you're not using a button to generate the random sequence, as in my snippet, but the note number which both scripts can already see, you can just use a connected sliderpack on the UI and keep it simple.
Press middle C
HiseSnippet 1198.3oc6Ws0baSDEdkSDTanCTFdkYDY3AYbFWqXG43ojgj3jzZvI1sNMjAdnyZoUVahztBo0owkg+X7.+B3GC+CfypKVxotWvz9.yfeHSN6dt7smKe93ggbKRTDODoT4rYADjxGqNZFS310ESYndGhT9B0HOpMIL.ackE22eJiZgETNSPhDnClEfihH1HEk0dnzDkxqih+7me6AXOLyhjeDBcNmZQ5S8oh7SGt22S87NFaSNi5WP6V60yhy5x83SA3slZCjDB3IjSwR0JohdDNxEo70pM11jPZ2zw1F2rosooYmc5zpiA1oQK7XCyNs1pU6s1osCR4CNxlJ3giDX.8Hk0OfaOajK+4rj.bNMhN1iHELPifHmb7wbOa4STdJpqK0ydXVdKBAdYXdVbsjr3mqdB0lN+77r4mFegVtEESfJkVDdqs.7LJBuFEf2RfToBPZ8DHcO0QVgz.Q9MR77Qp8fBYnCFpSEgRhtnR+lhZWYolIp6iuhbbHHL2BcyFM1TC9S0GToBTqhDZWiC0FE2uLDJVFZ6pkY9DhnK2Ofy.A8MJnyFRqoLOJin4LkYI6szlFXC4fybIOkpWsxuTorCOTSmB9qwCznZeSwfHc8oS8SNIRuJnPsZUKWobYH1QbOR8fPJDzaYRh34Xuoj8E5zp.L904wmyNkKHCXIAm5noeBjzflu3fAWAAbLITup1t6BYfpPvV.xfupncau43j3tacmLCEx87jtaIWKmJBecFpyhwxlPxGdKyUDp7K1No9pamJ1sakTvJnHm0iQECBHrW0L.JsJCsdJonBBuHtw6yRa7xS+HJzicW0B0CTLzKxT.4RLR4mTMaU+x5acQsKZzezNyLHMubv4FC5UiMdLu8L+YV2Lv7gl9c5a93wsoC520XvfWT2oyk8e79M69CjgaM3pu6T6Z0u35aLm8heriwfCtV7nZ0Qnm16PYPRgLfd3EEPBETYxR4Px0.WUxrSY0CIQWI3Aw5l1DiT9v+AOvaxebe0dyxENbuf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