When a guitar string is plucked or strummed, it produces a sound wave
with peaks in the frequency domain that are equally spaced. These are
called the harmonics and they give each note a full sound. We can
generate sound waves with these harmonics with discrete-time filter
objects.

Determine the feedback delay based on the first harmonic frequency.

delay = round(Fs/A);

Generate an IIR filter whose poles approximate the harmonics of the A string. The zeros are added for subtle frequency domain shaping.

To generate a 4 second synthetic note first we create a vector of states with random numbers. Then we filter zeros using these initial states. This forces the random states to exit the filter shaped into the harmonics.

A chord is a group of notes played together whose harmonics enforce each
other. This happens when there is a small integer ratio between the two
notes, e.g. a ratio of 2/3 would mean that the first notes third
harmonic would align with the second notes second harmonic.

Define the frets for the C chord.

fret = [3 3 2 0 1 3];

Get the delays for each note based on the frets and the string offsets.