This manga seems to like putting sound effects into speech balloons.
Best I can figure it it’s the sound of the ruffling of the sack the ocarina is in.
Since 魔法 has が, that means that 必要 is a description of 魔法. “My magic is necessary”.
If a sentence ends in だ (such as 必要だ), and you want to add the explanatory の after it, that だ changes to な. Thus, 必要だ+のだ becomes 必要なのだ. And this なの often gets spoken as なん, resulting in なんだ.
This “explanatory” aspect changes the meaning from a statement (“My magic is necessary in this sea…”) to an explanation (“It is because my magic is necessary in this sea…”)
I’ve previously written a lot about the explanatory の here (highly recommended!):