![]() |
| A screenshot of my first Max patch, called BJEOEHTNHCOAVGEEN. For a slightly higher resolution, click here. |
Just as this spring semester was starting, I wrote a blog post previewing the classes I would be taking. The image I included at the top of the post was a screenshot from Max/MSP (also known simply as "Max") and was accompanied by a caption that read "By the end of the semester, this image—a screenshot from Max/MSP—might make sense to me."
It has been a few weeks, and while I don't think I can make total sense of that image, I am well on my way. I have already put together a few "patches" (that is Max-specific programs); I cannot profess to be an expert at this point, but I have learned enough both to do some basic but entertaining things and also to realize that I am just beginning to scratch the surface.
In this post I will write about the first patch I created in Max, which I have called "BJEOEHTNHCOAVGEEN" (more on that title a little later). The assignment given to the class was intentionally vague: "Make a patch that does something." Like a number of other people in the class, in interpreting that directive I decided to have some fun.
As complicated at the patch might look, the basic principle behind it is simple: a random number generator picks random numbers (1 through 9) and plays an excerpt from the corresponding Beethoven symphony. Once I had built a patch that accomplished that, I spent some extra time making the patch a little more exciting.
I have made three separate screen recordings of the patch in action. Before I get into any of the details, here is the first one:
Not your typical Beethoven symphony (and yet not too far off either). Let's get into how the patch works. Feel free to reference the image at the top of this page (where all the details are visible), also available here.
As I mentioned above, the basis of the patch is a random number generator that triggers musical excerpts from corresponding Beethoven symphonies. For instance, if the random number generator picks a 5, an excerpt is played from Beethoven's Symphony No. 5. Important to note is that once a random number has been picked and the corresponding symphony has been triggered, that symphony cannot be triggered again, even if the same number is generated. (This way the resulting "piece" has a definitive end that hopefully arrives before the user's attention span expires. It's also a little more elegant.)
Once the user clicks the 'START' button, it enables a 'metro' object, named for its metronomic purpose. The metro object sends out repeated pulses (called 'bangs' in Max) at a specific time interval. This rate, which is specified in milliseconds, can be constant (e.g., every 4000 milliseconds), or it can be changed by sending a new time interval to use.
When I first designed this patch, the rate I was using was constant. However, sometimes it would take a relatively long time for the ninth random number to get picked, resulting in a sort of awkward silence before the last symphony would be triggered. To fix this (artistic) problem, I had the random number generation rate vary – specifically, it decays exponentially as more random numbers are generated. If n is the number of random numbers that have been generated, then the interval ∆t between random number generations, in seconds, can be expressed and graphed as follows:
Below is a second screen recording of the patch in action. Notice how the interval between random number generations decays exponentially. (A yellow light flashes every time a random number is generated.)
Let's now follow what happens once a number is randomly picked (for the first time). The first thing that happens is that a gate is closed so that nothing will happen if the same number is picked again. Next, a signal is sent to trigger the excerpt from the corresponding Beethoven symphony. If you look closely, however, you will notice that each symphony has three preloaded excerpts to play.
So how does the patch determine which one to play? An excellent question! Note the 'counter' object in the middle of the screenshot. Every time a new random number is picked, 1 is added to the counter. In other words, the counter keeps track of how many distinct random numbers have been picked. The subsequent calculations connected to the counter subtract 1 from the running total, divide the result by 3, and add 1 to this result, rounding down to the nearest whole number. Thus 1, 2, and 3 all yield 1; 4, 5, and 6 yield 2, and 7, 8, and 9 yield 3. This essentially divides the piece into three parts – a beginning, middle, and end; a random number is picked in the first third, second third, or third third.
When a new symphony is triggered, it checks to see which third it is in. If it is in the first third—namely, if it is the first, second, or third symphony to be triggered—the patch will play from the beginning of that symphony. Likewise, if it is the fourth, fifth, or sixth symphony to be triggered, the patch will play from somewhere in the middle of the symphony. And, of course, if it is the seventh, eighth, or ninth symphony to be triggered it will play from the end of the symphony. This aspect of the patch—which is pretty clever, if I do say so myself—makes each excerpt sound well placed. The resulting piece will always start with an opening theme and will always end with finality.
(To make things a little more manageable—and recognizable—I predetermined the three possible excerpts for each symphony. So when I say the patch plays from the middle, it is a specific part of the middle. For example, if Symphony No. 5 is triggered fourth, fifth, or sixth, it will always play part of the Trio from the Scherzo.)
Once all nine excerpts have finished playing, the patch will shut itself off. (The counter in the bottom left corner of the screen keeps track.)
While there are 362,880 ways to order the excerpts, there are an infinite number of possible "performances" because the possibilities for timing are limitless. Because of the aleatoric nature of this patch, I added John Cage's name to the title, inserting one letter of his name after each letter of Beethoven's (last) name to yield BJEOEHTNHCOAVGEEN.
Lastly, below is the third (of an infinite number of) examples of the patch in action. If you happen to be reading this post and have any questions about things I either did or did not mention, feel free to use the comments section.



No comments:
Post a Comment