Volume! The higher the better for sustain, at least according to Eddie Van Halen. He was a cranker...
Well yeah you could add more compression... But at some point it sounds dead and flat but if you want to sustain alot of noise weheey, go for it!
I think maybe delay and reverb helps for sustain but i'm not sure. Feedback. Feedback gives sustain, that's why jimi hendrix humped his amplifier
you know. so that the sound loops into his guitar creating.. feedback, sustain. Well, I have this theory about using speakers in the room contra headset.
From my experience the sound in the room helps the string to vibrate longer, say you sit with your amp and play. The sound of the string comes out of the
amp and rings in the room, that should help the string vibrating because of the ressonance in the strings pitch and the sound in the room (from the amp)
with the same pitch. Lots of ways to increase sustain. I try to use a tad of compression with a balanced amount of gain (pre&post-gain) with thin strings (yeah we know the fat ones give more sustain (SRV) I get sustain for miles. I try to keep the gain down and too much post-gain tends to get fizzy or something. Oh, I also go for the mids! Treble like low-something or even nothing (depends on the amp) and often no bass, or just a tad (depends on the amp) and I crank the mids (depends on the amp) and adjust presence to taste (my taste does not depend on the amp, well if the amp is old then it tastes more like dust to me).
I go for the Shawn Lane/Allan Holdsworth/Fredrik Thordendal/Brett Garsed/Marshall Harrison/frank gambale/scott henderson ect. ect. - kinda sound