The Complementary Rhythm Generator Applet allows you to load a file describing a process, then watch the applet automatically generate rhythms. You can try designing scenarios on your own, though I don't really recommend it. In any case you should first check out the scenarios I have prepared. Since the applet's file chooser always starts with your home directory, and since you probably don't want to clutter up your home directory with XML files, I recommend that you establish a working folder directly under your home directory. A single working directory will suffice for all the applets on this site.
Version 1.0.4 of the demonstrating applet implements two enhancements relative to the preceding version 1.0.3.
The first enhancement is that the SHA-1 64-bit encrypted Java Signing Certificate has been upgraded to 128-bit
SHA-2 encryption, as required by the latest browsers.
The second enhancement is the establishment of an XML schema document,
The version 1.0.4 file chooser now verifies that each compliant XML input file has a document element named
“document” with a
schemaLocation attribute set to “http://charlesames.net/rhythm rhythm.xsd”.
If you wish to understand what is needed to bring a pre-1.0.4 file into compliance, use an online XML validation site such
The first prepared scenario is defined in the file
Follow the instructions given in here to download
Rhythm-Scenario01.xml into a working folder under your home directory.
In the Save As: dialog that follows, navigate to your working folder. Accept the filename and click on .
Initially, the applet should resemble Figure 1.
To load the file, click on and use the file chooser to locate
in its download directory.
Once the file is successfully loaded, the applet will display the file path and the topmost component of the configuration scheme.
This new display is shown in Figure 2.
Rhythm-Scenario01.xmlhas been loaded.
This portion of the instructions explains how to view the components of a Complementary Rhythm Generator file. If you have loaded a scenario and simply wish to experience the demonstration, you may skip ahead to Running Scenario #1.
We will now tour the graphical editor. Notice that this editor provides no Save or Undo buttons; any changes you make are written directly to the underlying file. That's the bad news. The good news is that if you inadvertently shut down the applet by browsing to another window, you can reload the file you were working on without losing data. You will be called upon to run this scenario shortly, so don't change any data for the moment.
To the right of the Document: Scenario01 component is a show-content icon (). Clicking on this icon reveals the child items shown in Figure 3. Notice that the show/expand icon toggles to a hide/collapse icon ().
Expand Attributes by clicking on the item's icon. This action reveals the document-attribute editing panel pictured in Figure 4.
Attribute panels are the exception to the practice of saving changes immediately to file. Within any attribute panel, you make whatever attribute changes you wish and then click on . The editor checks your choices. Only if it agrees with these choices does the editor save the changed attribute values to file.
The document attributes include:
Continue your tour by hiding () the attributes panel, then expanding () the Beat Types collection. The editor should now appear as pictured in Figure 5.
Six new control icons are revealed in Figure 5:
Were just looking right now, so don't touch ANY of these. Instead, click on for Beat Type #0: 16. Next, click on for the Attributes item. The editor should now appear as pictured in Figure 6.
Beat Type attributes include:
Collapse () the Beat Type collection and expand () the Event Type collection. Next, reveal the attributes panel for Event Type #2: A. The editor should now appear as pictured in Figure 7.
Each Event Type item has seven attributes:
Collapse () the Event Type collection and expand () the Chromas collection. Next, reveal the attributes panel for Chroma #0. The editor should now appear as pictured in Figure 8.
Figure 8 displays 12 Chroma instances, once for reach degree of the chromatic
scale. Each Chroma instance has ID and Weight instances. The weights
Rhythm-Scenario01.xml are all set to unity.
Collapse () the Chromas collection and expand () the Streams collection. Next, reveal the attributes panel for Stream #1: Bells. The editor should now appear as pictured in Figure 9.
Streams have five attributes:
Every Stream contains one or more Sounds. Figure 10 shows the Sounds for Stream #1: Bells. Sounds have three attributes:
Figure 11 shows the two event-type nominating grammars for Scenario #1. Grammar #1: Cadence applies only to the final Pulse in the scenario; all other Pulses reference Grammar #2: Content.
Grammars provide instructions for nominating Event Types for cells in the stream/pulse grid. Every Grammar starts with a “Root” group, such as the one shown for Grammar #2: Content in Figure 12. Each Member defined under the “Root” group can be either a Group implementing a fresh decision-making tier or a Stream reference. As Figure 12 shows, the Members for Scenario #1 all reference Streams.
In Scenario #1's single-tier content grammar, nominating an Event Type involves drilling down first to the Member associated with the current Stream, and next to the item referencing the current pulse's Beat Type. Each Beat Type item contains the subcollection of Event Type productions which will be nominated in the current circumstance. Figure 13 shows this drill down for Beat Type and Stream #1: Bells and Beat Type #5: M. In this circumstance the only appropriate Event Type is “Attack” which production has unit weight.
The Pulses collection defines the metric framework for the scenario. Figure 14 shows the first few Pulses for Scenario #1. Each pulse references a Duration, a Beat Type, and a Grammar.
This completes your tour. Please hide everything but the top-level Document.
The viewer/editor toured in the previous section is embedded within the first
of two tabbed panels named Configuration and Animation.
The Animation panel was initially grayed out (see Figure 1)
but came active immediately after
Rhythm-Scenario01.xml was loaded (see Figure 2).
However, the Animation panel only became active because the applet verified
that all the components in
Rhythm-Scenario01.xml were properly defined.
Now is the time to click on the tab named Animation.
The Animation panel pictured in Figure 15 splits into an upper panel showing the Stream/Pulse grid, a middle panel showing the current status, and a lower panel listing Violations. Beneath the Violations list lie six buttons. The first four of these buttons control the animation:
|Evaluate the next pitch option.|
|Complete selecting pitches for the current Pulse.|
|Complete the entire voice-leading exercise at leisurely speed.|
|Complete the entire voice-leading exercise at high speed.|
The goal of the animation is to choose an Event Type for cell of the Stream/Pulse grid. Clicking on displays individual Event Types as they are being considered. Figure 11 shows what the applet presents to me after clicking once on .
The blue border around the upper left cell of the grid in Figure 11indicates that the rhythm generator is currently considering Event Types for the Bells stream under Pulse #1.
The status panel in Figure 11 informs us that the event engine is working on Pulse #1 whose Beat Type is “M”. The three Attacks values reflect the fact that all four streams initiate attacks when the Beat Type is “M”. Likewise for the Sounds values, which limit the total of attacks plus ties for Pulse #1.
The status panel further informs us that the event engine has elected to compose the events under Pulse #1 in the stream sequence Bells, Steel Drum, Timpani, Electric Piano. The the order of stream consideration is determined by Urgency value listed underneath each stream name. Underneath this Urgency value is a list of Event Types nominated for the stream.
The blue rectangle surrounding Bells confirms that this is the stream currently being processed. Only one Event Type option is available for consideration: (Attack), and the blue rectangle around the icon indicates that this is the option being considered. The fact that no Violations are listed means that this option passes muster, therefore the rhythm generator may freely advance to the Steel Drum stream.In general, changing the Seed and Heterogeneity settings in the document attributes panel (Figure 4) will produce different solutions. However the Grammars for Scenario #1 do not permit any discretion to the decision engine, so only one solution can result.
Click several times on . You will notice that there is always exactly one
option available to each decision. That is the nature of
Now try clicking on . The rhythm generator works through all of the streams in each pulse before stopping.
Finally, click on to animate the remainder of the rhythm-generating run at a leisurely rate. (For a faster rate, use .) The completed display appears in Figure 12.
Rhythm-Scenario01.xmlexample after the rhythm-generating run has completed.
Notice that the animation-controlling buttons are all grayed out but that two other buttons have now come active:
Click on to hear a MIDI rendition of the example.
Click on to save a MIDI rendition of the example to a file named
To clear the display panel and re-experience the same solution, toggle back and forth between the Configuration and Animation tabs. To obtain a different solution, you must change the Seed value in the document Attributes panel.
This portion of the instructions explains how to create the
Rhythm-Scenario03.xml example from scratch.
This scenario is explained on the topic page.
You need to read that explanation before you undertake the procedures described here.
It will be helpful, but not required, to have read Viewing the Configuration.
Full disclaimer: I created all of the scenario files provided with this attraction using Java programs. This eliminated a lot of tedium, especially where all four streams used identical Event Type productions. I personally used the graphic editor for the first time while preparing these instructions, so I can attest that the functionality works. Much tedium would be eliminated if the graphic editor implemented copy-and-paste features. If you desire such, contact me using the email address given on the Home Page.
Scenario #3 was chosen in favor of Scenario #1 because Scenario #3 demonstrates tiered grammars which are not limited
to Hobson's choice.
Make sure you're viewing the Configuration panel.
To create a new file, click on .
Use the file chooser to locate your working directory and name the file
If a file with the same name already exists, overwrite it. (You can always re-download the original.)
The editor should now resemble Figure 15.
Notice the icon, located just right of the Document: Scenario03 component. This is the show/expand icon. Click on it. The editor should now resemble Figure 16.
The first thing to do is select document attributes. To reveal the document attributes panel, click on the the show/expand icon () to the right of the Attributes item. The editor should now resemble Figure 17.
The purposes of the document attributes are explained above. Change both Event Heterogeneity and Sound Heterogeneity to 1.0. Change the Measure Level to 3 and the Beat Level to 2. Click on to save your changes.
The attributes panel should now resemble Figure 18. Use the hide/collapse icon () to hide these document attributes.
The next task it to create the repertory of Beat Types. To undertake this task you will need the Beat Types table from the topic page. Open this link under a separate browser tab.
Locate the Beat Types collection and click on the new-item icon (). A New Beat Type dialog will appear. Accept the default ID (1) but change the Name to “16”. Then click on . Continue creating Beat Types using default id's and the names listed on the other browser tab. When you're done, the display should resemble Figure 19: Six Beat Types in all, with id's ranging from 1 to 7. Notice there's no Save option. Each time you create a new Beat Type, the change will immediately be recorded in the underlying file.
Now it's time to fill in Beat Type attributes. Expand Beat Type #0: 16 to reveal its child Attributes item, then expand Attributes. Set the Description to “Other Sixteenth”, leave the Level at 0, then click on . The panel should now resemble Figure 20.
Fill in the Description and Level for each remaining Beat Type using descriptions and the levels listed on the other browser tab. Remember to click on each time. Finally collapse the Beat Type collection and close the browser window listing Beat Types.
The next task it to create the repertory of Event Types. Event types for Scenario #3 are detailed in Table 14 on the topic page.
The Event Types collection is somewhat confusing because the Event Type names are not actually used in the animation display and since items within the collection display Event Type descriptions (intially blank) rather than Event Type names.
Locate the Event Types collection and click on the new-item icon (). A New Event Type dialog will appear. Accept the default ID (0) but change the Mode to “REST” and the Name to “R”. Then click on . Continue creating Event Types named &lquo;-” with mode “TIE”, “A” with mode “ATTACK”, “S” with mode “ATTACK”, “I” with mode “ATTACK”, “Q” with mode “ATTACK”, and “H” with mode “ATTACK”. Accept the default ID in each instance. When you're done, the display should resemble Figure 21.
There are three basic event types and four meta event types. Attribute panels for the basic event types appear in Figure 22. All have Default for Category checked.
Attribute panels for the meta event types appear in Figure 23. All have Default for Category unchecked. Each meta type lists references in its Source Beat Types and Target Beat Types collections. To reference a Beat Type, click on the collection.s new-item icon (). A New Beat Type Reference dialog will appear. Use the drop-down to select the Beat Types reference you wish to include, the click on .
The Chromas collection should have six members, each with unit weight. Locate the Chromas collection and click on the new-item icon (). A New Chroma dialog will appear. Accept the default ID (0) and click on . Repeat these steps until the Chromas collection has six members with id's ranging from 0 to 5. When you're done, the display should resemble Figure 24.
Weight is the sole Chroma attribute. You can verify that each new Weight defaults to unity by revealing the attributes panel of any Chroma just created. Wrap up this step by collapsing () the Chromas collection.
The Streams collection should have four members named “Cowbell”, “Claves”, “Clap”, and “Toms”. Locate the Streams collection and click on the new-item icon (). A New Stream dialog will appear. Accept the default ID (1) but change the Name to “Cowbell”. Click on . Repeat these steps for “Claves”, “Clap”, and “Toms”. When you're done, the display should resemble Figure 25.
Figure 26 displays the Stream and Sound attributes. All four Streams have their Percussion box checked. The “Cowbell”, “Claves”, and “Clap” Streams each have only one Sound, while the “Toms” Stream has three Sounds.
Fill in the indicated Stream attributes, then add the indicated Sounds. Finally, collapse () the Streams collection
The Grammars collection should have two members named “Cadence”, and “Content”. Locate the Grammars collection and click on the new-item icon (). A New Grammar dialog will appear. Accept the default ID (1) but change the Name to “Cadence”. Click on . Repeat this step to create a second Grammars named “Content” with ID 2. When you're done, the display should resemble Figure 27.
We begin by creating the “Cadence” grammar, whose productions are described in Table 5 of the topic page. Every Grammar has a “Root” group item beneath which the top-tier productions are defined. Reveal the attributes panel for this “Root” item by expanding in turn, Grammar #1: Cadence, Groups, Group #1: Root and Attributes. Change the “Root” item's Group Type from “INDEPENDENT” to “INTERACTING” and click on . The display should now resemble Figure 28.
The “Root” Members collection should have one member for each Stream in Scenario #3. To add the first member, hide the attributes panel, then click on the new-item icon () for Members. A New Member dialog will appear. Set the Mode to “Stream”. Accept the default ID (1) and make sure “Cowbell” is selected in the Stream drop-down. Click on . Repeat this step for each remaining Stream: “Claves” with ID 2, “Clap” with ID 3, and “Toms” with ID 4. When you're done, the display should resemble Figure 29.
Drill down from Stream #1: Cowbell to the Beat Types collection by expanding in turn, Stream #1: Cowbell, Contexts, and Context. The display should resemble Figure 30. Notice that Group #1: Root has no Contexts collection. The Stream #1: Cowbell member has such a collection, but as a first-tier item it contains just one unnamed Context — you cannot add any others. It is only at the second tier and below that one finds multiple Contexts referencing specific Event Types.
This collection reference every Beat Type in Scenario #3. To add the first reference, click on the new-item icon (). A New Beat Type Reference dialog will appear. Make sure “BeatType #0: 16” is selected in the Reference drop-down. Click on . Repeat this step for each remaining Beat Type. When you're done, the display should resemble Figure 31.
According to Table 5 on the topic page, Beat Types “16”, “16*” “8”, “8*”, and “Q” should produce Event Type “Tie” while Beat Type “M” should produce Event Type “Attack”.
To add an Event Type production to Beat Type “16”, first expand Beat Type #0: 16 to reveal its child Event Types collection (see Figure 32),
Click on the new-item icon (). A New Event Type Reference dialog will appear. Make sure “EventType #1: 16” is selected in the Reference drop-down. Click on . Repeat this step, adding the appropriate Event Type reference to each remaining Beat Type. When you're done, the display should resemble Figure 33 except in two particulars: I have expanded Event Type #1: Tie under Beat Type #0: 16 and Event Type #2: Attack under Beat Type #5: M to reveal the weight contours of these two Event Type productions.
Notice Event Types production weights are capable of evolving over time. Although this feature seemed slick when I was implementingit, I have not yet personally exploited this feature, and probably will never do so. For now, let us just take Figure 33 as confirmation that Event Types weights default to unity. We'll deal with non-uniform weights in connection with Grammar #2: Content.
Repeat the steps just described for Stream #1: Cowbell for the remaining root members, Stream #2: Claves, Stream #3: Clap, and Stream #4: Toms.
The “Content” grammar for scenario #3 has two tiers. The two tiers are detailed by two tables on the topic page. For the upper tier, see Table 15. For the lower tier, see Table 16. Figure 34 shows the tiered structure of Grammar #2: Content.
Since most Grammar editing features were explained previously in connection to “Cadence”, I'm going to power through this second grammar.
The display should now resemble Figure 34.
Drill down to the Beat Types collection for Group #1: Meta Cowbell by expanding Group #1: Meta Cowbell, Contexts, Context, and Beat Types follow the instructions to fill this list with references to every Beat Type defined for this scenario. The display should now resemble Figure 35.
Reference Table 15 from the topic page to determine that the event type productions should be “Sixteenth-Note Motion” with weight 1 and “Tie” with weight 3. Expand Beat Type #0: 16 and use the New Event Type dialog to create productions for “Event Type #3: S” (sixteenth-note motion) and “Event Type #1: -” (tie). Expand the weight contours of each new production.
By default, both weight contours shown in Figure 35 sustain constant unit values. However, the weight for “Tie” is supposed to be 3. To make this change, locate the weight contour for Event Type #1: Tie and click on the . A Weight Origin dialog will appear. Accept the default time of negative infinity (-∞) but change the Origin to 3. Click on
Continue adding event type productions as per Table 15 from the topic page. Figure 36 shows all Beat Type/Event Type combinations. Be sure to change the weight for Event Type #1: Tie under Beat Type #1: 16* to 3, and the weights for Event Type #1: Tie under Beat Type #2: 8 and Beat Type #3: 8* to 2.
This concludes the context productions for Group #1: Meta Cowbell. Replicate these context productions for the three other “Meta” groups.
Now for the second tier. Collapse all items under the four “Meta” groups, then drill down to the Contexts collection for Stream #1: Cowbell by expanding in turn Group #1: Meta Cowbell, Members, and Stream #1: Cowbell.
You're finally done building the Grammars collection. Collapse () all items under this collection.
Locate the Pulses collection and click on the new-item icon (). A New Pulse dialog will appear. Accept the default ID (0) and click on . Repeat these steps until the Pulses collection has 33 members with id's ranging from 1 to 33.
To fill in pulse attributes you will need the metric framework table from the topic page. Open this link under a separate browser tab. Expand the attributes panel for each Pulse and configure these as indicated in the table. Figure 38 shows the completed attributes panel for Pulse #1. Pulses 1-32 should all reference “RhythmGrammar #2: Content”.
As Figure 38 shows, the final Pulse #33 should have Duration “H”, referencing “RhythmBeatType #1: M” and “RhythmGrammar #1: Cadence”
If the Animation tab is grayed out, click on click on
to obtain a list of errors. Such errors usually involve components missing necessary child components. Fix them.
When the Animation tab becomes available, you are done creating
|© Charles Ames||Page created: 2013-12-05||Last updated: 2015-08-25|