I went through that example, and I understand that you are using a separate file to set the frequency of each chord. But I know the frequency of the chords are the same irrespective of the instrument. I think what differentiates the sound produced a guitar for the same chord from the sound produced by an electronic piano is shape of the wave. So, I would like to know how to produce the sound produced by an electronic piano. I know this may not be a question specific to PJRC but I couldn't find the answer anywhere online.