Turn your guitar to MIDI and Guitar Synthesizer
There is a sensor for each string which individually records the string vibration. This signal is converted to digital, analyzed for estimating its fundamental frequency and its amplitude (envelope detector). Whenever a sharp increase in amplitude is detected, a MIDI note on message is sent, at the detected frequency. Whenever the amplitude falls below a threshold, a MIDI note off message is sent.