| IMAGE AND SOUND FILES |
| ac_code_data.xls |
| ac_main.pdf |
| sonif1.wav |
| sonif2.wav |
| sonif2_1in_1out.wav |
| sonif2_1out.wav |
| sonif2_47in_51out.wav |
| sonif2_and_3.mp3 |
We have been investigating the sonification of program slices. The file list above, narrative below, and links in the narrative are intended to accompany the paper entitled "Listening to Program Slices."
A statement in a computer program can be used as a slice point. One or more variables in the statement are selected. The resulting program slice is the set of all statements that directly or indirectly impact the slice point with respect to the selected variable(s).
For the examples below, a slice of the open-source ACCT program was obtained. This PDF file is a listing of the file ac.c. The slice point is underlined in the method update_system_time. Code within its slice is shown in red. Data pertaining to each object (source file in this case) and method with respect to the slice is recorded in this Excel spreadsheet.This audio realization uses the first method of sonification described in the paper. The entire excerpt represents the main method in ac.c. Each note represents a single source statement. The sounds are separated into two groups of pitches, one higher, one lower. Each statement within the slice is represented by a note in the higher-pitched range. Each statement not in the slice is represented by a note in the lower-pitched range. The lexical order of the statements is mapped to the sequence of the notes. The example is a relatively fast-paced realization, which one would play to gain an overview of the method. One should be able to gain an impression of the following dimensions of the method:
| DIMENSION | SOUND CHARACTERISTIC |
| number of statements in the method | excerpt length (number of notes) |
| percent of statements within the slice | ratio of higher-pitched notes to total number of notes |
| homogeneity of slice or non-slice code | clustering of high or low pitched sounds |
The second sonification method presents each method as one sonic event, that event being composed of a fast succession of higher-pitched sounds and a fast succession of lower-pitched sounds. Again, higher-pitched sounds represent code in the slice, whilst lower-pitched sounds represent code not in the slice. One note represents up to ten statements. Thus, a method having from one to nine statements, all of which are outside the slice, is represented by this single, lower-pitched sound. A method having, say, five statements within the slice and nine statements outside the slice would be represented by this single, higher-pitced sound followed rapidly by a single, lower-pitched sound. The main method contains 47 statements that are in the slice and 51 statements that are outside of the slice. Thus, there are five higher notes followed by six lower notes, as heard in this realization. All of the methods in the object (source file in this case) ac.c are heard in this example. One should be able to gain impressions of these dimensions of each method:
| DIMENSION | SOUND CHARACTERISTIC |
| amount of code in slice | "density" of higher notes |
| amount of code outside slice | "density" of lower notes |
By "density," we mean the number of notes within each pitch range. The listener can determine that there is exactly zero or one note, but beyond that, we do not expect the listener to be able to count the number of notes, let along quickly multiply by ten. The listener will get an impression, not an exact number.
This method employs granular synthesis to produce a continuous cloud of sound. The mapping is as follows:
| number of statements in the object | pitch range the cloud covers (high is fixed, low is variable) |
| percent of the object's statements in the slice | density of the cloud |
| differentiation of objects | see following paragraph |
This example superimposes Method 2 in the foreground, as heard above, with Method 3 in the background. The different clouds allow the listener to determine when we progress from one object to another. The mappings appear at the bottom of the Excel spreadsheet.
Will post after the blind part of the evaluation process is complete.