
Kotek
An iOS and iPadOS app that helps young Balinese practise gamelan gangsa on their own. It started as a community challenge with Mekar Bhuana and became my final Academy project, evolving from a camera-and-microphone prototype into our own IoT vibration-sensor kit that reads every strike over Bluetooth.
Role
- iOS Developer
- Hardware Prototyping
- Web Developer
Year
Deliverable
- iOS & iPadOS App
- IoT Sensor Kit
- Firmware
- Marketing Website
Website
Tech Stack
Core Challenge
- Young Balinese still want to play gamelan, but joining a sekaa means a standing rehearsal commitment most cannot take on.
- Kotekan only exists when two players interlock, which makes it hard to practise alone, and detecting strikes on ringing bronze is hard.
Key Impact
- A first version that used the camera to see which key and the microphone to hear when, shipped on the App Store.
- A rebuilt version with an ESP32 piezo-sensor kit over Bluetooth, a waterfall notation, solo and two-player coop, and Kotek Studio, on iPhone and iPad.
Lessons Learned
- Sometimes the right fix is not a better model but a better sensor: the hardware made the software simpler and the setup faster.
- Working with a real community partner kept the product honest: it helps someone take a first step, before a teacher, not instead of one.
Challenge Based Learning
This was a team project at the Apple Developer Academy, where every project follows Challenge Based Learning (CBL). Rather than starting from a feature list, a team starts from a big idea, narrows it into an essential question and a concrete challenge statement (Engage), researches real users with guiding questions (Investigate), then builds, tests and refines a solution (Act).
The challenge: Empower young Balinese who want to relearn gamelan by turning a real instrument into something they can approach alone, guided, before there is a teacher or a community to join. Kotek is my biggest project at the Academy. It started as a community challenge, where each team partnered with a local community, and we were paired with Mekar Bhuana, a family-run centre in Denpasar that documents, reconstructs and repatriates endangered classical gamelan. We liked the problem so much that we carried it on as our final project.

https://kotek.app - Kotek: practise kotekan every day, not just at rehearsal.
Investigate: Discovering the World of Gamelan
Most of us had never played gamelan. Mekar Bhuana taught us how the instrument is actually learned, and interviews with young Balinese gave a consistent picture: they still want gamelan, but they mostly hear it at ceremonies, and the barrier is not desire.
- Time: The usual way in is joining a neighbourhood sekaa, a standing commitment of rehearsals tied to a place and a ceremonial calendar. Working young people cannot take it on, and no smaller commitment exists.
- Access: Instruments are expensive and community-gated.
- Knowledge: Gamelan is taught by ear and example, so there is no visible way to begin alone.
- Fear of Being a Beginner: Nobody wants to be bad in front of people who already know.
We focused on the gangsa and on kotekan, the interlocking figures where two players (polos and sangsih) each play half of one fast melody. It is the heart of Balinese gamelan, and exactly what is hardest to practise alone.

Learning gamelan with our community partner, Mekar Bhuana, in Denpasar.
Version 1: An iPhone on a Tripod
Our first answer, for the community challenge, was an iPhone on a stand looking down at the instrument. The camera watched the bronze keys, the microphone listened, and an overlay on the live feed showed which key to strike next while the app played the other half.
- Camera Said Which Key: A tiny Create ML classifier with Vision answered whether each key region was being struck.
- Microphone Said When: Spectral-flux onset detection and FFT analysis on the audio timed each strike, all with first-party frameworks.
- What We Learned: It worked well enough to demo and ship to the App Store, but accuracy was low, delay was noticeable, and the setup (a stand, framing, lighting, aligning masks to the keys and an acoustic baseline) was the biggest source of friction. Bronze rings for seconds, so by the third note the microphone hears three keys at once.

The first version at the community challenge showcase: an iPhone on a tripod above the gangsa, watching and listening.
Version 2: Building Our Own Sensor
For the final project we changed the approach completely. Instead of guessing from the room, we put a sensor on the instrument: an IoT kit we built ourselves with a piezo vibration sensor on each bilah (key), wired to an ESP32 that does the hit detection on the device and sends every strike to the app over Bluetooth LE.
- Exact and Instant: A sensor on each key knows both which key and when, needs no calibration against the room, and cannot be fooled by another instrument playing nearby.
- Firmware: Threshold, ring-down rejection and a crosstalk window on the ESP32; plug detection so the app knows which inputs have a sensor; up to 16 inputs through multiplexers; and a PIN with an owner key so a room full of kits cannot interfere with each other.
- Two-Minute Setup: Name the instrument, pair the kit, strike each key once from low to high to map it, and tap along to the gong to measure latency. Any tuning works, because keys are addressed by index, never by pitch.
The App
- Waterfall Notation: Notes fall onto a drawn gangsa, the way players already read notation, so the device can sit anywhere it can be seen.
- Guided Practice: Learn either half note by note, build up from slow to full speed, and see exactly where in the cycle you slip, with an on-device AI overview of the session.
- Coop: Two people play one kotekan together, on one screen or across two devices, because the interlock is the instrument's reason to exist.
- Kotek Studio: Write, record and keep your own kotekan figures, since players learn new figures from teachers and from each other.
- Play Along Without Sensors: The app still works without the kit, as a guided play-along.
- Accounts and Sync: Optional Sign in with Apple, with profiles, history and progress synced through Supabase, on iPhone and iPad.

The waterfall play screen, polos and sangsih side by side, Kotek Studio for writing your own figures, and two-player coop.

Choosing a kotekan, and how the interlock works.
Outcome
Kotek is on the App Store, with the sensor-based 2.0 for iPhone and iPad following the camera-based first version. More than the technology, the project taught me what it means to build with a community rather than for it: Mekar Bhuana shaped several of the core decisions, and the product language stays honest that it helps someone take a first step, before a teacher, not instead of one.

The team with Mekar Bhuana.