FFT Research
FFT Research
Abstract
The song is a means of entertainment most often heard by humans where in the song consists of
music and vocals. Good quality music and vocal singers will make a song more pleasant to hear.
To make the song sound tunable and in accordance with the rhythm can be done by adjusting the
vocals according to the tone of the song. From this we know that measuring sound frequencies
needs to be done to determine whether a frequency or period is loud, it can also be used as a tool
in vocal training, one of them for vocal tuning applications to find the harmonious sound of the
sound. Moreover, it can be used as a learning need in Sound Frequency Processing. Where one
of the parts to create a vocal tuning application can be through the Real-time spectrogram
program. This RTS uses Pyaudio as sound recording, uses the Python 3.6 programming language
and uses the Fast Fourier Transform method which will help when making real-time spectrogram
and pitch detection programs. The test results obtained 75% accuracy in real-time pitch detection
programs.
Keyword : Real-Time Pitch Detection, Real-Time Spectogram, Fast Fourier Transform , Sound
Frequency Processing
1. Introduction
The development of technology every year continues to grow, many emerging new innovations
related to technology. This can be proven in technological advances in processing various kinds of
data, one of which is sound. Sound is a phenomenon that has been recognized by humans since
birth. Where before the development of physics as now, humans only know that the sound is the
result of vibrations from an object or the result of the collision of two objects. Now that
measurements of sound have developed rapidly, many sound frequency measuring devices can
be used. Therefore, measuring sound frequency is more difficult if done manually using formulas
and several methods, because it takes a long time and there may be errors in the district. Starting
from the problems mentioned above, the author will conduct research related to the
implementation of real-time spectrograms. The spectogram itself is a visualization that is used to
show the frequency of sound at a certain time unit where this spectrogram can be applied in real
life such as tuning applications that uses a real-time spectrogram which is the development of a
spectogram usually to provide information on the results of tones produced from a musical
instrument. Real-time spectrograms can efficiently review large amounts of acoustic data, while
measuring, extracting, and storing sound parameters and sound segments directly from the
screen [5]. Real-time Spectrograms are designed to efficiently analyze all sound files. Users can
navigate sound files quickly, audition, edit, measure and save interesting sound events. The
making of real-time spectrogram this time is by using the fast fourier transform method [7]. The
Fast Fourier transform (FFT) method is an algorithm that calculates a discrete fourier
transformation (DFT) of a sequence, or the opposite (IDFT). Fourier analysis converts signals from
the original domain (often time or space) to representations in the frequency domain and vice
versa. In making the real-time spectrogram, there are related studies that are used, among others,
the making of an application for using voice using FFT to find out the sound frequency of a
number of people speaking. Where the output of the application produces visualization of FFT
frequency, sound signal waves and a series of time values in the sound data file [6].
325
Noak & Darmawan
Real Time Pitch Detection For Vocal Tuning Using FFT Algoritma And Spectrogram
2. Reseach Methods
In this research, several important things need to be done such as analyzing data needs to,
collecting data, and implementing it as a reference in making pitch detection with real-time
spectogram.
.
Figure 2 Analysis Fourier
Fast Fourier Transform is an algorithm used to represent signals in discrete time domains and
frequency domains. Obtained from the DFT definition for vector data with length N requires N
multiplication and N addition. So if used 𝑁 in large numbers will cause millions of DFT calculation
operations. To facilitate calculations, the Fast Fourier Transform (FFT) technique appears [3].
FFT is a DFT that has a smaller amount of computing than ordinary DFT computing. DFT will
326
Jurnal Elektronik Ilmu Komputer Udayana p-ISSN: 2301-5373
Volume 8, No 3. February 2020 e-ISSN: 2654-5101
produce a computational amount of 𝑁2 while FFT will produce a computational amount of (𝑁) log2
(𝑁). So that FFT becomes a practical method of DFT for large amounts.
(1)
Suppose that 𝑁 can be divided into 2 so that Equation (1) is divided into 2 the parts are for 𝑘 even
and 𝑘 odd. Next, given a new variable with
So obtained
(2)
If known that
(3)
then substituting Equation (3) in Equation (2) is obtained
(4)
After the time domain is divided by 2, the frequency domain is also divided by 2 so that it is with
divide the frequency in Equation (4) then
(5)
Because , Equation (5) becomes
(6)
where N is the amount of data,
2.2. Spectrogram
A spectrogram is a visual representation of the frequency spectrum in sound or other signals
because it is different from the mass or some other variable. Spectrograms are sometimes called
spectral waterfalls, voiceprints, or voicegrams. Spectrograms may be used to recognize phonetic
words of utterance.
327
Noak & Darmawan
Real Time Pitch Detection For Vocal Tuning Using FFT Algoritma And Spectrogram
They are widely used in the development of music, sonar, radar and speech processing,
seismology, and so on. The instrument that holds the spectrogram is called the spectrograph. The
real programmaker is playing the violin. Pay attention to the harmonics that apply to the entire
multiplication of the fundamental frequency numbers. Consider the fourteen series of arcs, and
visual differences in tone.
328
Jurnal Elektronik Ilmu Komputer Udayana p-ISSN: 2301-5373
Volume 8, No 3. February 2020 e-ISSN: 2654-5101
2.5. Flowchart
Explanation of flowchart is a program flow real-time pitch detection that has been implemented in
the Python 3.6 programming language. In the flowchart there is input in the form of voice, there is
a process of changing the signal from the discrete time domain and frequency using FFT then
changing it into the spectrogram visualization, then matching harmonious tones and finding out the
final results in the form of pitch detection tones.
2.6. Implementation
The design of the flowchart that has been made will be implemented into the Real-Time
Spectogram to make real-time pitch detection in the python programming language. He chose to
use the Python programming language because of the easy programming syntax and the use of a
complete supporting library to facilitate the loading of this Real-Time Pitch Detection.
2.6.1. Python
Python is a high-level general-purpose programming language that is interpreted with philosophy.
The Python design emphasizes code readability with the use of significant spaces. The language
construct and object-oriented approach aim to help programmers write clear and logical code for
small and large-scale projects. [2] Python is typed and collected dynamically. This supports
329
Noak & Darmawan
Real Time Pitch Detection For Vocal Tuning Using FFT Algoritma And Spectrogram
The picture above is the output of the real-time spectrogram from the data inputted using a
microphone is a whistling of sound from the lips so it displays the output as shown above.
3.2. Testing
In the testing phase using the comparison method that is comparing, this time the vocal data that
has been collected will be tested using the usual spectogram measuring instrument that is
accessed via page [1] and seen its visualization. then proceed by using real-time spectogram tools
that can already be implemented as a trial phase.
330
Jurnal Elektronik Ilmu Komputer Udayana p-ISSN: 2301-5373
Volume 8, No 3. February 2020 e-ISSN: 2654-5101
The picture above is a comparison between visualization of frequency in do vocal tones. Seen
from the picture, the exact similarities are from the results of the ordinary spectogram, but there is
bit error in the real-time spectogram results because unexpected noise is recorded, so there is a
slight change in the visualization of the real-time spec-togram output which results in an error in
the real-time results. time pitch detection.Following are the results of real-time pitch detection
testing using black box testing techniques.
In testing using a total of 24 recorded voice vocal sound data and the success rate of recorded
data as many as 18 recorded voice data format * .wav and 6 data said failed.
331
Noak & Darmawan
Real Time Pitch Detection For Vocal Tuning Using FFT Algoritma And Spectrogram
In the table above it can be seen that the results of the actualization of the real-time spectrogram
for the vocal by the fast fourier transform method have a pretty good accuracy, the average
accuracy of the four instruments is 75%. errors in the process of visualization so that the results of
the program do not know the vocal tone.
4. Conclusion
Based on the results and discussion presented in the previous chapter, the following conclusions
can be drawn:
a. A real-time pitch detection program has been created using the Fast Fourier Transform (FFT)
algorithm which can later be used to visualize the sound frequency of sounds.
b. In testing, real time pitch detection for vocal tuning with the Fast Fourier Transform
method produces an accuracy value of 75%, an error in the visualization process so that
the final results in the program do not know the vocal tone.
References
[1] spectrum analyzer — academo.org - free, interactive, education., 2019.
[2] Dave Kuhlman. A python book: Beginning python, advanced python, and python exercises.
Dave Kuhlman Lutz, 2009.
[3] Kreyszig, E.,2006., Advanced Engineering Mathematics (9th Edition)., United States: John
Wiley & Sons, Inc.
[4] La Dini, Budiani., 2009., Penentuan Periode Curah Hujan Kabupaten Manokwari
Menggunakan Transformasi Fourier dan Wavelet. Skripsi. Jurusan Fisika FMIPA Universitas
Negeri Papua Manokwari
[5] Trio Safaat. Implementasi fast fourier transform pada pengenalan nada piano berba- sis
android. Tekik Informatika, Fakultas Sains Dan Teknologi, Universitas Islam Maulana Malik
Ibrahim, Malang, 2016.
[6] Harun Sujadi, Ii Sopiandi, and Agis Mutaqin. Sistem pengolahan suara menggunakan
algoritma fft (fast fourier transform). 2017.
[7] Arif Syaifuddin and Suryono Suryono. Fast fourier transform (fft) untuk analisis sinyal suara
doppler ultrasonik. Youngster Physics Journal, 3(3):181–188, 2014.
332