#include "MusimatChapter9.h"Go to the source code of this file.
Functions | |
| MusimatChapter9Section (C091101) | |
| IntegerList | transpose (IntegerList L, Integer t) |
| Static Void | para1 () |
| IntegerList | invert (IntegerList L) |
| Static Void | para2 () |
| IntegerList | retrograde (IntegerList L) |
| Static Void | para3 () |
| IntegerList invert | ( | IntegerList | L | ) |
Definition at line 62 of file C091101.cpp.
00062 { 00063 For(Integer i = 0; i < Length(L); i = i + 1) 00064 L[i] = Mod(12 - L[i], 12); 00065 Return(L); 00066 }
| MusimatChapter9Section | ( | C091101 | ) |
Definition at line 2 of file C091101.cpp.
References para1(), para2(), and para3().
00002 { 00003 Print("*** 9.11.1 Precomposition ***"); 00004 /***************************************************************************** 00005 00006 9.11.1 Precomposition 00007 00008 The process of composing atonal music is typically divided into two parts. 00009 00010 o Precomposing: assembling the musical materials 00011 00012 o Composing: applying the assembled materials in a design 00013 00014 Musimat already has a number of data types and operations, but a few more are needed: 00015 00016 o To represent pitches as symbols with integer values, such as: 00017 00018 Integer C = 0, Cs = Db = 1, D = 2, Ds = Eb = 3 . . ., B = 11; 00019 00020 o To represent motives as lists, such as: 00021 00022 IntegerList a = {F, F, G, A}; 00023 IntegerList b = {F, A, G}; 00024 IntegerList c = {F, E}; 00025 IntegerList d = {Bb, A, G, F}; 00026 IntegerList e = {E, C, D, E, F, F}; 00027 00028 o To combine motives and concatenate lists: 00029 00030 IntegerList y = Join(a, b, a, c, a, d, e); 00031 00032 (y is defined as the list of pitches of the tune “Yankee Doodle.”) 00033 00034 The following function transposes a pitch set. 00035 *****************************************************************************/ 00036 para1(); // Step into this function to continue. 00037 para2(); // Step into this function to continue. 00038 para3(); // Step into this function to continue. 00039 }
| Static Void para1 | ( | ) |
Definition at line 47 of file C091101.cpp.
References transpose().
00047 { 00048 /***************************************************************************** 00049 Here is an example of transposing a list: 00050 *****************************************************************************/ 00051 00052 Print("*** Transposing a list ***"); 00053 IntegerList L( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ); 00054 Print("Original row:", L); 00055 Print("Row transposed by 6: ", transpose(L, 6) ); 00056 00057 /***************************************************************************** 00058 To invert a pitch set: 00059 *****************************************************************************/ 00060 }
| Static Void para2 | ( | ) |
Definition at line 68 of file C091101.cpp.
References invert().
00068 { 00069 /***************************************************************************** 00070 Here is an example of inverting a list: 00071 *****************************************************************************/ 00072 Print("*** Inverting a list ***"); 00073 IntegerList L( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ); 00074 Print("Original row:", L); 00075 Print( "Inverted row:", invert(L) ); 00076 00077 /***************************************************************************** 00078 To take the retrograde of a set: 00079 *****************************************************************************/ 00080 }
| Static Void para3 | ( | ) |
Definition at line 90 of file C091101.cpp.
00090 { 00091 /***************************************************************************** 00092 Here is an example of retrograding a list: 00093 *****************************************************************************/ 00094 Print("*** Retrograding a list ***"); 00095 IntegerList L( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ); 00096 Print("Original row:", L); 00097 Print( "Retrograded row:", retrograde(L) ); 00098 00099 }}
| IntegerList retrograde | ( | IntegerList | L | ) |
Definition at line 82 of file C091101.cpp.
References n().
00082 { 00083 Integer n = Length(L); 00084 IntegerList R = L; // make a new list as long as L 00085 For(Integer i = 0; i < n; i = i + 1) 00086 R[i] = L[n - i - 1]; 00087 Return(R); 00088 }
| IntegerList transpose | ( | IntegerList | L, | |
| Integer | t | |||
| ) |
Definition at line 41 of file C091101.cpp.
00041 { 00042 For(Integer i = 0; i < Length(L); i = i + 1) 00043 L[i] = PosMod(L[i] + t, 12); // BUG: given as Mod() in "Musimat", s.b. PosMod() 00044 Return(L); 00045 }
1.4.7