"Then Joshua spoke" (Joshua 10:12). There is an "az" ["then"] referring to the past, and there is an "az" referring to the time to come. "Then [az] men began to call" (Genesis 4:26). "Then [az] she said, A bridegroom of blood" (Exodus 4:26). "Then [az] Moses sang" (Exodus 15:1). "Then [az] Israel sang" (Numbers 21:17). "Then [az] Joshua spoke." "Then [az] David said." "Then [az] Solomon said" (1 Kings 8:12). These refer to the past. And there is an "az" for the time to come: "Then [az] you shall see and be radiant" (Isaiah 60:5). "Then [az] your light shall break forth as the dawn" (Isaiah 58:8). "Then [az] the lame shall leap as a deer" (Isaiah 35:6). "Then [az] the eyes of the blind shall be opened" (Isaiah 35:5). "Then [az] the virgin shall rejoice in the dance" (Jeremiah 31:13). "Then [az] our mouth shall be filled with laughter" (Psalms 126:2). "Then [az] it shall be said among the nations" (Psalms 126:2). These refer to the time to come. There are ten songs. The first was in Egypt, as it says, "The song shall be to you as in the night when a feast is hallowed" (Isaiah 30:29). The second was sung at the Sea: "Then Moses sang." The third was said over the well: "Then Israel sang." The fourth that Moses spoke: "And it came to pass when Moses finished writing" (Deuteronomy 31:24). The fifth that Joshua said: "Then Joshua spoke." The sixth that Deborah and Barak said: "Then Deborah and Barak sang" (Judges 5:1). The seventh that David said: "And David spoke to the LORD" (2 Samuel 22:1). The eighth that Solomon said: "Then Solomon said." The ninth that Jehoshaphat said, as it says, "And as they went out before the army they said, Give thanks to the LORD, for He is good, for His mercy endures forever" (2 Chronicles 20:21). And one for the time to come, as it says, "Sing to the LORD a new song, His praise in the assembly of the faithful" (Psalms 149:1). For all the songs that have passed are called by a feminine term, for just as a female gives birth, so the deliverances that passed had subjugation following after them. But the deliverance that is to come is called by a masculine term, for it has no subjugation after it, as it says, "Israel is saved in the LORD with an everlasting salvation" (Isaiah 45:17).
The Ten Songs and Why the Final One Is Sung in the Masculine
Yalkut Shimoni on Nach 20:1
אז ידבר יהושע (יהושע י, יב). יש אז לשעבר ויש אז לעתיד לבא. אז הוחל לקרוא. אז אמרה חתן דמים. אז ישיר משה. אז ישיר ישראל. אז ידבר יהושע. אז אמר דוד. אז אמר שלמה. הרי אלו לשעבר. ויש אז לע"ל. אז תראי ונהרת. אז יבקע כשחר. אז ידלג כאליל פסח. אז תפקחנה. אז תשמח בתולה במחול. אז ימלא שחוק פינו. אז יאמרו בגוים, הרי אלו לעתיד לבא עשר שירות הם הראשונה במצראים שנאמר השיר יהיה לכם כליל התקדש חג, שנייה שנאמרה על הים אז ישיר משה, שלישית שנאמר על הבאר שנאמר אז ישיר ישראל. ד' שאמר משה ויהי כללות משה לכתוב. ה' שאמר יהושע אז ידבר יהושע. ו' שאמרה דבורה וברק ותשר דבורה וברק. ז' שאמר דוד וידבר דוד לה'. ח' שאמר שלמה אז אמר שלמה. ט' שאמר יהושפט שנאמר וצאתו לפני החלוץ אומר הודו לה' כי טוב כי לעולם חסדו, ואחד לעתיד לבא שנאמר שירו לה' שיר חדש תהלתו בקהל חסידים. שכל השירות שעברו קרויות בלשון נקבה כשם שהנקבה יולדת כך התשועות שעברו היו אחריהם שעבוד. אבל התשועה העתידה לבא קרויה לשון זכר שאין אחריה שעבוד שנאמר ישראל נושע בה' תשועת עולמים: