42 Astoundingly Useful Scripts and Automations for the Macintosh

Music Hall

Source files for the Astounding Scripts player piano.

Jerry Stratton

The Soul Felt It’s Worth—Wednesday, December 20th, 2023
Weary Skybox: “The weary world rejoices” over a starfield.; Christmas music; Christmas carols; Hymns

Earlier this year I discovered the Brian Setzer Orchestra’s Boogie Woogie Christmas at a garage sale in Michigan. Their version of O Holy Night reminded me just how wonderful and inspiring a song O Holy Night is. And after a difficult year, how much it expresses the yearning and emptiness that celebrating Christmas both secularly and religiously can fill.

    • Long lay the world in sin and error pining,
    • Till He appeared and the soul felt its worth.

“A thrill of hope, the weary world rejoices…” Some Christmases we need the opportunity for rejoicing more than others.

O Holy Night (3.5 MB MP3 file)

View audio.

There are three verses, but in my experience, “O Holy Night” is almost always sung with only the first verse. Partly I suspect that’s because the second and third verses don’t scan very well, and in addition the third verse’s mention of slavery is viewed as somewhat outdated. The line wasn’t initially directed at American slavery: the original lyrics were French. They were written in after the French revolution, in 1843; my guess is that the slaves in the lyrics almost certainly referred to French citizens, no longer slaves of the King and other royalty.

The lyrics were translated into English by Bostonian John Sullivan Dwight in 1855. Dwight’s translation is very loose, but the original third verse’s “Il voit un frère où n’était qu’un esclave…” tracks very closely with Dwight’s “for the slave is our brother”.

I can find no evidence that Dwight was an ardent or even occasional abolitionist. He was a music critic and magazine publisher. He did, apparently, include “the music of black Americans” in his magazine when submitted. The 1855 volumes of his magazine, if the Internet Archive’s OCR is to be trusted, contain no mention of “abolition” other than one about “the abolition of the mock auction system” in the selling of concert tickets and another about the “total abolition of hymn books”. The only mention of “negro” is in reference to music.

Let mortal tongues awake—Wednesday, June 29th, 2022

Samuel Francis Smith’s America is a staple patriotic song at religious gatherings around Independence Day and other patriotic holidays. It’s more commonly known as “My Country, ’Tis of Thee” because “America” appears only obliquely in the lyrics as “Thy name I love” in the second verse. It is short, otherwise direct, and a wonderful combination of looking forward to liberty and looking backward to what that liberty cost.

Smith wrote America in 1831, when some people could still remember the events of the revolution and some were beginning to recognize the likelihood of further bloodshed in the name of liberty. He lived past our Civil War, and wrote hymns to the freedom secured through that great sacrifice, too.

The four verses rise from the birth of liberty, through the physical country, to hope for the spread of liberty, and end on a plea to God as the author of liberty to preserve and protect our country as a free country.

The several verses added later going into more detail about the beauties of our land seem excessively inventorical. The original second verse handles our country’s physical beauty just fine. I see no need to belabor the point. This is a hymn, after all, but not only that, one of the beauties of the hymn is it’s simplicity. Making it really long kills part of what makes it a great and memorable hymn.

The lyrics in my 1925 Hymns of Praise Number Two are:

    • My country, ’tis of thee,
    • Sweet land of liberty,
    • Of thee I sing;
    • Land where my fathers died,
    • Land of the pilgrims’ pride,
    • From every mountain side
    • Let freedom ring!
    • My native country, thee,
    • Land of the noble free,
    • Thy name I love;
    • I love thy rocks and rills,
    • Thy woods and templed hills;
    • My heart with rapture thrills
    • Like that above.
    • Let music swell the breeze,
    • And ring from all the trees
    • Sweet freedom’s song;
    • Let mortal tongues awake;
    • Let all that breathe partake;
    • Let rocks their silence break,
    • The sound prolong.
    • Our fathers’ God to Thee,
    • Author of liberty,
    • To Thee we sing;
    • Long may our land be bright
    • With freedom’s holy light;
    • Protect us by Thy might,
    • Great God our King.
Holy, Holy! Lord God Almighty!—Wednesday, April 13th, 2022
Early in the morning (Holy, Holy!): A Chattanooga sunrise after a storm, and “Early in the morning our song shall rise to thee” from Holy, Holy! Lord God Almighty!; Hymns; Chattanooga; sunrise

Easter is coming, and Holy, Holy, Lord God Almighty, while not specifically an Easter Day song, is perfect for that morning sunrise. Reginald Heber wrote the lyrics specifically for Trinity Sunday, the first Sunday after Pentecost. The Easter season officially ends on Pentecost, after which we return to Ordinary Time; the first Sunday in which we return to Ordinary Time is Trinity Sunday, the Solemnity of the Most Holy Trinity.

Which is when we’re most likely to sing this song at Mass.

Holy, Holy is a very beautiful song, both its lyrics and its rousing melody. It’s the melody, of course, that I’m going to reproduce using the piano script.

Here are the full lyrics from Gospel Hymns Combined, an 1879 collection of hymns:

    • Holy, Holy, Holy! Lord God Almighty!
    • Early in the morning our song shall rise to Thee;
    • Holy, Holy, Holy! Merciful and Mighty!
    • God in three Persons, blessed Trinity!
    • Holy, Holy, Holy! all the saints adore Thee,
    • Casting down their golden crowns around the glassy sea;
    • Cherubim and Seraphim falling down before Thee,
    • Which wert and art, and evermore shall be.
    • Holy, Holy, Holy! tho’ the darkness hide Thee,
    • Though the eye of sinful man Thy glory may not see,
    • Only Thou art Holy, there is none beside Thee,
    • Perfect in pow’r, in love, and purity.
    • Holy, Holy, Holy! Lord God Almighty!
    • All Thy works shall praise Thy name in earth and sky, and sea;
    • Holy, Holy, Holy! Merciful and Mighty!
    • God in three Persons, blessed Trinity!
    • Amen.

Modern hymnals often change these lyrics, which I’ll talk about later on my blog, but these are the longest-running lyrics and the most inspirational.

Reginald Heber’s religion wasn’t Catholicism; he was an Anglican. But the songs he wrote, especially this one, have spread throughout the hymnals of Christianity. In the text comparison I used while researching the lyrics, you can find Methodist hymnals, Lutheran hymnals, Presbyterian, Baptist, and Moravian hymnals.

Have yourself a musical command line…—Wednesday, December 22nd, 2021
Merry scriptmas: Merry Scriptmas! Let the bells ring!; Christmas

Merry Christmas! It’s time for another programming toy under your weekend scripter Christmas tree. And what could be more Christmasy than a script that doesn’t just play music but is music?

If you’ve read 42 Astounding Scripts (and if you haven’t, the ebook is on sale until the end of the year) you’re familiar with the “shebang line”, that pound-exclamation line at the top of every script. It usually looks like #!/usr/bin/something. It tells the computer what scripting language interpreter should run this script.1

A scripting language interpreter is nothing more than a command-line program that accepts files as input and interprets them as code to do something. When you put a shebang line at the top of a file and mark that file as executable, you’re telling the computer that whenever you run this script you want it to run the script file through the interpreter named in the shebang line.

If you put #!/usr/bin/python at the top of the script file, that means it should be interpreted as Python code, by running whatever program is at /usr/bin/python. If you put #!/usr/bin/perl, it should be interpreted as Perl code, by running whatever program is at /usr/bin/perl.

But that’s all the shebang line is doing: it’s telling the computer that this file must go through the interpreter at that path. The interpreter interprets the code in the file, nothing more than that. As long as the program specified in the shebang can handle getting the file as input, it will work. This is why most scripting languages, even those that use other characters for comments such as // or /* … */, also accept the pound symbol for comments: so that they won’t be confused by the shebang line if they’re called as a shell scripting language. Even AppleScript handles pound signs as comments, specifically for that reason.2

The piano script from 42 Astounding Scripts can accept files of notes as input. It can ignore lines beginning with hashes. The piano script can be used as a shebang line interpreter.

Older posts