Chin Ting Chan | composer
  • Home。主頁
  • About。簡介
  • Music。音樂
    • Large Ensemble >
      • Deform and Reform
      • Qing Ming
      • Dust Devil
      • Untitled
      • Falling Stars
      • Shadow Play
      • time, unfolding
      • Veiled Light
      • Apparitions - a fantasy for chamber ensemble
      • Fanfare for Brass and Percussion
      • Symphonic Movements
    • Chamber >
      • Invisible Canvas
      • flying ink, fainting light
      • Fracture
      • fuse V
      • fuse IV
      • fuse III
      • fuse II
      • fuse
      • In-pulse
      • Don't Look
      • Ictus
      • (dif)fused
      • Double Exposure
      • Flying Ink
      • Fractals
      • Double Waves
      • Drift
      • reaching up, touching down
      • Friction
      • Cross-strings
      • Thread
      • Axis
      • Mirage
      • re[sou]nding
      • Crosswind
      • Anemoi
      • ...and see it vanish
      • Icebergs
      • Moments
      • Haengma
      • Acoustic Field
      • Five Songs of the Von Seggerns
      • Saxophone Quartet
      • Elegy for Clarinet and Piano
      • Transfiguration
      • Caprice for String Quartet
      • Duo for Two Flutists
      • Trio for Violin, Clarinet and Marimba
      • Trio for Horn, Cello and Piano
      • Woodwind Quintet in C
      • String Quartet in A minor
    • Solo >
      • Ripple
      • Insight I
      • Flare
      • Postcards
      • Central
      • ...remembering Glenn
      • Cross-currents
      • Flurry
      • Shape of Wind
      • Shattered Wind
      • Five Etudes for Solo Piano
      • Suite for Solo Cello
      • Fantasy for Solo B-flat Clarinet
    • Electroacoustic >
      • Water Dust
      • Glitchdrops
      • Resonant Collision IV
      • Resonant Collision III
      • Resonant Collision II
      • Resonant Collision
      • 52 Blue
      • Mirror Sculpture
      • Shadow Objects
      • Stutter
      • Reel
      • Elements
      • Moment Studies
      • Static
      • Rituals
      • tempora mutantur
      • Whispers of Time
      • time, forward
      • Katachi IV
      • Stargaze
      • Katachi III
      • Katachi II
      • Katachi I
      • Awakening
      • Improvisations
      • Oceanus
      • Zone 23
      • Of Metals and Electrons
      • Three Episodes
  • Listen。聆聽
  • software。程式
    • mapping
    • matrixes
    • multiplication
    • pitch sets
    • set variants
  • Contact。聯絡

​​composing tools for the command line

Title: "ctools"
Version: 2.0
Year: 2015-2016
Development Language: C++
Platform: Mac OSX/Windows
Interface: CLI
Description: This program lets you construct pitch sets, rows or matrixes from input, then display them or outputs them to a text file in the same directory. There are thirteen sub-programs available.
​

Download the latest build release for Max OSX (2016-04-17): ctools-2.0-release-Mac.zip
Download the latest build release for Windows 10 (2016-04-17): ctools-2.0-release-Win.zip

10. Compute the prime set from a given set

This program calculates the Prime Set of a given set. It first populates a two-dimensional array with all possible transpositions of all normal sets, then it subtracts the sets with the smallest pitch in each, reducing them to all start on pitch 0, before doing an insertion sort of all the sets. Insertion sorts of arrays and two-dimensional arrays are embedded in one function, where it access the private members from the Modules object:
void Modules::sortRow(int choice) {
      if (choice == 1) {
            for (int i = 0; i < rowSize; i++) { // insertion sort of rowPrime
                   int j = i;
                   while (j > 0 && rowPrime[j] < rowPrime[j - 1]) {
                         swap(rowPrime[j], rowPrime[j - 1]);
                         j--;
                   }
            }
      } else {
            for (int k = 0; k < rowSize * 4; k++) { // insertion sort of all normal sets
                  for (int i = 0; i < rowSize; i++) {
                        int j = i;
                        while (j > 0 && rowMulti[k][j] < rowMulti[k][j - 1]) {
                              swap(rowMulti[k][j], rowMulti[k][j - 1]);
                              j--;
                        }
                  }
            }
      }
​}
Then, the program stores the positions in the two-dimensional array where the smallest outer pitches occur. Using those positions and the above process again, the program finds where the smallest pitches occur starting on the first pitch, then the second pitch, etc., until it finds a position where all pitches are smallest.
int position = 0;
int posarr[48]; // store the smallest numbers from each column
smallest = 12;
// find smallest pitch on last column of all rows
for (int i = 0; i < module.getrowsize(1) * 4; i++)
      smallest = (module.getmultirow(i, module.getrowsize(1) - 1) < smallest) ? module.getmultirow(i, module.getrowsize(1) - 1) : smallest;
// store the positions where the smallest outer pitch occurs
// if the position's value is not the smallest, store -1
for (int i = 0; i < module.getrowsize(1) * 4; i++)
      posarr[i] = (module.getmultirow(i, module.getrowsize(1) - 1) == smallest) ? i : -1;

int column = 1; // start the above process again on second pitch
while (column < module.getrowsize(1) - 1) {
      smallest = 12; // initialize smallest to 12 every time
      // find smallest pitch on each column
      for (int i = 0; i < module.getrowsize(1) * 4; i++) {
            if (posarr[i] >= 0) // only check posarr[i] that are positive
                  smallest = (module.getmultirow(posarr[i], column) < smallest) ? module.getmultirow(posarr[i], column) : smallest;
      }
      // store the positions where the smallest 2nd pitch occurs
      // when the loop comes back, it finds smallest 3rd pitch, etc, but only on positions
      // where the previous pitch is smallest
      for (int i = 0; i < module.getrowsize(1) * 4; i++) {
            if (posarr[i] >= 0) // only check posarr[i] that are positive
                  posarr[i] = (module.getmultirow(posarr[i], column) == smallest) ? i : -1;
      }
      column++;
​}

11. Print the table of pitch class sets

This program prints out a table of all pitch class sets. They are complimented with commentaries by theorist Larry Solomon. More info can found here.
Powered by Create your own unique website with customizable templates.
  • Home。主頁
  • About。簡介
  • Music。音樂
    • Large Ensemble >
      • Deform and Reform
      • Qing Ming
      • Dust Devil
      • Untitled
      • Falling Stars
      • Shadow Play
      • time, unfolding
      • Veiled Light
      • Apparitions - a fantasy for chamber ensemble
      • Fanfare for Brass and Percussion
      • Symphonic Movements
    • Chamber >
      • Invisible Canvas
      • flying ink, fainting light
      • Fracture
      • fuse V
      • fuse IV
      • fuse III
      • fuse II
      • fuse
      • In-pulse
      • Don't Look
      • Ictus
      • (dif)fused
      • Double Exposure
      • Flying Ink
      • Fractals
      • Double Waves
      • Drift
      • reaching up, touching down
      • Friction
      • Cross-strings
      • Thread
      • Axis
      • Mirage
      • re[sou]nding
      • Crosswind
      • Anemoi
      • ...and see it vanish
      • Icebergs
      • Moments
      • Haengma
      • Acoustic Field
      • Five Songs of the Von Seggerns
      • Saxophone Quartet
      • Elegy for Clarinet and Piano
      • Transfiguration
      • Caprice for String Quartet
      • Duo for Two Flutists
      • Trio for Violin, Clarinet and Marimba
      • Trio for Horn, Cello and Piano
      • Woodwind Quintet in C
      • String Quartet in A minor
    • Solo >
      • Ripple
      • Insight I
      • Flare
      • Postcards
      • Central
      • ...remembering Glenn
      • Cross-currents
      • Flurry
      • Shape of Wind
      • Shattered Wind
      • Five Etudes for Solo Piano
      • Suite for Solo Cello
      • Fantasy for Solo B-flat Clarinet
    • Electroacoustic >
      • Water Dust
      • Glitchdrops
      • Resonant Collision IV
      • Resonant Collision III
      • Resonant Collision II
      • Resonant Collision
      • 52 Blue
      • Mirror Sculpture
      • Shadow Objects
      • Stutter
      • Reel
      • Elements
      • Moment Studies
      • Static
      • Rituals
      • tempora mutantur
      • Whispers of Time
      • time, forward
      • Katachi IV
      • Stargaze
      • Katachi III
      • Katachi II
      • Katachi I
      • Awakening
      • Improvisations
      • Oceanus
      • Zone 23
      • Of Metals and Electrons
      • Three Episodes
  • Listen。聆聽
  • software。程式
    • mapping
    • matrixes
    • multiplication
    • pitch sets
    • set variants
  • Contact。聯絡