The increase in production of mobile phone apps in the past 3 years has opened up some excellent opportunities for the commercial composer. Theme songs, music timers, UI hits and level music are now needed for all mobile apps, be they functional, informational, or game programs. However, mobile app production teams face the same challenge all software development teams do - that of limited real estate. But even worse: some mobile apps can be as small as 10MB - including all art assets, programming, and your audio.
This leads most producers working with audio designers to chop down the audio assets to as small a size as possible. The result: themes songs only 4 measures long, level music that is one annoying loop over and over, or only three UI sounds used ad nausem for everything. By using concatenation, you can avoid these pitfalls, creating longer, richer, and more responsive audio experiences from a small, unique pool of audio files, cleverly circumventing your memory limitations.
Example 1: Timer
Let's take a simple example first. Here is a 30 second timer I created for a trivia game, entitled "Climb". It is in 4/4, at 85bpm, and is 30 seconds long. At 16-bit/44.1k stereo, this linear AIFF file is 5.2MB. A producer may tell you: this is too big, write something shorter. A shorter piece may save memory space, but might not sound as rich, and the gameplay / app experience may feel repetitive with a shorter piece as well.
The Full Timer
Here's where concatenation comes in. Concatenation is a computer programming term which simply means stringing unique elements into an order to make one linear expression. Let's do this with "Climb".
As you can hear by listening to it, and see by examing the wave file in Logic, the timer consists of essentially four sections:
- the sparse introduction,
- the middle section with a key change, bell, and bass line
- the pulsing section in yet another key change
- the stinger ending
Let's break those up in Logic by using the Scissor Tool. Set your Snap setting to "Smart" or "Bar", choose the Scissor Tool, and make a snip at measures 5, 9, and 11.
Most commercial music uses popular forms, and pop music - be it rock, rap, hip-hop country, jazz - has so much repetition. Our goal in concatenation is to find what measures / beats / units repeat, and break those down to be our Unique Cell Pool. Let's do that for each of our four sections.
Set your loop cycle between measure 1 and 5, to study the First Section. Listening to it and watching the waveform, it is essentially just one measure, repeated 4 times. Take your Scissor Tool, and make a snip at Measure 2. Bounce this measure down as its own file, and label it Cell 1.
Cell 1 - bounced
Set your loop cycle between measure 5 and 9, to study the Second Section. It is similar in structure to Section 1: essentially just one measure, repeated 4 times. Take your Scissor Tool, and make a snip at measure 5 and 6. Bounce this measure down as it's own file, and label it Cell 2.
Cell 2 - bounced
Set your loop cycle between measure 9 and 11, to study the Third Section. This is a bit different: it is really just one quarter note section, repeated eight times. Take your Scissor Tool, and make a snip right at the beginning of measure 9 and on the second quarter note beat of Measure 9. Bounce this down as it's own file, and label it Cell 3.
Cell 3 - bounced
Set your loop cycle between measure 11 and 12, to study the Fourth Section. This is a unique, one-time event, a descending end stinger. Take your Scissor Tool, and make a snip at measure 11. Bounce this measure down as it's own file, and label it Cell 4.
Cell 4 - bounced
Now - let's reassemble this timer. Keep the original timer up in your Logic file, on the Audio 1 track. Create a second audio track, underneath Audio 1. Import Cells 1, 2, 3 and 4 into your Bin.
We need to eventually communicate the math to a programmer. So to keep your mindset in this mode, we will be placing individual cells on the timeline, as opposed to using Logic's loop mode.
Use the Cells like Legos, and assemble them on Track 2 to match the original timer:
- Place 4 instances of Cell 1 between Measure 1 and Measure 5
- Place 4 instances of Cell 2 between Measure 5 and Measure 9
- Place 8 instances of Cell 3 between Measure 9 and Measure 11
- Place 1 instance of Cell 4 right at Measure 11
Step 5 - Deliverables
If you had the memory of a desktop / laptop app running on a robust operating system, you would just hand off the linear timer as one file. The programmer would write a code that states: "When the Start button is released for a game, play 'ClimbTimer.mp3'".
But for concatenation, here's what you hand off to your programmer:
- The 4 Cells
- This equation for the timer:
Cell1 + Cell1 + Cell1 + Cell1 + Cell2 + Cell2 + Cell2 + Cell2 + Cell3 + Cell3 + Cell3 + Cell3 + Cell3 + Cell3 + Cell3 + Cell3 + Cell 4
Step 6 - Savings
How much memory did we save for our mobile app? Remember: the original linear timer was 5.2MB, at 16-bit/44.1k stereo AIFF. Here's the breakdown of our individual concatenation cells, also at 16-bit/44.1k stereo AIFF:
- Cell 1 = 488KB
- Cell 2 = 488KB
- Cell 3 = 124KB
- Cell 4 = 488KB
TOTAL = 1.58MB
We just saved ourselves and our team 3.6MB. And yet, we have the same linear audio experience - the timer's integrity and content was not sacrificed in any way. Now we have room for more art assets - or even more audio.
Example 2: Creating More Detail and Fluidity
Our first example was great for demonstration purposes, as it was a very symmetrical, square composition, with everything ending on the bar or on the beat. However, our compositions are not always that neat and tidy. And we might want elements to change over time. Yet - memory, as always, remains an issue.
Let's do another example where we create more detail, and concatenate in more asymmetrical fashions.
Below is a timer based on the one in Example 1. It is also in 4/4, and at 85bpm. However - something is different.
The Full Timer
First of all, it is closer to 60 seconds long. And there are some additional musical elements that gradually reveal themselves, giving a richer, more progressive experience. At 16-bit/44.1k stereo, this linear AIFF file weighs in at 9MB.
Let's take a closer look and analyze this timer, comparing it to our original timer. Again, with concatenation, you are always searching to see what elements repeat, and can be made individual cells to be strung together later.
The first half of this timer, between Measure 1 and 9, is exactly the same as our original 30 second timer. Measure one repeats 4 times, and measure five repeats 4 times. Go ahead and take your scissor tool and make a cut right on the bar at Measure 2, and right on the bar at Mesaure 5 and Measure 6.
Starting at 9, something new happens. The base of Measure 9 through 12 is the same as Measure 1, however, at the end of each measure, starting at the end of Beat 3, a synth figure comprised of six 16th notes occurs.
Further listening reveals: the synth lick occurs at a low octave first, panned Left; the second lick occurs in an upper octave, panned Right; and the last note of the last synth lick occurance end on a totally new note, on top of the next section, starting on measure 13.
Here's how we will slice this up:
A. To make way for the eventual synth lick, go back to Measure 1. Place your loop tool to contain the first 16th note in Measure 1. Bounce this down as "Cell 1".
B. Place your loop tool to start at the beginning of the second 16th note in Measure 1 and end of the third 16th note on Beat 3 of Measure 1. Bounce this down as "Cell 2".
C. Place your loop tool to start on the fourth 16th note of Beat 3 in Measure 1 and end right on the bar of Measure 2. Bounce this down as "Cell 3".
D. Now go to Measure 9. The synth lick in the low octave on the Left occurs twice in this section, in the same manner. Put your loop tool at the start of the synth lick - on the fourth 16th note of Beat 3 - and end right on the second 16th note on the first beat of Measure 10. Bounce this down as "Cell 4".
E. The next synth lick in this section - the high octave one on the Right - is a little different, in that it's second appearance in Measure 12 ends with a different note. So put your loop tool to start on the fourth 16th note of Beat 3 in Measure 10, and end right on the bar of Measure 11. Bounce this down as "Cell 5". Then put your loop tool around just that first 16th note on the first beat of Measure 11, and bounce that down as "Cell 6". Then put your loop tool around just the first 16th note on the first beat of Measure 13, and bounce that down as "Cell 7".
Moving to the next section: we have the base music the same as the 5th measure cell in our original timer, but now we have a bell lick that occurs, four times, panned right in the center. The last time the lick occurs, the final note is different, for the key change section starting at Measure 17. So let's slice this up:
A. Got to Measure 5. Place the loop tool around the first 16th note, and bounce it down as "Cell 8"
B. Place the loop tool to start right on the second 16th note of Beat 1 in Measure 5, and end on the start of the second beat. Bounce this down as "Cell 9".
C. Place the loop tool to start right on the second beat, and end at the beginning of the fourth 16th note of the third beat, and bounce this down as "Cell 10".
D. Place the loop tool to start on the fourth 16th note of the third beat and end on the bar of Measure 6, and bounce this down as "Cell 11".
E. Go to Measure 13. Let's bounce down this bell lick. Place the loop tool on the fourth 16th note of the third beat, and end right on the bar of Measure 14. Bounce this down as "Cell 12".
F. Place the loop tool arond the first entire beat of Measure 14 - the sustained final note of the bell lick - and bounce that beat down as "Cell 13".
G. Go to Measure 17. The sustained note of the final bell lick is different here, it needs to be it's own cell. Place the loop tool around the first bear of Measure 17, and bounce down as "Cell 14".
Now let's analyze the final section. Measure 17 to Measure 19 is similiar to the end section of the original timer, with the only exception being the last note of the bell lick that occurs right on Measure 17. So let's do this:
A. Place the loop tool to bounce down the entire second beat of Measure 17 - the quarter note. Label this "Cell 15".
B. Bounce down all of Measure 19 - the end stinger - as one file, labeling it "Cell 16".
Whew! That was a fair amount of surgery. But now let's reassemble, and see the magic happen.
Import your new Cells 1 through 16 into your audio bin. Create a audio new track in the Logic file, and begin to assemble your new track using the pool of audio cells, using the following equation:
[Cell1 + Cell2 + Cell3] X 4
+ [Cell8 + Cell9 + Cell10+Cell11] X 4
+ Cell1 + Cell 2 + Cell4 + Cell2 + Cell5 + Cell6 + Cell 2 + Cell4 + Cell2 + Cell5
+ Cell7 + Cell9
+ [Cell10 + Cell12 + Cell13] X 3
+ Cell10 + Cell12 + Cell14
+ [Cell 15] X7
You have now created the original 60-second timer, but using concatenation instead of a linear file.
And now for the pay off. Remember: our linear file of this timer came in at 9MB. So how much did we save via concatenation?
- Cell 1 = 32KB
- Cell 2 = 308KB
- Cell 3 = 156KB
- Cell 4 = 184KB
- Cell 5 = 156KB
- Cell 6 = 32KB
- Cell 7 = 32KB
- Cell 8 = 32KB
- Cell 9 = 92KB
- Cell 10 = 216KB
- Cell 11 = 156KB
- Cell 12 = 156KB
- Cell 13 = 124KB
- Cell 14 = 124KB
- Cell 15 = 124KB
- Cell 16 = 488KB
TOTAL = 2.41MB
We just saved ourselves and our team 6.59MB.
- With the same pool of unique cells in Example 2, you can make both the 60 second timer in Example 2 and the 30 second timer in Example 1.
- Using Timer 1: for games, you could have Cell 1 loop until the player gets to a new level, then have the music loop Cell 2, etc.
- For concatenated audio, it's best to avoid excessive reverb that bleeds over the bar or beyond logical cuts, requiring additional cells. If real estate is limited, use dry sounds as much as possible, and keep reverbs / delays into strategically located places.
- Logic Source Files