BeatBender: Subsumption Architecture for Rhythm Generation

Aaron Levisohn Simon Fraser University 250-13450 102 Ave. Surrey, British Columbia V3T 0A3 +1 604 782 7474 [email protected]

ABSTRACT capacity for solving problems beyond human capabilities; they The development of artificial intelligence techniques have have produced paintings and ; they have outwitted the best allowed artist to develop computational artworks that are human chess players. While questions remain about the nature capable of autonomous creative behavior. Such artworks are of intelligence and how machine intelligence differs from now commonly referred to as metacreations. Unlike traditional biological intelligence, it is now an accepted fact that computers artistic methods in which the artist maintains control over the can exhibit intelligent behavior. The questions now being asked final form and representation of their work, these new methods seek to define the limits and possibilities of computational are more open ended. The artist’s role in development of a intelligence. metacreation becomes that of the programmer, developing a system that will ultimately produce the artworks themselves. Working with metacreations allows for the application of AI This paper presents a computer music project called BeatBender techniques in unusual and interesting ways. Unlike AI that explores a new method for generating emergent rhythmic researchers who are often focused on the development or patterns using the subsumption architecture developed by refinement of techniques to solve a specific problem or emulate Rodney Brooks. Rather than explicitly coding symbolic human biology, artists developing metacreation have more intelligence into the system using procedural algorithms, freedom to explore creative space. The incorrect application of BeatBender uses a behavior-based model to elicit emergent an AI technique can result in a Metacreation that is highly rhythmic output from six autonomous agents. engaging and aesthetically pleasing. And the results of such experiments often generate new ideas or techniques that can be Categories and Subject Descriptors shared by all AI researchers.

Metacreations have utilized various AI techniques in General Terms accomplishing specific goals. Often, multiple AI techniques are used collectively to engender greater complexity or creative Keywords behavior. Artificial neural networks, autonomous agents, H.5.5 Sound and Music Computing: Systems cellular automata (CA), genetic algorithms/programming, as well as various artificial life techniques have all been utilized in 1. INTRODUCTION the production of metacreations.

The development of artificial intelligence techniques have This paper presents a computer music project called BeatBender allowed artist to develop computational works that are capable that explores a new method for generating rhythmic drum of autonomous creative behavior. Such artworks are now patterns using the subsumption architecture developed by commonly referred to as metacreations. Unlike traditional Rodney Brooks. Rather than explicitly coding symbolic artistic methods in which the artist maintains control over the intelligence into the system using procedural algorithms, final form and representation of their work, these new methods BeatBender uses a behavior-based model that facilitates are more open ended. The artist’s role in development of a emergent expression. Subsumption architecture systems are metacreation becomes that of the programmer, developing a designed to respond to stimuli in the environment using a system that will ultimately produce the artwork itself. hierarchical set of rules. Depending on the state of the

environment, different rules of varying complexity are invoked, The development of a metacreation has research goals as well as generating the behavioral output of the system. Due to the artistic ones. In particular, metacreations are often designed to design of BeatBender as a closed system, the environment is explore a particular aspect of human or computer creativity. In virtual and is embodied in the state of the system. this regard, the development of metacreations bridges the artistic and scientific world, providing insights into both the biological The BeatBender system is comprised of six autonomous agents, and cultural aspects of creativity. each responsible for the production of one beat of every measure

in an ongoing rhythm. Each agent is designed to react The ability of computers to exhibit intelligent and creative individually to the state of the system at different, but sequential, behaviors is no longer questioned: they have demonstrated their points in time. By encoding different rules into each layer of the subsumption architecture, emergent behaviors are elicited 2.2 Prior Work resulting in varied rhythmic output. This paper describes the As a metacreation, BeatBender positions itself within two design of the BeatBender system, and the explorations different disciplines. First, BeatBender must be situated among undertaken using the subsumption architecture to generate works that explore rhythm generation. Second, it must be rhythms that exhibit emergent characteristics. situated among general electronic music applications that utilize AI techniques. 2. BACKGROUND Research on rhythm generation is not a new subject in art or 2.2.1 Rhythm Applications research, however, the subsumption architecture has never been Rhythm generation applications take various forms and serve a applied as the foundation for such a system. The subsumption variety of purposes. In general, most of these types of architecture is well suited for rhythm generation since the applications are designed to produce rhythms as accompaniment articulation of beats does not require any form of symbolic to a human performance. One example of this is Haile, the representation. Using this architecture allows autonomous anthropomorphic robotic percussionist designed by Weinberg agents in a closed system to exhibit emergent behavior. and Driscoll [4]. Haile is capable of both mimicking and Together, these agents are able to generate rhythmic patterns collaborating with a live human performer. One of Weinberg’s similar to those produced by human participants in a drum primary goals was the implementation of a system that would circle. allow Haile to develop meaningful representations of music being listened to. Haile uses complex analysis software to both 2.1 Subsumption Architecture establish the characteristics of the live performance and to The use of the subsumption architecture as a means of eliciting compute rhythmic output. One of the benefits of subsumption emergent behavior in robots was introduced by Rodney Brooks architecture is the significant reduction of computational load in his seminal paper “Intelligence without Representation” [1] since there is no need for symbolic representation. Complex Rather than utilizing explicitly programmed algorithmic behavior can be elicited using simple behavior-based rules. solutions, subsumption architecture systems focus on developing sets of behaviors; these behaviors are implemented as layers, Several systems, including Eigenfeldt’s Kinetic-Engine [5], with some layers given priority over others. Low level layers are utilize agents as a means of representing individual drummers given the lowest priority and usually invoke non-critical within a composition. Like BeatBender, Kinetic-Engine is a behaviors. Higher level layers generally invoke behaviors that metacreation and requires no real-time input from a user. are more complex and often vital to the functioning of the Kintetic-Engine uses networked agent architecture to emulate a system. Specific layer behaviors are often selected based on percussive ensemble. When activated, the system assigns environmental data gathered using sensors; however other data “personalities” to the agents who collectively personify the can be used as well. human elements in a drum circle. Eigenfeldt’s agent system requires a much higher level of complexity than systems While the subsumption architecture methodology has been utilizing the subsumption architecture. Kinetic Engine uses a primarily utilized in the field of robotics it is equally applicable social model of agent interaction to emulate the behavior of live to other endeavors in which emergent system behaviors are human performers. Agents “make eye contact” with one another desired. For example, Bryson et al used the architectures in the and, once connected, adjust to each other’s performance. In development of a musical accompanist [2] and Nakashima and addition, a special agent type called a conductor is used to Noda incorporated it into their design of intelligent agents oversee high level organizational elements. Eigenfeldt claims capable of playing soccer games [3]. While the subsumption that this level of complexity is necessary in order for a system to architecture has been applied in musical systems, it has been be “musically successful.” He cites Brown’s work [6] with solely toward the production of tonal output. This paper presents rhythm generating cellular automata as evidence of this. BeatBender, an exploratory project in which the subsumption BeatBender explores emergence as an alternate means of architecture was implemented for the purpose of exploring generating musically successful rhythmic output. emergent rhythm generation. Pachet also developed a multi-agent system for generating and The subsumption architecture is particularly suited to the task of evolving rhythms [7]. Pachet’s system has several similarities to rhythm generation since there is no requirement for symbolic BeatBender. First, it uses a rule-based approach to rhythm representation. Much like a traditional drum circle, the process generation. However, unlike BeatBender’s rules which are of rhythm development is by nature emergent and dynamic. The layered within the subsumption architecture, Pachet’s rules subsumption architecture puts a focus on interaction among explicitly direct patterns towards a particular type of known behaviors, similar to the ways in which the participants in a structure (e.g. a rock beat). While Pachet’s rules provide a drum circle react and adapt to each others’ distinct playing greater degree of control and allow for the shaping of the styles. rhythms in much more direct ways, they do not provide an opportunity for emergent behaviors to develop.

Permission to make digital or hard copies of all or part of this work for The use of multi-agents systems is only one of many techniques personal or classroom use is granted without fee provided that copies are that have been used in rhythm exploration. As noted earlier, not made or distributed for profit or commercial advantage and that Brown explored the rhythm generating potential of cellular copies bear this notice and the full citation on the first page. To copy automata [6]. One of the properties of cellular automata is their otherwise, or republish, to post on servers or to redistribute to lists, tendency to exhibit predictable types of behavior. In Brown’s requires prior specific permission and/or a fee. paper he describes various rules and techniques that he implemented using the subsumption architecture. If, after uncovered during his exploration of linear CAs. His techniques processing, the agent is set to ON, a drum sound is triggered; if are categorized based on the resultant behavior. Some behaviors the agent is set to OFF no sound is produced. include: rhythmic inversion, density thinning, evolving inversion, and emergent cycles. Brown concludes that these 3.1 Design considerations techniques result in patterns that lack musical meaning, and are Using the subsumption architecture required that the project more “intellectually fascinating” than aesthetically valuable. undergo two distinct design phases: building the architecture and While BeatBender does not use cellular automata explicitly, the implementing the specific layers used by the subsumption linear relationship between agents results in similar behavior. system. The initial phase involved the implementation of a However, there are two major differences between these types of robust tool that allowed for the exploration of various possible systems; First, CA cells are processed in parallel while layer rules. These rules became the basis for the behaviors that BeatBender’s agents are processed in series. Second, each agent was capable of performing. This tool incorporated a BeatBender’s subsumption rules implicitly encode system flexible interface for enabling and disabling behaviors as well as intelligence, allowing for the emergence of adaptive and adjusting layer hierarchies. Additionally, it included a graphical contextual behavior. CA rules, on the other hand, are hardcoded representation as well as a text output system to record the prior to system activation, inhibiting responsive behavior. specific output of the generated rhythmic patterns for analysis.

2.2.2 General Music Applications The second design phase utilized the tool described above to Miranda also used cellular automata as the basis for a musical explore subsumption rules and layer configurations in order to composition system. Rather than focusing on rhythms, however, elicit emergent behavior. These behaviors were evaluated based he produced two systems capable of producing complete on the characteristics of the rhythmic output. instrumental pieces. [8] CAMUS generates midi notes using 2 discrete CAs: The Game of Life and Demon Cyclic Space. Rather than attempting to design an open-ended virtual system, These two CAs work together to generate notes and arrange BeatBender was intentionally limited by its intended use on a them within a composition. Choasynth uses cellular automata to real-world mechanical “instrument” – an actuated digital control a granular synthesis process based on the way electrical system (Figure 1). The use of a mechanical system provides two current flows through capacitors. Each cell controls the advantages for this type of research: first, using an actuated frequency of an oscillator that collectively determines the system provided a bridge between the field of robotics and that makeup of a particular sound. The complexity of Miranda’s of computer music. This made Brook’s ideas easier to apply systems is necessary to overcome the predictable nature of CA’s across disciplines. The second advantage was provided by the and to allow for the development of rich musical output. Much constraints imposed by the physical system itself. Due to its of this complexity, however, is derived from Miranda also uses construction, the “instrument” necessarily limits the types of techniques such as bitwise manipulation to add structure to his behaviors possible in the virtual system. compositions. The subsumption architecture alleviates the need for arbitrary mappings by encoding intelligence directly into the system behaviors.

Other techniques including neural networks and genetic programming/algorithms have also been applied to the production of computationally generated rhythmic patterns. Dolson describes the use of a neural network to both classify and generate rhythmic patterns [10]. Neural network systems, however, are not capable of emergent behavior since they are only able to replicate and combine rhythms that they have previously been trained to identify.

Tokui and Iba demonstrate the use of both genetic programming and genetic algorithms as a means of producing rhythms in their system. This system demonstrates the complexity that is often required to design a system that produces musically successful rhythmic output.

3. SYSTEM DESCRIPTION BeatBender is an autonomous rhythmic sequencer. It is Figure 1: Technical diagram of the windchime components comprised of six software agents, each responsible for the generation of one beat of every measure of continuous rhythmic In addition to the already stated advantages, a physical system output. Each agent can be in one of two states: ON or OFF. also addresses the common problem of transparency in computer During initialization all agents are set to off. When the system is music performance. The transparency problem occurs when started, each agent is activated one at a time in sequence. An audiences are unable to conceptualize the inner workings of a agent’s state is determined by a set of conditional rules that are computational system since there is no visible external applied at the exact moment of activation. These rules are representation of the activity within the system. In a traditional performance, the “system’s” activities are made visible via the instrument itself and the performer’s actions upon that instrument. Computational systems, conversely, tend to be automated or are manipulated by a performer using a keyboard Figure 3: The Rules Interface or midi-controller. In either case, the connection between performer action and system output are mostly invisible to the audience. The actuated chimes provide a visual reference for 3.4 Analysis Tools activity within the system, permitting the audience to better The interface also consists of a graphical representation of the grasp the system’s inner workings. last six patterns played by the system. This permits quick analysis of the rhythmic structure that the current system configuration is generating (Figure 4). Each horizontal row 3.2 The BeatBender Chimes illustrates one cycle of the system with the state of each chime BeatBender contains a virtual representation of the physical indicated by a red dot. The vertical rows represent the system’s chime system just described. The wind-chime model proved state over time. The first full cycle is displayed in the top row especially useful for a multi-agent system since each chime with each subsequent cycle appearing one level lower. After all could function as a discrete agent. The system consists of six six rows are filled the display return to the top row. independent chime-agents, each one capable of audio events. Just like their physical counterparts, the virtual chimes have states which can be set to either ON or OFF. When the system is activated, the state of each chime is computed in sequence. As each chime is “struck”, the subsumption architecture determines which behaviors to perform based on the current configuration of the system and sets the chime to be either on or off. At any time multiple behaviors can be triggered, but only the one on the highest subsumption layer is enacted to determine the chime’s new sate. Once the new state has been set the system updates the environment variables which include the state of each chime as well as the total number of currently Figure 4: Representation of current beat pattern active chimes. If a particular chime is set to ON then an audio event is triggered and one of three drum sounds plays as The interface also captures each rhythm as a text file. This determined by the subsumption layer rules. allows for more complex rhythmic structures to be identified and analyzed. Rhythms are coded using an “X” for every ON The current activity of the system is visually depicted using a beat and a “_” for every rest (OFF beat). Using this scheme the display on the main interface. (Fig. 4) The display depicts all six rhythm illustrated in Figure 5 would be output as: chimes in a horizontal row. A yellow dot next to each chime indicates when a chime is being struck. A green dot next to the X _ X _ _ X yellow dot indicates the current state of the chime. If the green _ X _ X X _ dot is present, then the chime is in its ON state indicating that it X _ X _ _ X triggered a drum sound on the last cycle. Figure 2 shows the _ X _ X X _ portion of the interface that displays each chime’s respective X _ X _ _ X state. In the illustration, the interface has been replicated three _ X _ X X _ times in order to show 3 sequential time steps Both the layer tools and the analysis tools are particularly important for working with a system utilizing the subsumption architecture. In order for the system to produce emergent rhythmic patterns, numerous configurations of behaviors and rankings must be tried. Each layer of the architecture must be Figure 2: The state of all six chimes over three time steps. implemented, tested, and modified until desired results are obtained. Typically, in subsumption architecture systems, the 3.3 Subsumption Layer Tools layers are implemented starting from the zeroth layer (the lowest Along with representing the actuated wind chime, the level) to the highest level layer. For BeatBender, though, the BeatBender software also includes an interface to assist in the ranking system allows for the exploration of the various exploration of system behavior (Figure 3). This interface allows permutations that are possible using a given set of rules. In a specific layers to be turned on or off and for the rankings of system such as this where the success of the behaviors is based individual layers to be adjusted. Layers that are assigned lower partially on subjective criteria, this interface was an essential ranks are subsumed by layers with higher ranks. This forms the element. basis for the subsumption architecture. Figure 3 shows the setting for three layers. In the illustration, layers 1 and 3 are both The analysis tools were also essential for evaluating the output activated. The interface allows for up to 10 layers to be explored produced by the system. While the success of the BeatBender simultaneously. system was based partially on subjective criteria, analysis of the rhythms was also accomplished by looking for patterns within the rhythmic structures. The graphical representation of the in the system. Each one of these properties is used to determine rhythms and, in particular, the logging of each rhythm as text, which behavior should be enacted by the system by running enabled this quantitative analysis to be done. them through a series of conditional statements. In this sense the properties replace the need for the physical sensors that are used 4. SYSTEM COMPONENTS in robotic subsumption systems. These conditional statements and the rules they enact form the subsumption layers that 4.1 The Chime Agents determine chime behavior. BeatBender was implemented using Max/MSP. A single agent object was developed to represent the chimes in the system. This agent was instantiated six times to create the full wind-chime 4.5 Layers Layers are made up of a condition rule and a behavior. The model. order, or rank, of a layer can determine whether or not a rule

will be instantiated when it is triggered. If two or more The chime object acts as a container for the other objects that are behaviors are triggered simultaneously, only the one associated required for the system to function. These objects includes the with the highest ranked layer will be instantiated. The entire subsumption architecture system and a playback system. conditions, or rules, for each behavior determine how often a Only the system responsible for controlling meter and timing particular behavior will be in the running for instantiation. A was implemented separately from the chime object. This system general rule will be triggered more often, but if it is in a low is responsible for controlling the rate at which the chimes are hit layer it will likely get subsumed by a higher ranked layer. A and triggering each chime sequentially. balance between generality and specificity is necessary for the

BeatBender system to develop interesting rhythmic patterns. 4.2 Goals For the subsumption architecture to be effective, the conditions used to trigger behaviors must reflect the overall goals of the 4.6 Rules The condition rules used to trigger layer behaviors utilize the system. While applications that use the subsumption architecture data sent to the chime via the property variables. This data is to control robots have specific system goals such as avoiding processed in several ways when implementing the rules used by objects, the goals for the generation of interesting rhythmic the system. There are four types of rules used in BeatBender: patterns are less straightforward. In addition, the subjective Collective, Directed, Temporal and Undirected. nature of assessing the quality of rhythmic patterns presents further difficulties. There are, however, certain criteria that can Collective rules use information about the total number of active be used to objectively evaluate the patterns a particular set of chimes in the system. An example of this type of rule would be: layers is generating. For BeatBender, the goal state is one in If there are more than 3 active chimes then turn this chime on. which patterns exhibit emergent behaviors while producing In order to make transcription of rules simpler this same rule can recognizable rhythmic structures between consecutive patterns. be written in shorthand like this: This means that the rhythms produced should not be radically different from one time step to the next, but rather should slowly evolve while maintaining some regularity. The way in which IF TOTALCHIMES > 3 THEN ON patterns develop is dependent upon the rules and the behaviors Directed rules are based on information about a chime’s specific the together create the layers of the subsumption architecture. neighbor or neighbors. An example of such a rule would be: If

the previous chime is on then flip this chime’s state. This could 4.3 Behaviors be shorthanded as: In order to fulfill its function as the control system for the actuated wind-chime system on which it is modeled, the IF P = ON THEN FLIP software implementation of BeatBender was intentionally constrained. The most significant implication of this is the Temporal rules are based on information about a chime’s state limited number of discrete behaviors each chime is capable of. over time. These rules can either track the number of In fact, the only behavior that each chime is capable of is consecutive ON and OFF states a chime has been in, or altering its own state. This means that a chime can turn ON, turn alternately, the total number of times a chime has been in either OFF, or FLIP its state. This limited number of available the ON or OFF state. An example of this type of rule is: If the behaviors makes the need for well thought out rules extremely chime has been on for the last four cycles then turn it off. This important. can be shorthanded to:

4.4 Sensors IF CONSECUTIVE > 4 THEN OFF As an agent, each chime is continually updated with specific system properties which are used to determine which behaviors Undirected rules are based on information about a chime and its are enacted under which conditions. Rather than utilizing the neighbors but without reference to a specific chime`s state. physical sensors that a robot would use, BeatBender maintains a These rules are based on the techniques described by Brown in representation of the current virtual “environment” using a set of his paper Exploring Rhythmic Automata [6] which are properties that are updated when a chime is struck. These themselves based off of Stephen Wolfram`s classification of properties include: the chime’s state, the previous chime’s state, cellular automata behavior in general. These types of rules take the next chime’s state and the number of currently active chimes into account the states of the current chime, previous chime and next chimes (P, C, and N) the sum of which is used to assess inlets receive the respective states of the chime and its neighbors local activity. If a chime is on then its value is 1; if it is off its (Figure 7). Rules objects also receive a variable indicating the value is 0. Unlike other types of rules, Undirected rules often number of currently active chimes in the system. This property include multiple conditions for each possible outcome (0 – 3) is stored in a global variable that is sent to the chime object on with each triggering a different behavior. The possible behaviors every beat. in this case are: turn on (ON), turn off (OFF), leave unchanged (U) or ignore (I). It is important to note the significant difference between leaving a chime unchanged and ignoring it. This difference illustrates the functionality of the subsumption architecture. When a condition statement results in the Ignore behavior, no action is taken. This allows rules on lower layers to get processed and to enact alternate behaviors. When a condition statement results in the Unchanged behavior, however, a chime’s state is set and lower level rules do not get processed. An example of an Undirected rule is:

0 Æ ON, 1 Æ U, 2 Æ I, 3 Æ OFF

In this example, if the sum of the three chimes states is 0 then the chime is turned on. If the sum is 1 the chime’s state is unchanged. If the sum is 2 the chime is ignored. If the sum is 3 Figure 6: Layers object the chime is turned off. Rules can be turned off by preventing a BANG from entering their first inlet. Rule activation is controlled by placing a gate 5. IMPLEMENTATION object on the first inlet of every rule object. This gate is The BeatBender system was implemented using Max/MSP. As controlled by the Rules Interface on the main screen (Figure 3). already discussed, the primary component is the agent object This allows for rules to be easily activated and deactivated. which acts as a container for the subsumption system and the audio generation system. This section will detail the Rules also have two outlets that output the behavior that they implementation of the agent object and describe its relation to trigger and an accompanying sound identifier. Behaviors are the separate meter and timing system. encoded as the new chime state (0 or 1) while sounds identifiers are encoded as an integer from 1 – 3 corresponding to a particular drum sample to play. 5.1 The Chime Agent Each chime is implemented as a MAX patcher object with four inlets (Figure 5). The first inlet sets the chime’s state to ON or OFF when it is sent a 1 or a 0 respectively. The second inlet triggers a chime’s rules. This is equivalent to the chime being struck by a virtual mallet. The final two inlets receive the respective states of the chime’s neighbors.

Figure 7: Example of a Rule Object Figure 5: Chime Agent

5.1.1 The Layers Object 5.1.3 Subsystem Object The behaviors and sound identifiers are sent to separate Each chime is continually being updated with the system Subsystem objects (Figure 8). Each Subsystem object is properties as discussed in section 4.4. These properties are responsible for determining which behavior to enact since funneled into a Layers object that contains each layer`s specific multiple rules can have their conditions met simultaneously. The condition rules as well as the subSystem object. (Figure 6) Each Subsystem uses a peak object to determine the value of the rule is implemented as a unique MAX object. highest layer currently sending data. The information associated

with this layer is then sent back out to the main chime object 5.1.2 Rules Objects where the behavior data is used to set the new chime state and Rules object have 4 inlets: the first inlet receives a BANG when the sound identifier is used to generate a specific sound. the chime is hit to activate each specific rule. The next three Sound generation is done inside a playchime object. When the playchime object receives a number it sets the audio sample associated with the chime and then plays the sound. The chimes can play three samples, each one a different variation of a drum sound: a long hit, a solid hit, and a low hit.

Figure 10: System Diagram quality of convergence based on two factors: the length of the converging pattern and the length of the recurring pattern. The analysis was completed using the visual representation of the Figure 8: Subsystem Object (Simplified) rhythmic output generated with the built-in assessment tools described in section 3.5. Rules were evaluated individually first, 5.2 Timing System then in combination. The timing system controls the tempo of the rhythm generated by BeatBender and regulates the striking of each chime in 6.1.1 Individual Rules sequence. The tempo is set using a metro object with a default None of the individual rules produce emergent behavior since by value of 200. The tempo can easily be adjusted manually by definition emergence requires the interaction of at least two changing the parameters sent to the metro object via a number elements. Individual rules do, however, produce rhythms that object. Generally the metro object is set to trigger a BANG exhibit two distinct types of behavior: Consistent and Cyclical. every 150-200ms creating a tempo of 300 – 400 bpm. Each Rhythms that exhibit Consistent behaviors activate the same BANG is routed to the correct chime using a counter object chimes every cycle of six beats. Rhythms that exhibit Cyclical coupled with a select object (Figure 9). behavior alternate which chimes they activate between two or more cycles. The following chart shows rules that produce a variety of behaviors:

Rule Applied Pattern Generated Behavior IF P=OFF Then ON X _ X _ X _ Consistent If N = OFF then ON X X X X X _ Consistent IF P=N THEN FLIP X _ X _ X X Cyclical X X X X _ X _ X ______X _ X _ X X _ _ _ _ X X _ X _ _ X X X X _ _ IF P = Off then Flip X _ X _ X _ _ X X Cyclical Figure 9: The Timing System _ _ X _ _ _ X _ _ X _ X X _ X X _ _ 6. EVALUATION _ X X X _ X _ _ _ _ X X _ X _ X X X BeatBender was evaluated on two distinct criteria: emergence _ _ X X X X _ X X and aesthetics. The emergence criterion was assessed using X X X ______objective measures; the aesthetic criterion was assessed using subjective measures. 6.1.2 Rule Combinations Using rules in combination with each other allowed for the 6.1 Emergence generation of both emergent and non-emergent rhythmic The objective evaluation of BeatBender was done to assess the structures. The following chart shows rule combination that system’s ability to exhibit emergent behavior. Since BeatBender resulted in patterns similar to those exhibited by individual rules. is a closed system, emergence manifests as the convergence of In these examples the rule numbers corresponds to subsumption the rhythmic output into cycling patterns. A comparison of levels. different rule configurations can be done by evaluating the

Rules Applied Pattern Generated Behavior 7. CONCLUSION #1: IF P = OFF then ON X X X X X _ Consistent This paper presents the development of a metacreation that uses #2: IF N = OFF then ON the subsumption architecture to elicit emergent behavior. This #1: IF P = Off THEN FLIP X X X _ _ _ X X X X X Cyclical behavior is represented in the form of rhythmic output from the #2: If N = OFF THEN ON _ _ _ _ _ X X X X X _ system. The ability of the system to produce patterns of extreme

complexity presents numerous possibilities for the exploration

of machine creativity. Many rule combinations did result in the expression of emergent behavior. The patterns produced by these rules can be classified This implementation of BeatBender demonstrates just one based on the length of the converging pattern and the length of method for generating emergent rhythms using the subsumption the cycling pattern as shown in the following chart: architecture. Future implementations will expand the layer rules

to explore the development of behaviors that can encode specific Rules Applied Pattern Type Pattern Generated musical structures. In addition, external physical sensors will be #1: IF P = Off then Flip Converging _ X _ X X X #2: IF P=N THEN Flip (36 Beats) X X X X _ _ added to create an open-system capable of improvisation based _ _ _ _ _ X on user input. This system will explore the use of the _ X _ X _ _ subsumption architecture for real-time collaboration with a live X X _ _ X _ performer. _ _ X X X _ Audio samples and supplemental material can be found at Cycling X _ _ X X X (36 Beats) X _ X _ _ X www.sfu.ca/~alevisoh/beatbender. X X X _ X _ _ X X X X _ 8. REFERENCES X _ _ _ _ _ [1] Brooks, R.A., “Intelligence Without Representation,” Artificial _ _ X _ X _ Intelligence Journal, vol. 47, 1991, pp. 139-159.

When multiple rules were combined together, the rhythms [2] J. Bryson, A. Smaill, and G.A. Wiggins, The Reactive generated by the BeatBender system became increasingly Accompanist: Applying Subsumption Architecture to Software complex. This resulted in longer converging patterns as well as Design. longer cycling patterns. The cycling period for rhythms often became so long that the repetitions were indiscernible to human [3] H. Nakashima and I. Noda, “Dynamic subsumption architecture ears and patterns appeared to transform continuously. Only for programming intelligent agents ,” Multi Agent Systems, 1998. through textual analysis were patterns discernable. An example Proceedings. International Conference on, 1998, pp. 190-197. of a pattern exhibiting this type of emergent behavior is generated using the following set of rules: [4] G. Weinberg and S. Driscoll, “Robot-human interaction with an anthropomorphic percussionist,” Proceedings of the SIGCHI Rule 1: TURN ON CHIME conference on Human Factors in computing systems, Montréal, Rule 2: IF P = N Then FLIP Québec, Canada: ACM, 2006, pp. 1229-1232; Rule 3: 0 = Ignored, 1 = On, 2 = Ignored, 3 = Rest

Rule 4: If STRIKES > 4 THEN OFF [5] A. Eigenfeldt, “The Creation of Evolutionary Rhythms within a Rule 5: IF ACTIVECHIME > 3 THEN FLIP Multi-agent Networked Drum Ensemble,” Proceedings of the

International Computer Music Conference, Copenhagen: 2007. The converging pattern produced by the interaction of these rules has a length of 8,535 beats. The cycling pattern has a [6] A.R. Brown, “Exploring Rhythmic Automata,” Applications of length of 29,852 beats. This pattern, due to its complexity and Evolutionary Computing, vol. Volume 3449, 2005, pp. 551-556. repetition of a specific motif, was used in the final instantiation of the BeatBender Metacreation. [7] F. Pachet, “Rhythms as emerging structures,” Proceedings of

2000 International Computer Music Conference, Berlin, ICMA, 6.2 Aesthetics 2000. The aesthetic assessment of BeatBender was based on the perceived musicality of each rhythm in terms of both pattern and [8] E.R. Miranda, “On the Music of Emergent Behavior: What Can instrumentation. Exploring the aesthetic possibilities of a Evolutionary Computation Bring to the Musician?,” Leonardo, particular rhythm was done by altering the sound identifier rules vol. 36, 2003, pp. 55-59. used by the subsumption layers. The aesthetic component of the rhythms was easier to adjust since altering drum sounds did not [9] K. McAlpine, E. Miranda, and S. Hoggar, “Making Music with affect the quality of the pattern generated. Once the final five Algorithms: A Case-Study System,” Computer Music Journal, behavioral rules were selected, numerous variations of sound vol. 23, 1999, pp. 19-30. identifier rules were tried until a subjectively successful musical output was generated. [10] M. Dolson, “Machine Tongues XII: Neural Networks,” Music and Connectionism, vol. 13, 1991.