r/JavaFX • u/xyloPhoton • Dec 21 '23
Help Faster response time on button presses?
I'm trying to make a little piano demo on JavaFX, but the even handlers are too slow, and there's a significant delay between the button presses and the notes playing. How could I make it more responsive?
Edit: Okay, it's not just a button thing. :(
2
Upvotes
View all comments
Show parent comment
3
u/xyloPhoton Dec 21 '23
Thanks for your answer! I'm using javax.sound.midi, but the problem isn't with slow audio output. The print statements come simultaneously with the audio.
I can't really tell if the VM args helped, to be frank. Maybe it's a little bit better, but it's still not good. I really hope I can solve this somehow, this is a deal-breaker with JavaFX. :(