Make your own lehra from a tune you can sing

Sing or play a tune you know, and Lehra Composer turns it into a nagma
you can practise tabla against, in the taal you choose.

Every tabla player has a favourite lehra, often more than one. Returning to it feels like coming home to the familiar turn of the phrase, the space before sam and the arrival you know by ear. It becomes part of the riyaz.

The choice changes with the work. Clear entries help when checking lay, whereas another melody or instrument may suit a more exploratory sitting. Raag, taal, speed and sound all matter. Tabla Focus includes traditional lehras for commonly practised taals, with harmonium-based melodies and recorded sitar lehras. Lehra Composer makes room for the nagma you want beyond that collection. For how the lehra itself works in Tabla Focus, see lehra for tabla practice.

Sing a nagma and bring it into riyaz

Lehra Composer recording workspace

From tune to riyaz

  1. Record the tuneHum one avartan.
  2. Piano-roll editorHear the notes from your take.
  3. Save the lehraGive your nagma a name.
  4. Choose your lehraFind it under Your lehras.
  5. Play for riyazYour melody, back in Lehra.
Play the silent animation
01From one sung avartan to a saved lehra. Actual app recording · silent, 14 seconds. The piano roll shows the transcribed take; this recording contains no manual note edits.

Choose the taal, instrument and tempo. After the count-in, hum or sing one avartan. The app turns the take into notes and plays them through the selected instrument. You can also enter the melody directly in the piano roll.

The workflow begins with the taal because a lehra needs a place in the cycle. After the count-in establishes the lay, one avartan defines what will repeat. There is no long recording to cut down before hearing the result.

Listen through the return to sam. Adjust anything that sounds misplaced, then name and save the melody. It appears under Your lehras, alongside the app’s existing choices, ready for the next sitting.

Adjust the sur, entry and hold

Once recording is complete, the notes appear on the piano roll: a WYSIWYG (what you see is what you get) editor where you adjust the lehra directly on the grid. Higher and lower rows represent pitch, while moving across the grid follows the matras. A note’s width shows its duration, with vibhag boundaries keeping the taal in view.

Touch a note to hear it. Drag it up or down to change the sur, or sideways to change where it enters. Stretch its right edge to lengthen the hold. There is no need to sing the whole nagma again.

Try it · simplified piano roll

Place the sur. Adjust the hold.

Drag the note to change its entry and pitch. Drag its right edge to change duration. You can also use the buttons below.

PaMaGaReSa1 · sam2345678Time →Illustrative 8-matra spanGaDrag note: move · Drag right edge: resize
Entry: matra 3Pitch: GaDuration: 2 matras

A schematic of the gesture, not a recording or app simulation.

02Try moving or stretching the note. The dashed outline shows its original position. This is an explanatory model of the gestures.

The selected note has a resize target larger than the thin mark on screen. Zoom opens up the matras without shrinking the pitch rows. Empty space lets you pan, and each completed drag can be undone. VoiceOver actions and direct note entry offer the same corrections without a precise touch gesture.

How does a sung tune become a lehra?

The app records audio, finds the notes, then plays those notes using instrument samples. The saved lehra can therefore change in pitch, timing or sound without requiring another recording.

Pitch analysis runs on the device. After Probabilistic YIN finds possible pitches,1 Viterbi decoding follows a likely path through them.2 A second pass identifies separate note entries from changes in pitch and attack, because singing the same sur twice must remain distinguishable from holding it once.

One held sur, or two separate entries?

Synthetic example · a shared time axis links pitch, articulation and note boundaries

A repeated pitch needs a second kind of boundary evidenceSynthetic three-second example. A pitch change at 1.25 seconds creates a boundary. At 2.05 seconds the pitch remains steady, but articulation evidence can split a repeated note. A pitch-only comparison merges those last two events. This is an illustration, not app analysis output.Illustrative time →0 s123Pitch candidatesDecoded pitchArticulationPitch + articulationTime-localhypothesesContinuouspitch evidenceSpectral /envelope arrival220 Hz → assigned note247 Hz247 Hz · repeatedPitch change · 1.25 sSame pitch, new articulation · 2.05 sPitch only220 Hz247 Hz · repeated entries mergedSame time axis. The difference is the event boundary at 2.05 s.0 s123Decoded pitchArticulation evidencePitch + articulation220 Hz247 Hz247 Hz again1.25 s2.05 sPitch changesPitch stays; attack changesPitch only220 Hz247 Hz · entries merged
03Same sur, separate notes. The second attack creates a new entry without a pitch change. Illustrative data, not a measured recording.

The app then assigns the notes and estimates Sa. Its initial duration rule holds each note until the next entry, so a breath may become a longer instrumental hold. Listen and shorten it where needed. The recording path is designed for a single hummed or sung melody.

Timing is measured against the recorded reference for sam and stored in fractions of a matra. The current format uses 480 ticks per matra. Zooming the editor changes only the view, so the note keeps its position in the taal.

For playback, Sa and the note’s pitch select an instrument sample. The audio engine schedules that sample at the note’s entry and renders its hold. MIDI export carries the pitches and timings, while the instrument samples supply the sound. A take and its Sa are accepted together as one undoable edit, so a correction can be tried without losing the earlier melody.

The result is a saved nagma that stays open to correction and can accompany the next avartan.

Sources

  1. Matthias Mauch and Simon Dixon. “pYIN: A Fundamental Frequency Estimator Using Probabilistic Threshold Distributions.” Proceedings of IEEE ICASSP 2014: 659–663. https://doi.org/10.1109/ICASSP.2014.6853678.
  2. Andrew J. Viterbi. “Error Bounds for Convolutional Codes and an Asymptotically Optimum Decoding Algorithm.” IEEE Transactions on Information Theory 13, no. 2 (1967): 260–269. https://doi.org/10.1109/TIT.1967.1054010.
Tabla Focus · Published 28 October 2026