"And the LORD spoke unto Moses, saying: Avenge the children of Israel [of the Midianites... and the vessels of the sanctuary and the trumpets for the alarm in his hand]" (Numbers 31:1, 2, 6). Let our master teach us: How many blasts does one sound on the eve of the Sabbath to separate the people from labor? Thus our Rabbis taught: Three blasts does one sound to make the people cease from labor. How so? The synagogue attendant takes the trumpets and goes up to the high roof of the city and sounds a blast. Everyone who was far from the city ceases from his labor. He returns and sounds a second blast, and those who are near enter the city. He sounds a third, and they would store away the hot food and kindle the lamps. When he finished sounding, if a pot was upon the stove, they would set it down on the ground; and if there was a lamp in a woman's hand, she would set it down on the ground. With trumpets is the Sabbath sanctified, and likewise the New Moons and the appointed festivals, as it is said: "And on the day of your gladness, and at your appointed seasons, and at your new moons, you shall blow with the trumpets" (Numbers 10:10). And when they would journey, they would sound the trumpets and journey, as it is said: "And when you blow an alarm a [second] time, then the camps that lie on the south side shall journey" (ibid. 10:6). And when they would assemble, they would sound the trumpets, as it is said: "But when the assembly is to be gathered together, you shall blow" (ibid. 10:7). And when the enemy oppresses, they sound the trumpets, as it is said: "And when you go to war in your land against the adversary that oppresses you, then you shall sound an alarm with the trumpets" (ibid. 10:9). And when they went to take vengeance upon Midian, with trumpets did they execute vengeance upon them, as it is said: "And the vessels of the sanctuary and the trumpets for the alarm in his hand" (Numbers 31:6).
The Trumpets That Sanctified the Sabbath and Avenged Midian
Midrash Tanchuma Buber, Matot 2:1
וידבר ה' אל משה לאמר, נקום נקמת בני ישראל [וגו' וכלי הקדש וחצוצרות התרועה בידו] (במדבר לא א ב ו). ילמדנו רבינו כמה תקיעות תוקעין ערב שבת להבדיל את העם מן המלאכה, כך שנו רבותינו שלש תקיעות תוקעין להבטיל את העם מהמלאכה, כיצד חזן הכנסת נוטל את החצוצרות ועולה לגג גבוה של עיר ותוקע, כל מי שהיה רחוק מן העיר נפטר ממלאכתו, וחוזר ובא ותוקע שניה, הקרובים נכנסין לעיר, שלישית תוקע והיו מטמינין את החמין, ומדליקין את הנרות, גמר לתקוע היתה קדירה על גבי כירה, היו מניחין אותה בארץ, ואם היה נר ביד אשה היתה מנחת אותה בארץ, השבת בחצוצרות היא מתקדשת, וכן ראשי חדשים והמועדים, שנאמר וביום שמחתכם ובמועדיכם ובראשי חדשיכם ותקעתם בחצוצרות (במדבר י י), וכשהיו נוסעין בחצוצרות היו תוקעין ונוסעין, שנאמר ותקעתם תרועה [שנית] ונסעו המחנות וגו' (שם שם ו), וכשמתכנסין בחצוצרות היו תוקעין, שנאמר ובהקהיל את הקהל תתקעו (שם שם ז), וכשהצר מיצר תוקעין בחצוצרות, שנאמר וכי תבאו מלחמה בארצכם על הצר הצורר אתכם והרעותם בחצוצרות (שם שם ט), וכשהלכו לנקום במדין בחצוצרות עשו נקמה בהם, שנאמר וכלי הקדש וחצוצרות התרועה בידו.