Your rating: None Average: 5 (2 votes)


SailTuner is a chromatic multi-temperament instrument tuner for Sailfish OS.

It gets audio data from microphone, find the fundamental frequency, and then display the note, the octave and the deviation according to note reference and temperament.

It can also play a note, choosed with a scale flickable by user.

Pitch detection algorithm

The algorithm for fundamental frequency detection:

  • high-pass filter (10Hz)
  • zero-crossing detection with linear interpolation
  • pattern recognition from regions, with time based standard deviation
  • octave filtering: drop a frequency if already a higher octave for same note in some conditions
  • post filter: wait few analyses to confirm or defect a note, and make a turning average for note deviation

The audio input rate is 16KHz ; audio frames are analysed every 2048 samples (128ms) and a note is confirmed after 3 chunks (384ms).

The note is found compared to an array of frequencies modulo one octave. The comparison array is built from a temperament and a 'A4' reference, default to 440Hz and equal temperament.


The temperaments are stored in .csv files. At beginning, the programm scans every .csv file in the data/ dir and makes temperament list.

Every line in a file is a temperament: the first column is the temperament name, and columns 2 to 13 are the notes frequencies from C-4 to B-4

Note player

A frequency player module makes the signal at given frequency. There are 3 waveforms in the code:

  1. Sinus
  2. Triangle (ie pair harmonics)
  3. Sinus + harmonics (1/n x f(n))

Since the speaker of Jolla phone have very low intensity for low frequencies, the third solution is used, and the intensity is higher for lower notes.



*Licence: GPLv3*
*Author: Louis-Joseph Fournier*
*First release date: 2016-01-19




Application versions: 
File harbour-sailtuner-0.1-1.armv7hl.rpm117.69 KB12/06/2021 - 23:56
File harbour-sailtuner-0.1-1.aarch64.rpm120.82 KB12/06/2021 - 23:56
File harbour-sailtuner-0.1-1.i486.rpm125.39 KB12/06/2021 - 23:56


miroj56's picture

Really like the app (used it on J1). On my Xperia 10 II, only generating the tone works (with reversed play-pause icons). It looks it does not pick the tone from the microphone.

Maximilian1st's picture

Thank you. Didn't know about the Jolla store one.

Maximilian1st's picture

Hi, thanks for this app. Will it be published for non aarch64 devices?

xmasjos's picture

Uploaded both the armv7hl & i486 versions.
The armv7hl version is tested briefly on my Xperia X.

xmasjos's picture

It is published in the Jolla store for non-aarch64 devices by the owner. I'll see if I can build & test for others.