Looking at Music, an experiment with Kotlin, JavaFX, MIDI, and Virtual Threads by Vik Delporte

Explore how Kotlin, JavaFX, MIDI & Virtual Threads combine in MelodyMatrix to create music visualizations. Learn about modern Java desktop apps, real-time processing & deployment.

Key takeaways
  • Virtual threads in Java 21 enable lightweight concurrent tasks without overwhelming system resources, ideal for handling many MIDI events and I/O operations

  • MelodyMatrix demonstrates Java/JavaFX’s capabilities for desktop applications by creating music visualizations and MIDI event processing with a modern, responsive UI

  • The MIDI standard is stable and well-integrated into Java, providing reliable communication with musical instruments through simple 3-byte messages

  • JavaFX remains a viable alternative to Electron for desktop applications, offering better performance and resource usage while maintaining cross-platform compatibility

  • Kotlin integration with Java projects provides additional features and syntax improvements while maintaining interoperability with Java libraries

  • Using proven, stable technologies (JVM, Java) for core functionality while experimenting with newer features (virtual threads) helps balance innovation and reliability

  • JavaFX applications can be packaged and deployed as native installers using tools like JDeploy, making distribution and updates straightforward

  • Open source collaboration and modular architecture enable community contributions while keeping core business logic private

  • Real-time visualization and processing of MIDI events demonstrate Java’s capability to handle time-sensitive operations efficiently

  • Modern Java development benefits from six-month release cycles, bringing regular improvements while maintaining backwards compatibility