# Digital Signal Processing of the Inharmonic Complex Tone
## 1 Introduction  
Digital signal processing (DSP) is widely used in different areas, including the processing of musical signals [1, 2]. However, different types of signals require tailored approaches. Algorithms that work well for certain signals may produce inaccurate or misleading results when applied to others. For example, a musical tone recorded with a standard sampling rate of 48 kHz is technically a wideband and non-stationary signal, exhibiting rapid changes over time and frequency. For this reason, it is important to adjust DSP techniques to that type of signal and use those algorithms that are fully designed with the nature of the signal in mind. Musical tones generated by real instruments typically consist of a fundamental frequency and a series of partials. These components form a complex tone that can deviate from strict harmonic alignment due to the physical properties of the instrument [3]. Such deviations are especially pronounced in plucked or struck string instruments, where the stiffness of the string causes inharmonicity--a phenomenon in which the partials are not located at exact integer multiples of the fundamental frequency [4, 5, 6]. In the literature, the phenomenon of inharmonicity is described by the inharmonicity coefficient \(B\). This coefficient is determined not only by the stiffness of the string but also by other physical parameters such as Young's modulus of elasticity, tension, radius, and the length ofthe string [7]. Furthermore, a mathematical model has been developed that relates the inharmonicity coefficient \(B\) to the partial frequencies \(f_{n}\) of the complex tone:  
\[f_{n}=nf_{0}\sqrt{1+n^{2}B},\ n=1,2,\ldots, \tag{1}\]  
where \(n\) denotes the order of the partial, \(f_{0}\) is the fundamental frequency, and \(B\) represents the inharmonicity coefficient [8]. It should be noted that in the presence of inharmonicity, the fundamental frequency is not exactly the same as the frequency of the first or fundamental partial. Typical values of the inharmonicity coefficient \(B\) lie within the range of \(10^{-5}\) to \(10^{-3}\). The inharmonicity coefficient \(B\) and string properties are related through string parameters as described by the equation [5]:  
\[B=\frac{\pi^{3}Ed^{4}}{64 Tl^{2}}, \tag{2}\]  
where \(E\) represents [PERSON]'s modulus of elasticity (in Pascal), \(T\) is the wire tension (in Newtons), and \(d\) and \(l\) are the wire diameter and active wire length (in meters). The perceptual consequences of inharmonicity have been examined from multiple perspectives, including pitch perception [9; 10], timbre characteristics [11; 12], the perception of musical intervals [13; 14; 15], and overall tone quality [7; 16; 17; 18]. Studies have also investigated perceptual thresholds for inharmonicity, identifying limits beyond which the sound of an instrument is perceived as unnatural or unpleasant [19], thereby underscoring the role of inharmonicity in tone production and instrument tuning. Notably, inharmonicity alters the spacing between successive partials, which affects pitch perception by disrupting the harmonic template typically used by the auditory system. This effect has been empirically demonstrated in listening experiments with piano tones, where inharmonicity causes a perceived upward shift in pitch relative to harmonic tones--an effect that contributes to tuning practices such as the Railsback stretch [18]. Given the inharmonicity, an inharmonic complex tone \(\{x[k]\}\) can be represented as a sum of its partial components:  
\[x_{n}[k]=\sum_{n=1}^{N}A_{n}[k]\cos\left(\frac{2\pi}{f_{s}}(f_{n}+f_{n}^{n}[k ])k+\varphi_{n}\right)+rest[k], \tag{3}\]  
where \(N\) is the number of the prominent partials, \(A_{n}[k]\) is a time-varying envelope, \(f_{n}\) is the frequency of the \(n\)-th inharmonic partial, \(f_{n}^{n}[k]\) is a slowly varying component of the frequency, and \(\varphi_{n}\) is the signal phase.