ANALYSIS AND SYNTHESIS OF GUITAR SOUNDS WITH HAMMER-ON STRUMMING TECHNIQUE

This research aims to analyze and synthesize periodic signals derived from guitar string plucking with hammer-on technique. This research has three stages, namely the data collection stage, the analysis stage, and the synthesis stage. The guitar string was plucked with a tension of 2.5 N and recorded using a sound sensor connected to PASCO Capstone software. The data used has two variations, namely the sound signal of a hammer-on pluck with a half tone increase and a one tone increase. Data analysis was carried out using MATLAB software to obtain deviation graphs as a function of frequency, damping coefficient values, and frequency spectra. The results showed that after hammer-on the amplitude of the tone decreased drastically as the mass per unit length of the string decreased. The initial tone before the hammer-on will appear in the tone after the hammer-on with a lower amplitude as the mass per unit length of the string increases. The synthesis of guitar sounds with this technique is done by combining the individual tones obtained and adjusting the time interval and amplitude according to the literature data.


I. INTRODUCTION
Waves are vibrations that propagate with or without a medium.Based on their propagation, waves are divided into two types: transverse waves and longitudinal waves.Meanwhile, based on the medium, waves are divided into two types, namely mechanical waves and electromagnetic waves.Sound is a longitudinal mechanical wave that can propagate through solid, liquid and air media.Sound waves occur due to disturbances in the density of the medium caused by vibrations in an object [1].The phenomenon of sound waves occurs a lot in everyday life, one of which is the sound of musical instruments.
The guitar is a plucked musical instrument that is known for its artistic, health, and psychological benefits, as well as its ability to enhance human creativity [2][3][4][5][6].Knowledge of sound analysis and synthesis is important for understanding and manipulating the guitar's sound [7,8].The guitar produces periodic sounds from the plucking of its strings, which can be described using Fourier series [9,10].Fourier analysis can be used to decompose the guitar sound into its component frequencies [8].
Several studies have been conducted to analyze the characteristic of guitar sounds using Fast Fourier Transform (FFT) [8,[11][12][13][14].Clinton and Wani (2020) use the Fourier transform to analyze time-domain signals of guitar plucks [8].The inverse FFT was also used to find the time-varying transient response of the frequencydomain synthesis method based on the string/body coupling model in the frequency domain [11].Traube and Smith (2000) presented a frequency-domain technique for estimating the plucking point on a guitar string from an acoustically recorded signal [12].In other research, Woodhouse also synthesized guitar sounds by utilizing the frequency domain method to obtain faster results but taking into account the damping factor [13,14].
The aim of this study was analyzing the characteristics of the periodic signal of the guitar string pluck with the hammer-on technique and synthesizing the sound signal with similar characteristics.To collect the data, a sound sensor was placed near the guitar sound source and connected to a computer using an interface.This allowed the data reading and recording in real time.The guitar string is plucked using a force sensor with a force of 2.5 N. Two types of collected data are sound signal data at each guitar string freely (fret 0) with half and one tone increments.

II. METHOD
Sound analysis was conducted to characterize the recorded sound waves.For each set of data from a passage, an FFT analysis was performed using the entire signal and, on the signal, divided into two parts: before the hammer-on stroke and after the stroke.The output of this stage of analysis was the frequency spectrum, the frequency change pattern of the hammer-on technique, the amplitude change pattern, and the damping coefficient and relative amplitude (Fourier coefficient) of each string plucked with the hammer-on technique.The relative amplitude (Fourier coefficient) was obtained using FFT analysis, while the damping coefficient was calculated using Microsoft Excel and MATLAB.
The synthesis stage is carried out using the output from the data analysis stage.First step was creating the damping coefficient equation as a function of frequency using the damping coefficient value in the analysis output using the following equation.
where Kn and fn = damping coefficient and harmonic frequency at the nth string, Kn and fn = damping coefficient and harmonic frequency at the string 6 and m = gradient on a graph of damping coefficient as a function of frequency.The damping coefficients, Fourier coefficients and harmonic frequencies produced from first step was substitute into the following wave equation: =   1 y = Amplitude (m), A= Maximum Amplitude (m),   = frequency at n th harmonic (Hz),  1 = frequency at 1 st harmonic (Hz),   = Fourier coefficient n th , dan k = damping coefficient (1/s).The equation ( 3) was represented into a graph of deviation as a function of time using MATLAB.Lastly, the synthesis sound was compared with the original sound.

III. RESULTS AND DISCUSSION
Guitar sound signals are characterized by a certain harmonic frequency arrangement.The quality of the guitar sound that emerges is highly dependent on the variation of its harmonic frequencies.Each harmonic frequency will have a different value, which is a multiple of the fundamental tone frequency.Besides frequency, amplitude is another fundamental characteristic of a guitar sound signal; it is the strength of the sound wave.Hammer-on is a guitar playing technique that produces the notes on the strings without plucking them but by striking the fretboard with the fingers on the higher notes.In general, if a tone is sounded only by hitting the strings without beginning with a pluck, the resulting tone will have a lower amplitude characteristic of the pluck.In this study, the hammer-on strumming sound has signal characteristics shown by the graphs in Figures 5 and 6.These figures show a significant decrease in amplitude after the hammer-on technique is applied.This decrease is caused by the disturbance to the string caused by the fingers striking it.However, the decrease in amplitude is not as great for strings with a higher mass per unit length, because the disturbance given to the string has the same phase, resulting in an increase in amplitude after the hammer-on technique is applied.
The sound signal data obtained is a time-domain function.This data is transformed into a frequency spectrum of relative amplitude using Fast Fourier Transform in MATLAB software.Each harmonic frequency will have a different relative amplitude.The data analysis process in this case is carried out by dividing into 3 parts, namely the FFT for the entire signal, the FFT before the hammer-on, and the FFT after the hammer-on.This is done to find out the changes in audio amplitude and the sound condition of the base tone after the application of the hammer-on strumming technique.1 shows the frequency values of each string when the hammer-on strumming technique has not been performed.The harmonic frequency values obtained by each string have the same pattern, which follows the pattern of multiples of the base tone frequency.The sound of the initial tone in the hammer-on strumming one tone increment is still detected when this technique has been applied.This happens because the resonance of the initial tone with other parts is still vibrating so that the graph after hammer-on still shows the initial tone with a low relative amplitude.Figures 2 and 3 are graphs of the relative amplitude value of the initial tone of each string that still appears on the FFT analysis graph after hammer-on either a half tone or one tone increase.The figure shows that the initial tone that still appears on the tone after hammer-on will get smaller as the mass per unit length of each string increases.In the figure, it can be seen that the small strings such as strings 1, 2, and 3 have a larger relative amplitude value than strings 4, 5, and 6.This happens because the small strings have a larger relative amplitude value than the long strings.This happens because on the larger strings the decrease in amplitude after the hammer-on is not so great that it covers the initial tone before the hammer-on.

Amplitude
The damping coefficient is a measure of how quickly the sound of a string will decay after it is plucked.It is calculated from the stress data as a function of time, which is analogous to the deviation of the sound signal.In the hammer-on plucked sound signal, the obtained damping coefficient is divided into two parts: before and after the hammer-on pluck.The first damping coefficient shows the graph of the sound signal before the hammer-on pluck is applied with a steep slope in the initial time range, while the second damping coefficient shows a gentler slope.
According to Anyosakti (2020), the damping coefficient value is influenced by both internal and external factors.Internal factors are the physical state of the guitar such as the material forming the strings, and the shape of the guitar, while external factors include the state of the guitar environment, such as interference from other strings and the plucking technique used [15].The damping coefficient value obtained in this study tends to increase from the lowest string (string 6) to the string 1, as shown in Figure 4 and 5.This shows that the damping coefficient will generally increase as the frequency value increases.The research data illustrates that the damping coefficient value in the time range after the hammer-on pluck is smaller than the damping coefficient value before the hammer-on.The synthesis is the step that is carried out by utilizing the output values from the analysis stage in the form of frequency values, Fourier coefficients, and damping coefficients of each string.The output value obtained from the analysis is used in equation ( 6) and then processed using MATLAB software to get the output of the synthesis process.This synthesis stage aims to produce a deviation graph as a function of time and produce a hammer-on string sound that is similar to the original.The sound obtained from this result is a sound component that has no noise.
In this study, 9 Fourier coefficients were used to synthesize the guitar sound.The number of coefficients adjusted to produce a sound that was more similar to the original sound.Other components such as frequency and damping coefficient are also used to produce a deviation vs time graph.The synthesis of guitar sounds with the hammer-on technique can be done by synthesizing each tone both the initial tone and the tone after hammer-on.Then these two tones are combined by setting the time interval of the initial tone smaller than the tone after hammer-on.The initial amplitude value of string 1 is not made the same as the initial amplitude value of 2, this is done so that the sound sounds clearer and the initial amplitude of string 2 has the same height as the recording literature graph.The slope (m) of the tone after hammer-on was obtained as 0.0001.However, this value does not produce a sound similar to the actual sound.Therefore, a different gradient value is used in order to produce a sound that is close to the original sound, the m value used is 0.002.The synthesis stage of the guitar strumming sound with the hammer-on technique was carried out with two types of pitch increase variations, namely a half tone increases and a one tone increase.The sound results on strings 1, 2, and 3 are more similar to the actual sound compared to the other strings.This is probably because strings 5 and 6 have a collision between the string and the guitar fret body when sampling the sound which produces a slightly different sound.

IV. CONCLUSION
Synthesizing the sound of hammer-on guitar strumming can be done by using damping coefficients, frequencies, and Fourier coefficients.Synthesis is done by combining each tone by adjusting the time interval and amplitude according to the recorded literature data.In the hammer-on strumming technique, the amplitude of the note after hammer-on decreases drastically as the mass per unit length of the string decreases.The initial tone before the hammer-on will always appear in the tone after the hammer-on with a lower amplitude as the mass per unit length increases.

Fig. 1 .
Fig. 1.Graph of recorded amplitude of (a) string 1 and (b) string 4 as a function of time for half-tone increments

Fig. 2 .Fig. 3 .
Fig. 2. Graph of the relative amplitude value of the initial tone that still appears after hammer-on (half-tone increment)

Fig. 6 .Fig. 7 .
Fig. 6.Graph of synthesized deviation of string 1 as a function of time for half-tone increments

1 )
Tool and Instruments: The tools used in this research are hardware and software.The hardware consists of an HP Intel Core-i3 PC, Pasco CI-6506B sound sensor, CMA 0663i force sensor, Science Workshop 750 Interface, CMA force sensor interface, sewing thread, scissors, Lenovo Thinkpad X230 Laptop and Yamaha APX 600ii Guitar with Fender brand steel strings.The software used is PASCO Capstone, Coach 7 Lite, Microsoft Excel 2010, and MATLAB version 2019b.

Table 1 .
Frequency of each string before hammer-on in half-