Well, thats no fun. Hope you have made some progress on the issue since you posted.
The engine noise is a concern - it might be something internal as both sides seem to be affected. But I would try a couple of things first I guess.
Check this description for p0011:
http://www.engine-codes.com/p0011_nissan.html
Also, look at this:
http://www.clubfrontier.org/forums/f8/c ... fix-70306/
On the chance this is an electrical issue as per the engine codes link, try disconnecting both solenoids. This should disable intake valve timing advance. Reset codes and restart engine. You will get codes for the disconnected solenoids, but see if p0011 and p0021 come back. If they do not, test drive the truck for engine noise. You will be in limp mode with the solenoids disconnected.
If you have engine noise with the solenoids disconnected, you can try to localize the noise - use a stick and hold it on the engine block /heads / timing cover and see if you can find where it is loudest. Watch the engine fan!
Also, if you still have engine noise, read this link:
http://www.justanswer.com/nissan/36qiz- ... p0021.html
See if Oreillys can use their scan tool and tell you what your ignition timing is at idle and see if they can do the checks in that link.
Hope that helps!