How to accentuate the inharmonic components present in strings

There are at least two ways to make your guitar sound more 'inharmonic'. In truth, what is done is not directly to accentuate the inharmonic components but to attenuate the harmonic components and the fundamentals belonging to the tempered system.

Through convolution

This technique requires the ad hoc preparation of the impulse response to be used for the convolution. This impulse response can be obtained simply from a white noise vector. It must then be filtered with comb filters without feedback tuned to the frequencies of the tempered system, obviously we will only choose those fundamental frequencies that can actually be obtained on the guitar.

Through weighted interference on the harmonic components

This technique is a bit more complex but produces better listening results (more pleasant). This is the technique I implemented in my algorithm (made in MaxMsp) with which I made the following video:

A pitch shifter was created by complex domain multiplication between the Hilbert transform of the input signal and a complex sinusoid. This complex sinusoid was then subjected to waveshaping with an ad hoc function that aims to enhance certain harmonics. The result is a transposed signal with accentuated harmonic (periodic) components. This signal is then transposed again, but this time in the other direction, i.e. until the original fundamental is regained. However, this transposition is not perfect, so that there is interference between the spectral components. Due to the way the transposed signal is constructed, the greatest interference will occur on the harmonic components, which will therefore be more inhibited than the inharmonic partials. The resulting sound will be 'dirtied' because it will have a higher content of inharmonic partials.

In more detail:

The Hilbert transform is a mathematical operation that produces a signal that is 90 degrees out of phase with the original signal.
Complex multiplication is a mathematical operation that multiplies two complex numbers.
Waveshaping is a technique that is used to change the shape of a waveform.
An ad hoc function is a function that is created for a specific purpose.
Spectral components are the individual frequencies that make up a sound.
Interference is the phenomenon that occurs when two or more waves combine to produce a new wave that is different from the original waves.
Harmonic components are the frequencies that are related to the fundamental frequency of a sound.
Inharmonic components are the frequencies that are not related to the fundamental frequency of a sound.