File/input_output.inc.php

Description

Contains functions for overall program logic, user input and program output

Functions
changebyhand (line 118)

Add pitches to or remove pitches from chord by hand

  • return: array representing a chord structure
array changebyhand (array $chordrec, mixed $fh)
  • array $chordrec: array representing a chord structure
  • mixed $fh: file handle (if program output is to be saved to file) or bool FALSE if not
choosestartingposition (line 74)

Receive a string representing a chord from the user, return array with analysis

  • return: array representing a chord structure
array choosestartingposition ()
decidewhethertoprint (line 147)

Receive user input to decide if results are to be saved to file

  • return: file handle (if program output is to be saved to file) or bool FALSE if not
mixed decidewhethertoprint ()
introduction (line 198)

Five screens of introductory text

void introduction ()
makechoice (line 183)

Utility function to keep repeating a prompt string until a valid choice has been made by the user

  • return: user input
string makechoice (array $validchoice, string $promptstring)
  • array $validchoice: array with valid user input
  • string $promptstring: prompt string asking for user input
work (line 23)

Program flow and user interaction related to working with chords

  • global: last_fed_in_chord $last_fed_in_chord: used to save original chord provided by the user
void work (bool $newchord, mixed $fh)
  • bool $newchord: whether the user has entered a new chord, or if the last entered chord should be reused
  • mixed $fh: file handle (if program output is to be saved to file) or bool FALSE if not
writestructure (line 92)

Write chord analysis to screen and file

void writestructure (array $chordrec, mixed $fh)
  • array $chordrec: array representing a chord structure
  • mixed $fh: file handle (if program output is to be saved to file) or bool FALSE if not

Documentation generated on Sun, 26 Nov 2006 14:27:07 +0100 by phpDocumentor 1.3.1