I saw in a modern book as follows:
דהנה איתא בגמ׳ דר׳ עקיבא היה לו מעלה יתירה ממשרע״ה אשר לו היתה הבנה גם בסודות הניגונים והטעמים, מכיון שמת במיתה משונה לכן זכה לזה המדריגה שמשה רבינו לא זכה לזה.
the g'mara says that Rabbi Akiva had a level higher than Moshe rabenu, in that he had an understanding also of the secrets of the tunes and [cantillation(?)] notes: since he died with [torture] he merited this level that Moshe did not.
Does anyone know where this g'mara is? M'nachos 29 amud 2 discusses some understanding that Rabbi Akiva had that Moshe did not, but doesn't* indicate that it had to do with tunes and notes, nor does it* indicate that he merited this level because he'd wind up being tortured to death. Perhaps some commentary there indicates one or both of those points? Or is there another g'mara that does so? Or some other (non-g'mara) source?
* as far as I see