3 min read

Anatomy of a Song: Using Scripture as a Song Grammar

I have designed a simple context-free grammar using Psalm 71:22 to drive the creation of a song.
Anatomy of a Song: Using Scripture as a Song Grammar

I decided to use the Bible as my latest muse. I was looking for a good verse to use as the foundation for a Context Free Grammar for my Algorithmic Music Composition efforts and the one I was led to was...

Psalm 71:22.

To be clear, the entire song is derived from this one Bible verse. It uses phrases and sequences that I defined in the sequencer and  just the verse as it is defined in my grammar to position them within the song.

I started with a sound pack from Reason studios called Scandi Noir. I then composed various sections of music. I finally threw in some strummed acoustic guitar to finish off the sound, and I had my song structure.

Once I had composed the basic song pieces, I got to work defining my grammar. It's a really simple grammar, so I'll go through it with you.

First, I wanted to define the structure, so I decided to use the sentences of the verse as the primary focus. My use of the word "sentence" here is somewhat presumptuous, as they are really nothing more than tagged custom verbs, but this is my first attempt at using the plugin, so I tried to keep it simple.

Here are the sentences and the corresponding song sections that they refer to. To put it simply, the underscore delimited words (sentences) on the left-hand side of the -> operator define that sentence while the numbers on the right-hand side correspond to sections in my sequencer.

##############################################################
I_will_thank_you_with_a_harp -> 3 3
I_will_thank_your_for_being_faithful -> 4 5
my_God -> 6 7
I_will_make_music_for_you_with_the_Lyre -> 8 9
holy_one_of_Israel -> 14 14
holy_one_of_Israel_high -> 23 23
##############################################################
preChorus -> 10 10
Chorus  -> 12 12 13 13

Amen -> 29
##############################################################

Here is what the first sentence looks like in the sequencer:

It will simply play sequences 2 and 3 in order. The Colored boxes represent note lanes in the sequencer. I am using a Tracker interface to compose the sequences (Renoise).

Here's what the Cello part (red boxes) looks like for the sequence:

The numbers on the left are note numbers (there are 64 notes per bar as defined in the upper-left corner). The white letters correspond to note values and the number after the letter is the octave. The two zeroes tell it which instrument to use (a cello in this case). The yellow numbers are Hexadecimal values indicating how loud the note will be.

Now that I had the building blocks for the song, I could define the Message (the main theme of the Verse).

Message -> I_will_thank_you_with_a_harp preChorus I_will_thank_your_for_being_faithful preChorus my_God preChorus I_will_make_music_for_you_with_the_Lyre preChorus Chorus

I then added a Conclusion. Honestly, the conclusion is just a marker, as it simply maps one-to-one with a sentence, but I wanted to formalize it.

Conclusion -> holy_one_of_Israel

The Verse needs an Introduction, so I added one.

Introduction -> 30 0 0 1 1 2

That makes Verse22 look like the following:

Verse22 -> Introduction Message Conclusion

The main song is named Psalm, and is defined as such:

Psalm -> Chapter71 EndingPrayer

Chapter71 is a one-to-one mapping to Verse22, so that goes directly into the song. EndingPrayer is constructed using the following:

EndingPrayer -> Glory! Glory! Amen

And, to round it off, Glory! is defined as:

Glory! -> holy_one_of_Israel_high

Amen is in there to set a volume envelope on the guitar so it would fade out at the end.

Put all of this together and it makes a song.

As I was editing my grammar, I began using Microsoft Visual Studio Code (vscode). As I was typing, I began to notice something remarkable...

It understood my grammar and was providing me with auto-complete suggestions for sentences in my grammar.

Amazing.

Overall, I feel like this experiment was a success. I envision ways that I can remix this song and use different instrumentation and rhythm and get a completely different song while still using the same sentences.

I think next I'd like to try something in the book of Songs. I'd also like to see how I could interpret a Haiku.