The musical calculator applet allows you to design your own calculators to process musical elements. Each of your calculators will be stored in a file on your own computer. 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.7 of the musical calculator differs only from the preceding version 1.0.6. in 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.
Initially, the applet should look as in Figure 1.
In this exercise, you will create a new calculator named “Musicalc-Try1”. This calculator will transpose a sequence of pitches by an indicated interval. Start by clicking on . Use the file chooser to locate your working directory and create a new XML file named “Musicalc-Try1”. As Figure 2 shows, the initial diagram will display a Document unit with an empty drop-down and a dangling input link.
Use the drop down to select what type of data you want to work with. You cannot create an input to your document until you have made this decision. Three options are offered:
Choosing Pitch alters the document as shown in Figure 3. Notice that there is NO save button. Excepting text fields, changes made within any unit immediately are immediately recorded in the underlying file.
To create an input for the unit, click on the icon. The applet responds with the Select Input for Document illustrated in Figure 4.
The dialog offers you three unit types:
Transposing a pitch sequence requires two inputs, the original pitch sequence and the transposition interval. Since Binary operations have two inputs, that is the option to choose. Once you have made your choice, the diagram adjusts as shown in Figure 5.
Document unit is now linked to a
Binary input, and the link between the
two units now displays a delete-unit icon ().
Notice that data-type drop down is greyed out.
Binary unit has two dangling links ending in add-unit icons ().
Binary also provides a drop-down for selecting which operation to employ.
The musical operation of transposition corresponds to the mathematical operation of addition, so
ADD is the operation you want.
This step creates editable text fields for each of the Binary unit's input. To create a field for the first input, click on the upper . A Select Input for Binary Operation dialog will appear. Select the Field unit type, then click on .
Use the same actions to create a second Field unit for the second Binary input. The diagram should now resemble Figure 6.
The original pitch sequence for
Musicalc-Try1.xml will be the first 12 pitches of the overtone series built on G1:
(These values come from a posting by Jørgen Mortensen.) Copy this text and paste it into the Binary unit's first Field input. The text field is not wide enough to display all these characters, but they can be pasted in nonetheless.
Confirm your data by clicking on . This causes the editor to parse your input and verify that each element is a proper pitch indication. Failure would provoke an error message, but I've already tried out this text.
Complete your data entry by specifying a transposition interval in the Binary unit's second Field input. There is no separate notation for pitch intervals, but pitch indications can also represent intervals if you treat them as displacements from middle C. Thus C4 (middle C itself) indicates the interval of a unison, while F3 indicates a descending perfect fifith. Use this second value as your transposition interval, and remember to click on . The diagram should now resemble Figure 7.
Notice that two new icons appeared when you submitted the transposition interval: one in the Document and the other in the Binary unit. Run icons only appear when all units are fully connected and when all Field text parses properly. If you think you're done but no icons are present, you can use the button to locate the reason.
Click on in the Document unit to run the calculator. ( in other units will display intermediate results in the green-bordered field.) The message dialog illustrated in Figure 8 will present the results.
|© Charles Ames||Page created: 2013-08-22||Last updated: 2015-03-12|