athenaCL Tutorial Manual: Second Edition, Version 1.4.8 | ||
---|---|---|
Prev | Chapter 1. Tutorial 1: The Interactive Command Line Interface | Next |
To use a command, simply enter its name. The user will be prompted for all additional information. For example, type "SCv" (or "scv") at the athenaCL prompt:
Example 1-3. Entering a command
[PI()TI()] :: scv enter a pitch set, sieve, or set-class: C, C#, F SC 3-4A as (C4,C#4,F4)? (y, n, or cancel): y SC(3-4A), Z(none), mode(Tn) Pitch Space: (C4,C#4,F4) Pitch Class: (0,1,5) Normal Form: (0,1,5) Prime Form: (0,1,5) Invariance Vector: (1,0,1,0,5,6,5,6) Interval Class Vector: (1,0,0,1,1,0) References: name incomplete major-seventh chord Subset Vectors: 3CV(Tn) 0,0,0,0,0,1,0,0,0,0 - 0,0,0,0,0,0,0,0,0
This command prompts the user for a "pitch set, sieve, or set-class" and then displays the SetClass dictionary entry for the entered set. A Xenakis sieve (Xenakis 1990, 1992; Ariza 2004, 2005b) can be entered using a logical string and a pitch range. Set class labels are given using Forte names. The user may enter the chord itself as pitch-names (with sharps as "#" and flats as "$") or pitch-classes (integers that represent the notes of the chromatic scale) (Straus 1990). For instance, the chord D-major can be represented with the following pitch-name string: (D, F#, A). Or, the same chord can be represented as a pitch class set: (2,6,9), where 0 is always C, 1=C#, 2=D, …, 10=A#, and 11=B. Calling the SCv command again with this pitch class set gives us the following results:
Example 1-4. Entering a command with an argument
[PI()TI()] :: scv 2,6,9 SC(3-11B), Z(none), mode(Tn) Pitch Space: (D4,F#4,A4) Pitch Class: (2,6,9) Normal Form: (0,4,7) Prime Form: (0,3,7) Invariance Vector: (1,0,0,0,5,6,5,5) Interval Class Vector: (0,0,1,1,1,0) References: name major triad Subset Vectors: 3CV(Tn) 0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,1,0
Here the pitch-class set (2,6,9), the chord-type D-major, returns the entry for SetClass 3-11B, the chord-type of a major triad.
Notice that in the above example the pitch class set argument is entered at the same time as the command: "SCv 2,6,9". As an interactive command-line program, athenaCL can interactively obtain arguments from the user, and can, alternatively, accept space-separated arguments following a command. Command-line arguments allow advanced users ease and speed and, when called from an external environment (such as a UNIX shell or Python script), permit advanced scripting automation. All athenaCL commands can function both with arguments and with interactive prompts. Command-line arguments, however, are never required: if arguments are absent, the user is prompted for the necessary details.