What is the origin of the idea that Miriam, sister of Moses, was a virgin? Church father Chromatius, writing around the turn of the 4th century, appeals to an interesting OT example to defend the perpetual virginity of Mary:


  Remember that Miriam the prophetess of the Old Testament (the sister of Moses and Aaron) remained a virgin unsullied by man, having beheld the light of heavenly signs after the plagues of Egypt and the parting of the Red Sea and the Lord's glory going in advance and seen in a pillar of fire and clouds.  It is not plausible therefore that the Mary of the Gospel, a virgin bearing God, who beheld God's glory not in a cloud but was worthy of carrying him in her virginal womb, had relations with a man. (source)


I reviewed the Wikipedia article on Miriam, and it seems to indicate that Chromatius's understanding is contrary to that of Judaism – the article mentions the Midrash as saying that Miriam had a spouse.  Furthermore, Chromatius seems to make much of Miriam's status as a "prophetess," yet many prophets had spouses (e.g., Moses, Isaiah, Hosea)

So I wonder – what is the origin of this tradition, that Miriam was a virgin?  Did it develop in association with the doctrine of the perpetual virginity of Mary, or was Chromatius relying on an older tradition?
About the time of Ambrose, Gregory of Nyssa wrote the following in which he speculates about her virginity.


  Thus, Miriam’s timbrel being a dead thing, and virginity being a deadening of the bodily passions, it is perhaps not very far removed from the bounds of probability that Miriam was a virgin. However, we can but guess and surmise, we cannot clearly prove, that this was so, and that Miriam the prophetess led a dance of virgins, even though many of the learned have affirmed distinctly that she was unmarried, from the fact that the history makes no mention either of her marriage or of her being a mother; and surely she would have been named and known, not as “the sister of Aaron1477,” but from her husband, if she had had one; since the head of the woman is not the brother but the husband. 
  Gregory of Nyssa


His reference to "many of the learned" and who they are may only be speculated, but clearly by his time, there was teaching that Miriam was a virgin that the tad bit later Chromatius had picked up.