C:/Musimathics_local/Musimat/MusimatChapter9/C091102.cpp File Reference

#include "MusimatChapter9.h"

Go to the source code of this file.

Functions

 MusimatChapter9Section (C091102)
IntegerMatrix setComplex (IntegerList prime)
Static Void para1 ()
IntegerList getPC (PitchList p)
Void generateSetComplex (PitchList P)
Static Void para2 ()


Function Documentation

Void generateSetComplex ( PitchList  P  ) 

Definition at line 99 of file C091102.cpp.

References getPC(), setComplex(), and transpose().

00099                                      {
00100         IntegerList set = getPC(P);
00101         Print("Starting set:", set);
00102         Integer offset = set[0];
00103         IntegerList tSet = transpose(set, -offset);
00104         Print("Transposed set:", tSet);
00105         IntegerMatrix sc = setComplex( tSet );
00106         Print("Set complex:");
00107         Print(sc);
00108 }

IntegerList getPC ( PitchList  p  ) 

Definition at line 91 of file C091102.cpp.

References x.

00091                                {
00092         IntegerList x;
00093         For (Integer i = 0; i < Length(p); i++)
00094                 x[i] = PitchClass(p[i]) + Accidental( p[i] );
00095         Return( x );
00096 }

MusimatChapter9Section ( C091102   ) 

Definition at line 2 of file C091102.cpp.

References para1(), and para2().

00002                                 {
00003 Print("*** 9.11.2 The Set Complex ***");
00004 /*****************************************************************************
00005 
00006 9.11.2 The Set Complex
00007 
00008 Using these tools, we can create a matrix containing the prime form, inverse, 
00009 retrograde, and all transpositions of any row, called the set complex. The 
00010 purpose of these transformations is to generate variants that are related to 
00011 the original intervallic structure of the prime row, to be used as material 
00012 in developing compositions.
00013 
00014 Matrix is simply a two-dimensional grid, or list of lists, all of the same 
00015 length. The individual elements of Matrix can be accessed by extending the 
00016 index operator […]. The first operand is the matrix, the second is the row 
00017 position, and the third is the column position. (Whether row or column comes 
00018 first is arbitrary. The following order is called row/column order.)   
00019 
00020                 0       1
00021 M =     0       A       B
00022         1       C       D
00023 
00024 For example, for this matrix, M[0][0] == A, M[0][1] == B, M[1][0] == C, and 
00025 M[1][1] == D. The following is a method for creating a set complex. It 
00026 basically copies the prime form to the zeroth row, then copies the inverse 
00027 form to the zeroth column, then for each other cell in the matrix sums the 
00028 corresponding row and column value modulo the length of the prime form:
00029 *****************************************************************************/
00030         para1(); // Step into this function to continue.
00031         para2(); // Step into this function to continue.
00032 }

Static Void para1 (  ) 

Definition at line 56 of file C091102.cpp.

00056                     {
00057 /*****************************************************************************
00058 To demonstrate these tools, table 9.4 shows the set complex the following row: 
00059         (G, As, B, F, E, Cs, C, A, Gs, D, Ds, Fs) 
00060 o  Prime rows are read left to right, 
00061 o  Retrograde rows, right to left 
00062 o  Inverse rows, top to bottom, 
00063 o  Retrograde inverse rows, bottom to top.
00064 This completes the precomposition phase. Now it’s time to look at methods to 
00065 traverse the rows created with the preceding techniques to generate a 
00066 composition.
00067 
00068 Table 9.4 Set Complex
00069 {0, 3, 4, 10, 9, 6, 5, 2, 1, 7, 8, 11}
00070 {9, 0, 1, 7, 6, 3, 2, 11, 10, 4, 5, 8}
00071 {8, 11, 0, 6, 5, 2, 1, 10, 9, 3, 4, 7}
00072 {2, 5, 6, 0, 11, 8, 7, 4, 3, 9, 10, 1}
00073 {3, 6, 7, 1, 0, 9, 8, 5, 4, 10, 11, 2}
00074 {6, 9, 10, 4, 3, 0, 11, 8, 7, 1, 2, 5}
00075 {7, 10, 11, 5, 4, 1, 0, 9, 8, 2, 3, 6}
00076 {10, 1, 2, 8, 7, 4, 3, 0, 11, 5, 6, 9}
00077 {11, 2, 3, 9, 8, 5, 4, 1, 0, 6, 7, 10}
00078 {5, 8, 9, 3, 2, 11, 10, 7, 6, 0, 1, 4}
00079 {4, 7, 8, 2, 1, 10, 9, 6, 5, 11, 0, 3}
00080 {1, 4, 5, 11, 10, 7, 6, 3, 2, 8, 9, 0}
00081 
00082 The functions below perform steps in preparation for calling setComplex().
00083 getPC() converts a PitchList to an IntegerList by summing the diatonic
00084 pitch class and accidental of the Pitch.
00085 generateSetComplex() first calls getPC() to convert the Pitch list to
00086 an IntegerList, then transposes the resulting set, then
00087 invokes setComplex() to generate the set complex Matrix.
00088 *****************************************************************************/
00089 }

Static Void para2 (  ) 

Definition at line 110 of file C091102.cpp.

References generateSetComplex().

00110                     {
00111 /*****************************************************************************
00112 Here we evaluate the set complex for our test set.
00113 *****************************************************************************/
00114         PitchList test(G, As, B, F, E, Cs, C, A, Gs, D, Ds, Fs);
00115         Print("*** Pitch classes for test ***");
00116         Print(test);
00117         generateSetComplex(test);
00118 
00119 }}

IntegerMatrix setComplex ( IntegerList  prime  ) 

Definition at line 34 of file C091102.cpp.

References a, b, and invert().

00034                                             {
00035         Print("Prime row:", prime);
00036         Integer len = Length(prime);
00037         IntegerMatrix M(len, len);
00038         IntegerList inverted = invert(prime);
00039         Print("Inverted row:", inverted);
00040         For (Integer i = 0; i < len; i = i + 1) {
00041                  M[0][i] = prime[i];
00042                  M[i][0] = inverted[i];
00043         }
00044         For (Integer i = 1; i < len; i = i + 1) {
00045                 For (Integer j = 1; j < len; j = j + 1) {
00046                         Integer a = M[i][0];
00047                         Integer b = M[0][j];
00048                         // M(i,j) = Mod(M(i,0) + M(0,j), len);
00049                         M[i][j] = Mod(a + b, len);
00050                 }
00051         }
00052         Return(M);
00053 }


Generated on Fri Sep 8 23:11:08 2006 for Musimat Chapter 9 Code Examples by  doxygen 1.4.7