כָּל־אֵ֨לֶּה בָנִ֜ים לְהֵימָ֗ן חֹזֵ֥ה הַמֶּ֛לֶךְ בְּדִבְרֵ֥י הָאֱלֹהִ֖ים לְהָרִ֣ים קָ֑רֶן וַיִּתֵּ֨ן הָאֱלֹהִ֜ים לְהֵימָ֗ן בָּנִ֛ים אַרְבָּעָ֥ה עָשָׂ֖ר וּבָנ֥וֹת שָׁלֽוֹשׁ׃
all these were the sons of Heman the king’s seer in the things pertaining to God, to lift up the horn. And God gave to Heman fourteen sons and three daughters.
Rashi
רב לכם בני לוי means, “It is a great (an important) thing that I have told you, ye sons of Levi”). But were they not fools in that although he so sternly warned them they nevertheless undertook to offer! They, however, sinned against their own souls (i.e., they were regardless of their lives) as it is said, (17:3) “the censers of these sinners against their souls”. — But Korah who certainly was a clever (lit., open-eyed) man, what reason had he to commit this folly? His mind’s eye misled him. He saw by prophetic vision a line of great men (more lit., a great chain) descending from him, amongst them the prophet Samuel who was equal in importance to Moses and Aaron together (cf. Psalms 99:6: משה ואהרן בכהניו ושמואל בקראי שמו), and he said to himself, “On his account I shall escape the punishment”. And he further saw twenty-four Mishmars (shifts of Levites who formed the Temple Choir) arising among his grand-children, all of them prophesying by the Holy Spirit, — as it is said, (I Chronicles 25:5) “All these (prominent musicians) were sons of Heiman” (Heiman was a descendant of Korah; cf. I Chronicles 6:18—23). — He said, “Is it possible that all this dignity is to arise from me and I shall remain silent (be myself of no importance)?” On this account he joined the others in order to attain to that prerogative, because he had indeed heard from the mouth of Moses that all else of them would perish and one would escape: "He whom the Lord will choose will be holy". He mistakenly applied this to himself. But he had not seen correctly, for his sons repented of their rebellious attitude and therefore did not die at that time (cf. Numbers 26:11), and it was from them that Samuel and the Levitical singers were descended. Moses, however, foresaw this. (Midrash Tanchuma, Korach 5).
Ibn Ezra
And every psalm written at its head "To David" (לדוד / L'David) is either by David, or by one of the poets prophesying about David, in the manner of "To Solomon. O God, give Your judgments to the king" (Psalm 72), which is also by one of the poets [prophesying] about Solomon. And "A Prayer of Moses" (Psalm 90) is by Moses. And a psalm "To Asaph" is also by the Asaph who was in the days of David, and it is written about him "[who] prophesied under the guidance of the king" (I Chronicles 25:2). And "[To] the Sons of Korah" refers to the sons [descendants] of Heman the poet, and all of them were in the days of David. And it is written about Heman, "the king's seer" (I Chronicles 25:5). And "[To] Solomon" (Psalm 72) is by one of the prophets prophesying about Solomon, or about the Messiah his son [descendant], as his name is called [prophetically elsewhere], "and David My servant shall be their prince forever" (Ezekiel 37:25), in the manner of "And you, fear not, O My servant Jacob" (Jeremiah 30:10). And the psalms at whose head no person's name is written - it is possible they are not David's, [but] perhaps they are David's, like the psalm "Give thanks to the Lord, call upon His name" (Psalm 105), where David's name is not [written at the head], yet it is David's. And this is explicit in Chronicles, that David composed it concerning the Ark and gave it to Asaph the poet (see I Chronicles 16:7, which contains verses from Psalm 105). And why were [some] commentators astonished because there isn't at the beginning of the book [an explicit statement like] "The prophecy of David"? For there is no doubt among the Israelites that the Book of Genesis was written by Moses our master, for so our holy fathers, of blessed memory, received [by tradition], even though it is not written at the beginning, "And the Lord spoke to Moses."