- 276 -Mazzola, Guerino / Noll, Thomas / Lluis-Puebla, Emilio: Perspectives in Mathematical and Computational Music Theory 
  Erste Seite (1) Vorherige Seite (275)Nächste Seite (277) Letzte Seite (454)      Suchen  Nur aktuelle Seite durchsuchen Gesamtes Dokument durchsuchen     Aktuelle Seite drucken Hilfe 

Figure 2 shows an example of an OpenMusic patch that is directly mappable to the following shell script:

#!/bin/bash  
extract -f1 $1 | yank -o "^=" -r 1-2 >$1.12  
extract -f1 $1 | yank -o "^=" -r 3-4 >$1.34  
assemble $1.12 $1.34

The script extracts the first voice of a Kern score file, the name of which is given in the first argument. On the result it applies an operation that selects a range of barlines. Two such selections are pasted side by side for whatever study purposes. The data passing techniques used here are file redirection (through >), file referencing and the use of pipes (with |). The control flow techniques are linear (pipes, no keyword necessary in the patch) and parallel (sequence keyword in the patch, newlines in the script). Note that there need to be only one box for the two extract function calls.


Erste Seite (1) Vorherige Seite (275)Nächste Seite (277) Letzte Seite (454)      Suchen  Nur aktuelle Seite durchsuchen Gesamtes Dokument durchsuchen     Aktuelle Seite drucken Hilfe 
- 276 -Mazzola, Guerino / Noll, Thomas / Lluis-Puebla, Emilio: Perspectives in Mathematical and Computational Music Theory