@DnP I checked the snippet you provided, and there is no
Message.sendToMidiOut()
anywhere in your script.
So I added them in both onNoteOn & onNoteOff callbacks and here it's working in Logic, compiled as MidiFX plugin (au) (playing a C Major scale)
And this is the plugin compiled as VSTi inside Reaper
HiseSnippet 2196.3oc6Z9maaibEGmzNb2UJMEYA5Afv+wB4tFdIo3OjZZZcrrcpwZkntxcQQWrHfgbjzfPwQkbz53VDfbE5MpWgdG5An2f1Y3PIMecji0pzE6erqPfB9xYdCey68lg7iGMnfkPJKYEFlMu75YDCyeg0vqy4S5MIllab9IFl225YLN4qHSimYb70yhKKIoFll69TYGLabOipO+me+wwYw4IjUWxv3qYzDxEzoT9pqN3nujlkcVbJ4R5Tsd6ez4Ir7drL1bgyrqkiwr3jWEOl7rXY21wx3ODWNwv7Wak556NpSRbXGWeujDuNQdciRHwiFQBcCh76LxeTbhimg4GcZJkyJFxi4jRCy6cLK85gSXWkqtAeMsj9xLhT3ZLTbmUW9LVVpbJJupQuIzrzAKhRkFhQYvpX1tpX1uxpOMkt75qhcOrpA6UVnG.M2AcucA2yU28bzbu6vktmxk9TqgIEzY7UsnxkmmyIEhvCAbEUeM14eaZ0iI5QN+vowuhbVgPrzhVgNNGXK9Z+G0r43L1KiyrufMd7f3bRl8isWX4XBuGa5LVtPzZuk8XOoYKUGVR3CDgI9Wwlyo4jVilmmvor7Vi2u4euYiwGNRTl7jrrV6475Qi7q9HGBQKkxafrNok5+JO7pITNQ1XyFzQ1snkmPFIFzzV7IzxCSi4wGxIulu+9MaHrOsH9pmjQGK5vkhqdiNcfckVLKtfkDmcLaddZYKm8OvduDwLpfjJci2r+iV3w1rb4Jjmm2pxya9ll12roQiVaaxHVAKKiTnZV7uF8EYKQUuXRlmdISV97747Vx41atg0x0OEuuwsU97oujTbf82EmMmrrihZDrvy51K7zWWjnxuZcjkedNk+7Yj7aa0hQcQgrHs1qDckWUh9KqKQOdNmyxMnhJwOw5z+Bm8z9FUdrvyLq1aXisr+EKrb09R2p0CynojhJq+XquL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