Implementing a MIDI player in Kotlin
summary
Step‑by‑step implementation shows a working MIDI player built in Kotlin using Kotlin coroutines and the JVM standard library that reads MIDI files via the Java MIDI API, parses tracks and ticks into a simple note data structure (note, beat, duration, velocity), schedules playback with a coroutine-based scheduler and metronome, connects to external synths and SuperCollider via Open Sound Control, supports tempo changes, loops and sample drums, includes live reloading via Kotlin scripting and demos a live performance with Punkt while noting millisecond timing limits from the JVM/GC.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:51MIDI? At Kotlin conference?
- 2:55What is MIDI?
- 4:39How old is MIDI?
- 6:30Is it still alive?
- 7:17Is MIDI still alive?
- 7:54Solid foundation
- 10:26Reverse engineering MIDI sequence
- 12:07MIDI messages
- 13:21MIDI commands
- 17:16MIDI player - the plan
- 17:53MIDI melody v2
- 19:07MIDI timing
- 21:44Metronome
- 28:05What's missing?
- 28:55Open Sound Control
- 30:02OSC Time Tag
- 34:48Kotlin Scripting
related talks
47mLooking at Music, an experiment with Kotlin, JavaFX, MIDI, and Virtual Threads
47mStrumming up a music player with CMP 🤘
01h 27mAn introduction to Kotlin by example
41mKotlin for the JVM and beyond
36mMobile Backend in Kotlin
53mAn introduction to Kotlin by example
49mKotlin: the swift of Android
46mMaking Noise with Kotlin Native
