SlideShare a Scribd company logo
Extracting Tones of
        Gamelan Musical Instrument “Saron of Balungan”
           with Short Time Fourier Transform Method

                             Arief Mubarok, Eric Jansen, Hendra Tri Sadewa
             arief.mubarok10@mhs.ee.its.ac.id, eric10@mhs.ee.its.ac.id, hendra.tri.sadewa10@mhs.ee.its.ac.id
                                                 Adviser:
                                  Dr. Ir. Yoyon Kusnendar Suprapto, M.Sc
                                                  yoyonsuprapto@ee.its.ac.id

                                                         July 7, 2011

                                                             Abstract
         Gamelan is a musical ensemble from Indonesia. In General, gamelan is made from bronze and brass. Today,
     gamelan music is fairly seen in normal occasions. Gamelan orchestra is only held in special events. e.g.
     puppet show or wayang kulit. Due to highly expensive the instrument costs and the influences of modern
     music, role of gamelan as one of Indonesian characteristic music is getting less enthusiasts. In contrast to main
     role of gamelan in Indonesia, the amount of foreigners in dedicating to gamelan is increasing extensively and
     indicating great enthusiasm.
         This research refers to determine tones of balungan(1) musical instrument, particularly in saron using Short
     Time Fourier Transform or STFT, in purpose to analyze signals in frequency and time domains.

1 Preface                                                            lan, e.g. slicing frequency constraints. Gamelan has
                                                                     several instruments, that in each instrument has its
The saron typically consists of seven bronze bars on                 own typical tone. This research refers to specific
top of a resonating frame (rancak) and plays melody                  gamelan: saron of balungan(1) . saron of balungan(1) has
along with slenthem(2) . It is usually about 20 cm (8in)             five tones: ji, ro, lu, ma and nem. In each tone has
high, and is played on the floor by a seated performer.               its own frequency. The range of notes is defined in
In slendro(3) scale, the bars are 6-1-2-3-5-6-1; This can            following table 1.
vary from gamelan to gamelan, or even among instru-
ments in the same gamelan. Slendro(3) instruments                          Tones Range of Frequencies
commonly have only six keys. It provides the core                             Ji               504 - 539 Hz
melody (balungan(1) ) in the gamelan orchestra. Sarons                        Ro               574 - 610 Hz
typically come in a number often sizes, from smallest                         Lu               688 - 703 Hz
to largest: saron panerus (also: peking), saron barung                       Ma                792 - 799 Hz
(sometimes just saron) and saron demung (often just                         Nem                909 - 926 Hz
called demung). Each one of those is pitched an oc-
tave below the previous. The slenthem(2) or slentho
                                                              Table 1. Range of Frequencies in Gamelan Slendro(3)
performs a similar function to the sarons one octave
below the demung.
   Defining tones according to frequency, Short Time Any interventions from other balungan instruments,
Fourier Transform (STFT) renders output in form of e.g. demung and bonang are disaggregated, as result-
filtered sound based on window. STFT is developed ing saron tones.
from Fast Fourier Transform (FFT). The algorithm of
                                                          (1) The balungan (Javanese: skeleton, frame) is sometimes called the “core
STFT captures input signals in t time, then the results melody” of a Javanese gamelan composition. This corresponds to the view
are generated in time and frequency domains.              that gamelan music is heterophonic: the balungan is then the melody which
                                                          is being elaborated.
   Basicly, STFT has the same definition to Fourier (2) Slenthem frequently plays the same basic melody as that of the saron.
Transform. The difference between the both is in win- Occasionally, it does have its own important part to play. It is low in pitch,
                                                          and its sound sustains for a relatively long period of time because of the
dow function. With window function, STFT renders or tubular resonators below each bar.
slices signals from time domain to frequency domain. (3) Slendroof the two salendro by the Sundanese is aused in Indonesian
                                                          scale, one
                                                                      or called
                                                                                most common scales (laras)
                                                                                                             pentatonic

   window function aims at recognizing notes in game- gamelan music, the other being p´log.  e



                                                                 1
2 Theoritical Methods                                         2.2 Discrete Fourier Transform
                                                              In general, Discrete Fourier Transform or DFT is similar
Analyzing notes in form of signals, is described in
                                                              to native fourier transform. In distinct manner, DFT
following figure 1.
                                                              needs input function as discrete signal. Theoritically,
                                                              DFT is defined as following:

               Input notations signal                                               n−1
                                                                             Xk =         x[n]ωkn , k = 0,1,2,...,N-1
                                                                                               n                                (5)
                                                                                    n=0
                                                                                    N−1
                                                                         X(ωk )           x(tn )e− jωk tn , k = 0,1,2,...,N-1   (6)
             Signals rendered into time
                                                                                    n=0
             and/or frequency domains
                                                              where ’ ’ means “is defined as” or “equals by defini-
                                                              tion”, and
                                                              N−1
                   Define frequency
                    fundamental                                     f (n)    f (0) + f (1) + ... + f (N − 1)
                                                              n=0
                                                                    x(tn )   input signal amplitude (real and complex)
                                                                             at time tn
                Analyze frequency of
                                                                       tn    nT = nth sampling instant (sec), n an
                 tones that rendered
                                                                             integer ≥ 0
                                                                        T    sampling interval (sec)
                                                                X(ωk )       spectrum of x, at frequency ωk
                 Determine occuring
                notes in time domain                                  ωk     kΩ = kth frequency sample (radians per
                                                                             second)
          figure 1. Signal Processing System                                  2π
                                                                       Ω         = radian-frequency sampling interval
                                                                             NT
                                                                             (rad/sec)
2.1   Fast Fourier Transform
                                                                        fs   1/T = sampling rate (Hz)
The term Fast Fourier Transform or FFT refers to an effi-                N = number of time samples (integer).
cient implementation of the Discrete Fourier Transform
(DFT). FFT is commonly used in analyzing signal,
e.g. filtering, analyzing correlation and spectrum.            2.3 Short Time Fourier Transform
Fast Fourier Transform is developed from DFT or Dis-          Short Time Fourier Transform or STFT or short-term
crete Fourier Transform. Mainly used in transforming          Fourier Transform is a powerful general-purpose tool
signal from time domain to frequency domain. The              for audio signal processing. It defines a partic-
method is intended to process signals in spectral sub-        ularly useful class of time-frequency distributions
straction. Fast Fourier Transform or FFT is defined as         which specify complex amplitude versus time and
following:                                                    frequency for any signal. Tuning the STFT parame-
                                                              ters for the following applications:
                      H=           h(t)e− jωt dt    (1)        1. Approximating the time-frequency analysis per-
                                   f                              formed by the ear for purposes of spectral display.
             whereas ω = 2π           = 2π f T      (2)
                                   fs                          2. Measuring model parameters in a short-time spec-
                                                                  trum.
As transformed into discrete is defined as following:
                                                              The definition of the continuous-time STFT is:
                          N−1                                                                       ∞
              H(kω0 ) =         h(nT)e− jkω0 nT     (3)             STFTx(t) = X(τ, ω) =                x(t)w(t − τ)e− jωt dt   (7)
                          n=0                                                                      −∞

                                                              where
As simplified with T = 1, time sample N is equal to k
frequency, therefore resulting as following:                     w(t) = window function
                                                                    x(t) = the signal to be transformed
          H(k) =      h(n)e, k = 0,1,2,...,N-1      (4)
                                                              X(τ, ω) = essentially the Fourier Transform of x(t)w(t − τ)


                                                          2
τ = freqency axis                                              According to Theory of Shannon, the minimum value
  ω = variable to suppress any jump discontinuity                of sampling frequency is more or less half times of the
                                                                 signal frequency. Thus, the sampling yields original
                                                                 shapes of signal. The greater is better, as it visualizes
The usual mathematical definition of the discrete-                authentic signal.
time STFT is:                                                       The following figure 3 shows the sampling process
                         ∞
                                                                 in the analog and digital signals.
             Xm (ω) =          x(n)w(n − mR)e− jωn     (8)
                        n=−∞
                     = DTFTω (x.ShiftmR (w)),          (9)

where

  x(n) = input signal at time n
  w(n) = length M window function (e.g. Hamming)
Xm (ω) = DTFT of windowed data centered about
            time mR
                                                                               Figure 3. Sampling process
        R = hop size, in samples, between successive
            DTFTs.                                               2.3.2   Frame Blocking
whereas: τ is time parameter, ω is frequency parame-             Frame-blocking is a method to divide sound signal
ter, x(t) is analyzed signal, W(t-τ) is window function          into several frames. In one frame consists of several
and e− jωt dt is inherited function from Discrete Fourier        samples. Capturing samples depends on quantity of
Transform.                                                       sounds in every second and the magnitude of sam-
   Analyzing signal is described in following dia-               pling frequency. Described as following figure 4.
gram.


         Input signals                  Sampling




                                     Frame blocking


                                                                            Figure 4. Signal in Frame-blocking

                                                                 2.3.3   Windowing

                                       Windowing                 Sliced signals in every frame are prone to data errors
             FFT
                                                                 when calculated through Fourier transforming. Thus,
                                                                 windowing is necessary to reduce discontinuity effects
                                                                 in sliced signals. In simple calculation of continuous
                                                                 signal, transformation is taken place with multiplying
            Notes                                                every short-time signal with window function in period
                                                                 of time.
               figure 2. Signal Block Diagram                        In this phase, frequency scaling is measured only
                                                                 in length of window. As the output from the previous
2.3.1     Sampling Process                                       phases that produced by STFT function in frequency
                                                                 and time integrated with windowing, generating visual
The sound signal is analogous or continuous and cat-             content of tones.
egorized as infinite time interval. As an object of ob-
servation, sound is partitioned into slices in time con-
straints. Therefore, so-called as finite time interval.    3 Analysis and Testing
   Based on theory of Nyquist, sampling frequency is
required at least twice times signal frequency:           Performance testing and durability are examined
                                                          with 3 sound files: SaronTok.wav, consisting of notes
                  Fsampling ≥ 2 × Fsignal            (10) of saron; SaronDemung.wav, consisting of notes of


                                                             3
saron and demung; SarongBonang.wav, consisting of
notes of saron and bonang. Three kinds of different
length of window are inspected: 2048, 4096 and 8192.
  Extracting tones of saron in SaronTok.wav with
length of window 2048 is shown in figure 5.




                                                                 Figure 8. Intersections between saron with bonang

                                                            The experiment is not fully capable to analyze sig-
                                                            nals with composition of notes and in similar fre-
                                                            quency. The percentages of testing results in Saron-
                                                            Tok.wav, SaronDemung.wav, and SaronBonang.wav
                                                            are described in the following table 2.
   Figure 5. Extracting tones of saron with length of
                     window 2048
Extracting tones of saron in SaronTok.wav with length        Window       Saron    Saron+Demung      Saron+Bonang
of window 4096 is shown in figure 6.                           2048        100%         93.75%             42%
                                                              4096        100%         93.75%             50%
                                                              8192        100%          100%              57%



                                                            Table 2. Results of testing tones of saron tones in several
                                                                                     windows


                                                            4      Conclusion
                                                            From testing and systems analysis have been done
                                                            on the determination of the gamelan notation can be
                                                            summarized as followings:
   Figure 6. Extracting tones of saron with length of
                     window 4096                                1. In determination of the width of the window af-
Extracting tones of saron in SaronTok.wav with length              fects the accuracy of the analysis, the larger the
of window 8192 is shown in figure 7.                                window width, different frequencies in scaling
                                                                   the smaller, more meticulous and graphic signals
                                                                   the ramps. While in the area when the oppo-
                                                                   site occurs, the greater width of the window, the
                                                                   graph in the region increasingly narrower time,
                                                                   the timing of notes tends to overlap. At ampli-
                                                                   tude axis, the greater width of window, more
                                                                   meticulous the value.

                                                                2. In determination of blended notes of saron and
                                                                   demung, yet the extraction does work well due
                                                                   to dissimilarities of both notations.

                                                                3. In determination of blended notes of saron and
                                                                   bonang, the extraction of both notes is arduous to
                                                                   highly percentages of success due to their simil-
   Figure 7. Extracting tones of saron with length of
                                                                   ities in frequencies.
                     window 8192
In testing signals in SaronBonang.wav, some inter-              4. The highest peak frequency of saron tones is
ventions of intersection between saron and bonang in-              highly influential in the accuracy of analysis in
struments, as shown in figure 8.                                    order to determine the notations.


                                                        4
5. Theoritically, this research is useful as manual to          6    Students Profile
    determine other notes in other gamelan instru-
    ments.                                                       Eric Jansen is student of
                                                                 Computer Engineering and
                                                                 Telematics, Department of
5 References                                                     Electrical       Engineering,
                                                                 Faculty of Industrial Tech-
 1. Traditional Music Sound Extraction Based                     nology, Institut Teknologi
    on Spectral Density Model Using Adaptive                     Sepuluh Nopember as a
    Cross Correlation for Automatic Transcrip-                   continuance of Three-Year
    tion.Surabaya : ITS., Suprapto, Yoyon., Hariadi,             Diploma. Graduated in 2002
    Mochammad., Purnomo, Mauridhi Hery. (2010).,                 as Ahli Madya/Intermediate
                                                                 Expert or A.Md from Insti-
 2. Short Time Fourier Transform,
                                                                 tut Teknologi Sepuluh Nopember. Experienced in
    Smith, Julius Orion. (2007),
                                                                 C/C++ programming in more than a decade and
    http://ccrna.stanford.edu/ jos/parsh/Short Time
                                                                 specializing in parallel and distributed computation
    Fourier Transform STFT.html
                                                                 with message passing interface and grid computing.
 3. STFT in Matlab,                                              Contributed and participated in artificial intelligence
    https://ccrma.stanford.edu/ jos/sasp/STFT Matlab.            projects: facial recognition and biomedical. Devel-
    html/                                                        oping for years in open sources projects. Working
                                                                 professional in UNIX variants operation systems,
 4. Pembuatan       Program  Aplikasi Untuk                      such as FreeBSD, Solaris and Linux. Worked as
    Menampilkan Ciri Sinyal Wicara Dengan                        application developer, website developer and net-
    Matlab. Surabaya : PENS,                                     work engineer in more than 5 years in Indonesia
    Maulidia, Nia. (2009)                                        and European countries: The Netherlands and Spain.
 5. Mathematical Definition of the STFT,
    http://ccrma.stanford.edu/ jos/sasp/Mathematical De
    finition STFT.html
 6. evaluating STFT of a stationary signal,
    http://www.mathworks.com/matlabcentral/fileex
    change/22033-evaluating-short-time-fourier-
    transform-of-a-stationary-signal
 7. Fast Fourier Transform,
    https://ccrma.stanford.edu/ jos/dft/Fast Fourier Trans
    form FFT.html#22320

 8. Discrete Fourier Transform,
    https://ccrma.stanford.edu/ jos/mdft/Discrete Time Fou
    rier Transform.html
 9. Fourier Series,
    https://ccrma.stanford.edu/ jos/dft/Fourier Series FS Re
    lation.html#23346
10. Summary of STFT Computation Using the FFT,
    https://ccrma.stanford.edu/ jos/sasp/Summary STFT
    Computation Using.html

11. Discrete Fourier Transform Tutorial,
    http://www.fourier-series.com/fourierseries2/DFT tuto
    rial.html
12. Mathematics of the discrete Fourier transform
    (DFT) with Audio Applications second edition,
    https://ccrma.stanford.edu/ jos/dft/




                                                             5

More Related Content

What's hot

Final presentation
Final presentationFinal presentation
Final presentation
Meghasyam Tummalacherla
 
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingDsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Amr E. Mohamed
 
The method of comparing two audio files
The method of comparing two audio filesThe method of comparing two audio files
The method of comparing two audio files
Minh Anh Nguyen
 
An Intuitive Approach to Fourier Optics
An Intuitive Approach to Fourier OpticsAn Intuitive Approach to Fourier Optics
An Intuitive Approach to Fourier Optics
jose0055
 
Design and Implementation of Low Ripple Low Power Digital Phase-Locked Loop
Design and Implementation of Low Ripple Low Power Digital Phase-Locked LoopDesign and Implementation of Low Ripple Low Power Digital Phase-Locked Loop
Design and Implementation of Low Ripple Low Power Digital Phase-Locked Loop
CSCJournals
 
Tele3113 wk7tue
Tele3113 wk7tueTele3113 wk7tue
Tele3113 wk7tue
Vin Voro
 
Fft analysis
Fft analysisFft analysis
Fft analysis
Satrious
 
Matched filter
Matched filterMatched filter
Matched filter
srkrishna341
 
Ch1 representation of signal pg 130
Ch1 representation of signal pg 130Ch1 representation of signal pg 130
Ch1 representation of signal pg 130
Prateek Omer
 
Transcription
TranscriptionTranscription
Transcription
Juan Carlos Munévar
 
Nyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channelNyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channel
PriyangaKR1
 
Detection of genetic motifs
Detection of genetic motifsDetection of genetic motifs
Detection of genetic motifs
Juan Carlos Munévar
 
Audio Signal Processing
Audio Signal Processing Audio Signal Processing
Audio Signal Processing
Ahmed A. Arefin
 
Ft and FFT
Ft and FFTFt and FFT
M n m presentation
M n m presentationM n m presentation
M n m presentation
Sanjiv Kumar
 
Ch6 digital transmission of analog signal pg 99
Ch6 digital transmission of analog signal pg 99Ch6 digital transmission of analog signal pg 99
Ch6 digital transmission of analog signal pg 99
Prateek Omer
 
Correlative level coding
Correlative level codingCorrelative level coding
Correlative level coding
srkrishna341
 
W4 physics 2003
W4 physics 2003W4 physics 2003
W4 physics 2003
Narendra Singh Patel
 

What's hot (18)

Final presentation
Final presentationFinal presentation
Final presentation
 
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingDsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
 
The method of comparing two audio files
The method of comparing two audio filesThe method of comparing two audio files
The method of comparing two audio files
 
An Intuitive Approach to Fourier Optics
An Intuitive Approach to Fourier OpticsAn Intuitive Approach to Fourier Optics
An Intuitive Approach to Fourier Optics
 
Design and Implementation of Low Ripple Low Power Digital Phase-Locked Loop
Design and Implementation of Low Ripple Low Power Digital Phase-Locked LoopDesign and Implementation of Low Ripple Low Power Digital Phase-Locked Loop
Design and Implementation of Low Ripple Low Power Digital Phase-Locked Loop
 
Tele3113 wk7tue
Tele3113 wk7tueTele3113 wk7tue
Tele3113 wk7tue
 
Fft analysis
Fft analysisFft analysis
Fft analysis
 
Matched filter
Matched filterMatched filter
Matched filter
 
Ch1 representation of signal pg 130
Ch1 representation of signal pg 130Ch1 representation of signal pg 130
Ch1 representation of signal pg 130
 
Transcription
TranscriptionTranscription
Transcription
 
Nyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channelNyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channel
 
Detection of genetic motifs
Detection of genetic motifsDetection of genetic motifs
Detection of genetic motifs
 
Audio Signal Processing
Audio Signal Processing Audio Signal Processing
Audio Signal Processing
 
Ft and FFT
Ft and FFTFt and FFT
Ft and FFT
 
M n m presentation
M n m presentationM n m presentation
M n m presentation
 
Ch6 digital transmission of analog signal pg 99
Ch6 digital transmission of analog signal pg 99Ch6 digital transmission of analog signal pg 99
Ch6 digital transmission of analog signal pg 99
 
Correlative level coding
Correlative level codingCorrelative level coding
Correlative level coding
 
W4 physics 2003
W4 physics 2003W4 physics 2003
W4 physics 2003
 

Similar to Extracting Tones of Gamelan with STFT

Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representation
Nikolay Karpov
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
AbrahamGadissa
 
Dsp U Lec04 Discrete Time Signals & Systems
Dsp U   Lec04 Discrete Time Signals & SystemsDsp U   Lec04 Discrete Time Signals & Systems
Dsp U Lec04 Discrete Time Signals & Systems
taha25
 
Dsp U Lec08 Fir Filter Design
Dsp U   Lec08 Fir Filter DesignDsp U   Lec08 Fir Filter Design
Dsp U Lec08 Fir Filter Design
taha25
 
Chapter 2 signals and spectra,
Chapter 2   signals and spectra,Chapter 2   signals and spectra,
Chapter 2 signals and spectra,
nahrain university
 
8 lti psd
8 lti psd8 lti psd
8 lti psd
bantisworld
 
Dft
DftDft
Lecture 1
Lecture 1 Lecture 1
Lecture 1
Neha Patil
 
Tele3113 wk5wed
Tele3113 wk5wedTele3113 wk5wed
Tele3113 wk5wed
Vin Voro
 
Classifications of signals vi sem cse it6502
Classifications of signals vi sem cse it6502Classifications of signals vi sem cse it6502
Classifications of signals vi sem cse it6502
rohinisubburaj
 
Pulse Code Modulation
Pulse Code Modulation Pulse Code Modulation
Pulse Code Modulation
ZunAib Ali
 
unit4 sampling.pptx
unit4 sampling.pptxunit4 sampling.pptx
unit4 sampling.pptx
Dr.SHANTHI K.G
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
Amr E. Mohamed
 
Wireless Localization: Ranging (second part)
Wireless Localization: Ranging (second part)Wireless Localization: Ranging (second part)
Wireless Localization: Ranging (second part)
Stefano Severi
 
z transforms
z transformsz transforms
z transforms
Shahbaz Goshtasebi
 
Match.dft
Match.dftMatch.dft
Match.dft
momomocan
 

Similar to Extracting Tones of Gamelan with STFT (16)

Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representation
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
 
Dsp U Lec04 Discrete Time Signals & Systems
Dsp U   Lec04 Discrete Time Signals & SystemsDsp U   Lec04 Discrete Time Signals & Systems
Dsp U Lec04 Discrete Time Signals & Systems
 
Dsp U Lec08 Fir Filter Design
Dsp U   Lec08 Fir Filter DesignDsp U   Lec08 Fir Filter Design
Dsp U Lec08 Fir Filter Design
 
Chapter 2 signals and spectra,
Chapter 2   signals and spectra,Chapter 2   signals and spectra,
Chapter 2 signals and spectra,
 
8 lti psd
8 lti psd8 lti psd
8 lti psd
 
Dft
DftDft
Dft
 
Lecture 1
Lecture 1 Lecture 1
Lecture 1
 
Tele3113 wk5wed
Tele3113 wk5wedTele3113 wk5wed
Tele3113 wk5wed
 
Classifications of signals vi sem cse it6502
Classifications of signals vi sem cse it6502Classifications of signals vi sem cse it6502
Classifications of signals vi sem cse it6502
 
Pulse Code Modulation
Pulse Code Modulation Pulse Code Modulation
Pulse Code Modulation
 
unit4 sampling.pptx
unit4 sampling.pptxunit4 sampling.pptx
unit4 sampling.pptx
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
 
Wireless Localization: Ranging (second part)
Wireless Localization: Ranging (second part)Wireless Localization: Ranging (second part)
Wireless Localization: Ranging (second part)
 
z transforms
z transformsz transforms
z transforms
 
Match.dft
Match.dftMatch.dft
Match.dft
 

Recently uploaded

Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 

Recently uploaded (20)

Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 

Extracting Tones of Gamelan with STFT

  • 1. Extracting Tones of Gamelan Musical Instrument “Saron of Balungan” with Short Time Fourier Transform Method Arief Mubarok, Eric Jansen, Hendra Tri Sadewa arief.mubarok10@mhs.ee.its.ac.id, eric10@mhs.ee.its.ac.id, hendra.tri.sadewa10@mhs.ee.its.ac.id Adviser: Dr. Ir. Yoyon Kusnendar Suprapto, M.Sc yoyonsuprapto@ee.its.ac.id July 7, 2011 Abstract Gamelan is a musical ensemble from Indonesia. In General, gamelan is made from bronze and brass. Today, gamelan music is fairly seen in normal occasions. Gamelan orchestra is only held in special events. e.g. puppet show or wayang kulit. Due to highly expensive the instrument costs and the influences of modern music, role of gamelan as one of Indonesian characteristic music is getting less enthusiasts. In contrast to main role of gamelan in Indonesia, the amount of foreigners in dedicating to gamelan is increasing extensively and indicating great enthusiasm. This research refers to determine tones of balungan(1) musical instrument, particularly in saron using Short Time Fourier Transform or STFT, in purpose to analyze signals in frequency and time domains. 1 Preface lan, e.g. slicing frequency constraints. Gamelan has several instruments, that in each instrument has its The saron typically consists of seven bronze bars on own typical tone. This research refers to specific top of a resonating frame (rancak) and plays melody gamelan: saron of balungan(1) . saron of balungan(1) has along with slenthem(2) . It is usually about 20 cm (8in) five tones: ji, ro, lu, ma and nem. In each tone has high, and is played on the floor by a seated performer. its own frequency. The range of notes is defined in In slendro(3) scale, the bars are 6-1-2-3-5-6-1; This can following table 1. vary from gamelan to gamelan, or even among instru- ments in the same gamelan. Slendro(3) instruments Tones Range of Frequencies commonly have only six keys. It provides the core Ji 504 - 539 Hz melody (balungan(1) ) in the gamelan orchestra. Sarons Ro 574 - 610 Hz typically come in a number often sizes, from smallest Lu 688 - 703 Hz to largest: saron panerus (also: peking), saron barung Ma 792 - 799 Hz (sometimes just saron) and saron demung (often just Nem 909 - 926 Hz called demung). Each one of those is pitched an oc- tave below the previous. The slenthem(2) or slentho Table 1. Range of Frequencies in Gamelan Slendro(3) performs a similar function to the sarons one octave below the demung. Defining tones according to frequency, Short Time Any interventions from other balungan instruments, Fourier Transform (STFT) renders output in form of e.g. demung and bonang are disaggregated, as result- filtered sound based on window. STFT is developed ing saron tones. from Fast Fourier Transform (FFT). The algorithm of (1) The balungan (Javanese: skeleton, frame) is sometimes called the “core STFT captures input signals in t time, then the results melody” of a Javanese gamelan composition. This corresponds to the view are generated in time and frequency domains. that gamelan music is heterophonic: the balungan is then the melody which is being elaborated. Basicly, STFT has the same definition to Fourier (2) Slenthem frequently plays the same basic melody as that of the saron. Transform. The difference between the both is in win- Occasionally, it does have its own important part to play. It is low in pitch, and its sound sustains for a relatively long period of time because of the dow function. With window function, STFT renders or tubular resonators below each bar. slices signals from time domain to frequency domain. (3) Slendroof the two salendro by the Sundanese is aused in Indonesian scale, one or called most common scales (laras) pentatonic window function aims at recognizing notes in game- gamelan music, the other being p´log. e 1
  • 2. 2 Theoritical Methods 2.2 Discrete Fourier Transform In general, Discrete Fourier Transform or DFT is similar Analyzing notes in form of signals, is described in to native fourier transform. In distinct manner, DFT following figure 1. needs input function as discrete signal. Theoritically, DFT is defined as following: Input notations signal n−1 Xk = x[n]ωkn , k = 0,1,2,...,N-1 n (5) n=0 N−1 X(ωk ) x(tn )e− jωk tn , k = 0,1,2,...,N-1 (6) Signals rendered into time n=0 and/or frequency domains where ’ ’ means “is defined as” or “equals by defini- tion”, and N−1 Define frequency fundamental f (n) f (0) + f (1) + ... + f (N − 1) n=0 x(tn ) input signal amplitude (real and complex) at time tn Analyze frequency of tn nT = nth sampling instant (sec), n an tones that rendered integer ≥ 0 T sampling interval (sec) X(ωk ) spectrum of x, at frequency ωk Determine occuring notes in time domain ωk kΩ = kth frequency sample (radians per second) figure 1. Signal Processing System 2π Ω = radian-frequency sampling interval NT (rad/sec) 2.1 Fast Fourier Transform fs 1/T = sampling rate (Hz) The term Fast Fourier Transform or FFT refers to an effi- N = number of time samples (integer). cient implementation of the Discrete Fourier Transform (DFT). FFT is commonly used in analyzing signal, e.g. filtering, analyzing correlation and spectrum. 2.3 Short Time Fourier Transform Fast Fourier Transform is developed from DFT or Dis- Short Time Fourier Transform or STFT or short-term crete Fourier Transform. Mainly used in transforming Fourier Transform is a powerful general-purpose tool signal from time domain to frequency domain. The for audio signal processing. It defines a partic- method is intended to process signals in spectral sub- ularly useful class of time-frequency distributions straction. Fast Fourier Transform or FFT is defined as which specify complex amplitude versus time and following: frequency for any signal. Tuning the STFT parame- ters for the following applications: H= h(t)e− jωt dt (1) 1. Approximating the time-frequency analysis per- f formed by the ear for purposes of spectral display. whereas ω = 2π = 2π f T (2) fs 2. Measuring model parameters in a short-time spec- trum. As transformed into discrete is defined as following: The definition of the continuous-time STFT is: N−1 ∞ H(kω0 ) = h(nT)e− jkω0 nT (3) STFTx(t) = X(τ, ω) = x(t)w(t − τ)e− jωt dt (7) n=0 −∞ where As simplified with T = 1, time sample N is equal to k frequency, therefore resulting as following: w(t) = window function x(t) = the signal to be transformed H(k) = h(n)e, k = 0,1,2,...,N-1 (4) X(τ, ω) = essentially the Fourier Transform of x(t)w(t − τ) 2
  • 3. τ = freqency axis According to Theory of Shannon, the minimum value ω = variable to suppress any jump discontinuity of sampling frequency is more or less half times of the signal frequency. Thus, the sampling yields original shapes of signal. The greater is better, as it visualizes The usual mathematical definition of the discrete- authentic signal. time STFT is: The following figure 3 shows the sampling process ∞ in the analog and digital signals. Xm (ω) = x(n)w(n − mR)e− jωn (8) n=−∞ = DTFTω (x.ShiftmR (w)), (9) where x(n) = input signal at time n w(n) = length M window function (e.g. Hamming) Xm (ω) = DTFT of windowed data centered about time mR Figure 3. Sampling process R = hop size, in samples, between successive DTFTs. 2.3.2 Frame Blocking whereas: τ is time parameter, ω is frequency parame- Frame-blocking is a method to divide sound signal ter, x(t) is analyzed signal, W(t-τ) is window function into several frames. In one frame consists of several and e− jωt dt is inherited function from Discrete Fourier samples. Capturing samples depends on quantity of Transform. sounds in every second and the magnitude of sam- Analyzing signal is described in following dia- pling frequency. Described as following figure 4. gram. Input signals Sampling Frame blocking Figure 4. Signal in Frame-blocking 2.3.3 Windowing Windowing Sliced signals in every frame are prone to data errors FFT when calculated through Fourier transforming. Thus, windowing is necessary to reduce discontinuity effects in sliced signals. In simple calculation of continuous signal, transformation is taken place with multiplying Notes every short-time signal with window function in period of time. figure 2. Signal Block Diagram In this phase, frequency scaling is measured only in length of window. As the output from the previous 2.3.1 Sampling Process phases that produced by STFT function in frequency and time integrated with windowing, generating visual The sound signal is analogous or continuous and cat- content of tones. egorized as infinite time interval. As an object of ob- servation, sound is partitioned into slices in time con- straints. Therefore, so-called as finite time interval. 3 Analysis and Testing Based on theory of Nyquist, sampling frequency is required at least twice times signal frequency: Performance testing and durability are examined with 3 sound files: SaronTok.wav, consisting of notes Fsampling ≥ 2 × Fsignal (10) of saron; SaronDemung.wav, consisting of notes of 3
  • 4. saron and demung; SarongBonang.wav, consisting of notes of saron and bonang. Three kinds of different length of window are inspected: 2048, 4096 and 8192. Extracting tones of saron in SaronTok.wav with length of window 2048 is shown in figure 5. Figure 8. Intersections between saron with bonang The experiment is not fully capable to analyze sig- nals with composition of notes and in similar fre- quency. The percentages of testing results in Saron- Tok.wav, SaronDemung.wav, and SaronBonang.wav are described in the following table 2. Figure 5. Extracting tones of saron with length of window 2048 Extracting tones of saron in SaronTok.wav with length Window Saron Saron+Demung Saron+Bonang of window 4096 is shown in figure 6. 2048 100% 93.75% 42% 4096 100% 93.75% 50% 8192 100% 100% 57% Table 2. Results of testing tones of saron tones in several windows 4 Conclusion From testing and systems analysis have been done on the determination of the gamelan notation can be summarized as followings: Figure 6. Extracting tones of saron with length of window 4096 1. In determination of the width of the window af- Extracting tones of saron in SaronTok.wav with length fects the accuracy of the analysis, the larger the of window 8192 is shown in figure 7. window width, different frequencies in scaling the smaller, more meticulous and graphic signals the ramps. While in the area when the oppo- site occurs, the greater width of the window, the graph in the region increasingly narrower time, the timing of notes tends to overlap. At ampli- tude axis, the greater width of window, more meticulous the value. 2. In determination of blended notes of saron and demung, yet the extraction does work well due to dissimilarities of both notations. 3. In determination of blended notes of saron and bonang, the extraction of both notes is arduous to highly percentages of success due to their simil- Figure 7. Extracting tones of saron with length of ities in frequencies. window 8192 In testing signals in SaronBonang.wav, some inter- 4. The highest peak frequency of saron tones is ventions of intersection between saron and bonang in- highly influential in the accuracy of analysis in struments, as shown in figure 8. order to determine the notations. 4
  • 5. 5. Theoritically, this research is useful as manual to 6 Students Profile determine other notes in other gamelan instru- ments. Eric Jansen is student of Computer Engineering and Telematics, Department of 5 References Electrical Engineering, Faculty of Industrial Tech- 1. Traditional Music Sound Extraction Based nology, Institut Teknologi on Spectral Density Model Using Adaptive Sepuluh Nopember as a Cross Correlation for Automatic Transcrip- continuance of Three-Year tion.Surabaya : ITS., Suprapto, Yoyon., Hariadi, Diploma. Graduated in 2002 Mochammad., Purnomo, Mauridhi Hery. (2010)., as Ahli Madya/Intermediate Expert or A.Md from Insti- 2. Short Time Fourier Transform, tut Teknologi Sepuluh Nopember. Experienced in Smith, Julius Orion. (2007), C/C++ programming in more than a decade and http://ccrna.stanford.edu/ jos/parsh/Short Time specializing in parallel and distributed computation Fourier Transform STFT.html with message passing interface and grid computing. 3. STFT in Matlab, Contributed and participated in artificial intelligence https://ccrma.stanford.edu/ jos/sasp/STFT Matlab. projects: facial recognition and biomedical. Devel- html/ oping for years in open sources projects. Working professional in UNIX variants operation systems, 4. Pembuatan Program Aplikasi Untuk such as FreeBSD, Solaris and Linux. Worked as Menampilkan Ciri Sinyal Wicara Dengan application developer, website developer and net- Matlab. Surabaya : PENS, work engineer in more than 5 years in Indonesia Maulidia, Nia. (2009) and European countries: The Netherlands and Spain. 5. Mathematical Definition of the STFT, http://ccrma.stanford.edu/ jos/sasp/Mathematical De finition STFT.html 6. evaluating STFT of a stationary signal, http://www.mathworks.com/matlabcentral/fileex change/22033-evaluating-short-time-fourier- transform-of-a-stationary-signal 7. Fast Fourier Transform, https://ccrma.stanford.edu/ jos/dft/Fast Fourier Trans form FFT.html#22320 8. Discrete Fourier Transform, https://ccrma.stanford.edu/ jos/mdft/Discrete Time Fou rier Transform.html 9. Fourier Series, https://ccrma.stanford.edu/ jos/dft/Fourier Series FS Re lation.html#23346 10. Summary of STFT Computation Using the FFT, https://ccrma.stanford.edu/ jos/sasp/Summary STFT Computation Using.html 11. Discrete Fourier Transform Tutorial, http://www.fourier-series.com/fourierseries2/DFT tuto rial.html 12. Mathematics of the discrete Fourier transform (DFT) with Audio Applications second edition, https://ccrma.stanford.edu/ jos/dft/ 5