TIGA ALPHABlog

← All articles

AI Onset Detection: Finding When a Piano Note Begins

News ·

AI Onset Detection: Finding When a Piano Note Begins

AI onset detection is the task of finding the moment a musical note, or another clearly articulated sound, begins. On a piano, that moment is usually the attack: the hammer meets the string, the energy rises sharply, and a new pitch starts to speak. Software that transcribes audio, aligns a recording to a score, or comments on a learner's timing all depend on this apparently small decision. If the detected onset is early, late, missed or invented, every later judgement about rhythm can shift with it. Understanding how onset detection works, and where it struggles, makes the behaviour of practice tools less mysterious.

What the software is looking for

An onset is a change, not a pitch. The system is trying to mark a time point where a new event starts, even if the new event is soft, or even if another note is already sounding.

A sudden rise in energy

Many classic methods watch for a rapid increase in loudness or in high-frequency energy, because a piano attack often puts a brief, bright transient into the sound. This works well for detached, mid-dynamic notes in a quiet texture.

A change in the spectrum

When one note is already ringing, a new note may not raise the overall loudness very much. It may instead add new frequency peaks. More modern methods therefore look at how the shape of the spectrum changes, not only at how loud the whole signal becomes.

Learned patterns of attack

Neural models can be trained on recordings in which people have marked note starts, or on recordings paired with a known MIDI file. The model then learns the look of a piano attack, including some of the softer or more overlapped cases that a simple energy rule would miss.

Abstract neon waveforms across a dark background

Why piano attacks can be surprisingly hard

The piano is often used as a test instrument for onset detection because its attacks are relatively clear. Even so, several everyday situations remain difficult.

  • Soft legato playing can start a new note with very little transient, especially in the mid range with the sustain pedal down.
  • A new note may be hidden inside the resonance of a thick chord that is already ringing.
  • Pedal noise, key-release clicks and damper movement can look like extra onsets if the system is too sensitive.
  • Two hands playing almost together may be merged into one detected event, or a rolled chord may be split into more events than a musician would count as separate attacks.
  • Room microphones pick up reflections that smear the start of the sound, while a close or internal signal can be much cleaner.

These limits are why a timing comment from software should always be read in musical context, especially for quiet, pedalled or densely voiced passages.

How to use onset-aware practice thoughtfully

You can work with this technology instead of arguing with it.

Give the microphone a clean start

If an app listens through a phone or a room mic, move extra noise away and avoid a booming pedal for the passages where you want reliable timing comments.

Test the same phrase detached and legato

Play a short line once with clear gaps, then again fully legato. If the feedback changes a lot, you are seeing the limits of onset detection, not necessarily a sudden collapse in your rhythm.

Trust your ear on rolls and ornaments

A broken chord, a grace note or a soft repeated note may be heard differently by a model than by a teacher. Use the software as a second opinion, then decide by listening.

TIGA ALPHA is an AI piano teaching app whose feedback on rhythm depends on hearing when notes start and how they line up with the score. Knowing that onset detection is the first link in that chain helps you interpret a comment calmly: a flagged moment might be a true slip, or it might be a soft attack that was hard to locate. Either way, the useful next step is to play the bar again and listen.

FAQ

Q: Is onset detection the same as pitch detection?

A: No. Onset detection marks the start of an event in time. Pitch detection, or transcription, asks what note is sounding, which is a further question.

Q: Why does an app sometimes miss a very soft note?

A: A soft, pedalled attack may not produce a clear transient, so the system may treat it as a continuation of the previous sound rather than as a new onset.

Q: Can two notes played together be detected as one onset?

A: Yes. If the attacks are extremely close, some systems report a single event. That is one reason tightly synchronised chords need careful reading of automatic feedback.

Q: Does a digital piano make onset detection easier?

A: A direct electronic or MIDI signal can be very clean, because the instrument already knows when a key started. A microphone in a room is harder, even when the playing is the same.

Get started with TIGA ALPHA

TIGA ALPHA is an AI piano teaching app built by a Thai team, with lessons in 10 languages: Thai, English, Mandarin, Arabic, Japanese, Russian, Spanish, French, Hindi and Korean. Its CEO, Teacher Aum, has 20 years of experience in piano teaching, and that music teaching background shapes every lesson, while piano teaching with AI gives you feedback each time you play piano. Use it as an online piano lessons app for short daily sessions, follow it as a complete AI online piano course, or combine it with a piano course or piano learning course led by a teacher. Whether you want to learn piano from zero, learn piano online after a long break, learn music alongside your children or simply play music for fun, this online piano teaching application keeps your next step clear. New users get a 7-day free Premium trial, then US$24.99/month. Open the piano teaching app below and pick a first lesson that fits your week.

Knowing when a note begins sounds simple until two sounds overlap; that tiny moment is one of the first things a listening machine has to get right.

Start learning free on TIGA ALPHA