KompangXR is a mixed reality trainer for the kompang, a Malay frame drum, built for the Meta Quest 3. The controller is a real drum. You strike an actual kompang, sensors under the skin pick up the hit, and the note lands in the headset in real time.
Why a real drum
I come from a music background, and this started as a regular drum trainer for my final year project. My supervisor suggested switching to the kompang for its heritage value, and that one decision shaped everything after it. The kompang has two core strokes, PAK and BUNG, and the point of learning it is feel. Practicing on a controller teaches you timing but not the instrument, so the drum had to be real.
From skin to screen
Every hit follows the same path. The sensors feed an Arduino Pro Micro, which reads the piezo for strike strength and the capacitive line for how the hand lands. The firmware classifies the hit and sends it out as USB MIDI, BUNG as note 36 and PAK as note 38, with velocity mapped to how hard you struck. The Quest 3 receives the MIDI directly, and Unity 6 spawns notes on a highway anchored in passthrough, so the real drum stays in front of you while you play.
Songs start life as FL Studio arrangements. A custom MidiFile.cs parser and a beatmap generator turn those MIDI files into playable charts inside the Unity editor, and sixteen setup scripts build the whole scene programmatically. Feedback is physical too: DOTween drives a squash and stretch on every note that scales with strike velocity, so a hard BUNG visibly lands harder. There is a tutorial with text-to-speech and subtitles, a calibration menu, and a keyboard fallback so I could test charts at my desk without the drum. The firmware comments are in Bahasa Melayu, which felt right for the instrument.
Telling PAK from BUNG
The hard part was classification. One sensor chain has to tell two strokes apart in real time, and a BUNG rings the skin long enough to fake a PAK right after it. The shipped rule is simple: if the capacitive peak rises more than 110 over its baseline, the hit is a BUNG, otherwise it is a PAK. A 550 ms echo guard after each BUNG suppresses the false PAKs, and anything below a peak of 100 is rejected as noise. It classifies about 90% of strikes correctly.
Before settling on that, I built a Python calibration pipeline that recorded 30 hits per class over serial and trained a LinearSVC with cross-validation. It worked as an experiment, but the threshold rule was proven on the actual hardware and had nothing extra to go wrong, so that is what shipped. Building the smarter approach and then choosing the simpler one was its own lesson.

Where it stands
KompangXR is a working APK, built solo across 103 commits in May and June 2026. Next up: user and expert testing, more songs, and getting it ready to demo publicly.







