Class DSG_View

Description

View part of the Model-View-Controller setup for the Dissonance Grading package

Located in /includes/dsg_view.class.php (line 21)


	
			
Variable Summary
Method Summary
 DSG_View DSG_View (string $url)
 string getMIDItxt ()
 void setCurrentChord (array $chordrec)
 void setForm ()
 void setGetStringCompact (string $string)
 void setHistory (string $history)
 void setInitialForm ()
 void setLastFedInChord (array $chordrec)
 void setMIDIFilePath (string $filepath)
 void setSelectedPSMType (string $type)
 void setSound (bool $bool)
 void setTargetDSG (string $dsg)
 void setWarning (string $string)
 string _chordrectostring (array $chordrec)
 string _writestructure (array $chordrec)
Variables
string $dsgform (line 27)
  • var: HTML for the form to work with chords
  • access: public
array $_currentchordrec = array() (line 42)
  • var: current chord in array form (including analysis)
  • access: private
string $_currentchordstring = '' (line 37)
  • var: current chord in string form
  • access: private
string $_getstringcompact = '' (line 87)
  • var: compacted version of request array, to save history when going to documentation
  • access: private
string $_history = '' (line 52)
  • var: list of analysed chords so far
  • access: private
string $_lastfedinchordstring = '' (line 47)
  • var: the last manually entered chord in string form
  • access: private
string $_midi_file_path = '' (line 92)
  • var: src attribute for the embed element for MIDI files
  • access: private
string $_psmoptions = array() (line 77)
  • var: HTML for the select menu to choose increasing or diminishing dissonance by PSM
  • access: private
string $_psmradio = '' (line 67)
  • var: HTML for the radio button to choose Parallel Subset Motion
  • access: private
string $_psmtype = '' (line 72)
  • var: 'inc' (increasing) or 'dim' (diminishing) dissonance by PSM
  • access: private
bool $_show_sound = TRUE (line 97)
  • var: whether or not to show the MIDI controls and check the MIDI checkbox
  • access: private
string $_soundcheckbox = '' (line 102)
  • var: HTML for the checbox to use MIDI or not
  • access: private
string $_targetdsg = '' (line 57)
  • var: the target DSG for the current chord
  • access: private
string $_targetdsgradio = '' (line 62)
  • var: HTML for the radio button to choose target DSG
  • access: private
string $_url (line 32)
  • var: URL of the calling script
  • access: private
string $_warning = '' (line 82)
  • var: warning message, currently only used for unattainable target dissonance
  • access: private
Methods
Constructor DSG_View (line 110)

The constructor

  • access: public
DSG_View DSG_View (string $url)
  • string $url: the URL of the calling script
getDocumentationLink (line 221)

Returns link to documentation page (with saved page state in compacted request array)

return string link with compacted page state, if applicable

  • access: public
void getDocumentationLink ()
getMIDItxt (line 282)

Returns a textual represention of a MIDI file for the current chord

Creates a MF2T/T2MF MIDI format text string for the current chord, to be converted by Valentin Schmidts Midi Class 1.6 into a binary MIDI file

  • return: MF2T/T2MF format text string
  • access: public
string getMIDItxt ()
setCurrentChord (line 144)

Sets the current chord

  • access: public
void setCurrentChord (array $chordrec)
  • array $chordrec: the current chord
setForm (line 235)

Creates the form to work on a chord, also containing the history so far

  • access: public
void setForm ()
setGetStringCompact (line 211)

Sets a compacted request array containing the state of the current page

Used to return to where you left off when viewing the documentation

  • access: public
void setGetStringCompact (string $string)
  • string $string: the compacted request array
setHistory (line 165)

Sets the history (list of chord analyses so far) to be saved, and appended to, in a textarea

  • access: public
void setHistory (string $history)
  • string $history: series of chord analyses
setInitialForm (line 119)

Creates form for startpage

  • access: public
void setInitialForm ()
setLastFedInChord (line 155)

Sets the last manually entered chord, to be saved in a hidden variable

  • access: public
void setLastFedInChord (array $chordrec)
  • array $chordrec: the last manually entered chord
setMIDIFilePath (line 306)

Sets the value of the src attribute for the embed element for MIDI files

  • access: public
void setMIDIFilePath (string $filepath)
  • string $filepath: value of the src attribute
setSelectedPSMType (line 187)

Sets the previously chosen Parallel Subset Motion type (increasing or diminishing dissonance)

Used to select the corresponding option in the PSM select menu

  • access: public
void setSelectedPSMType (string $type)
  • string $type: the previously chosen PSM type
setSound (line 316)

Whether or not to show the MIDI controls, sets the MIDI checkbox accordingly

  • access: public
void setSound (bool $bool)
  • bool $bool: TRUE or FALSE
setTargetDSG (line 175)

Sets the previously entered target dissonance, to be reshown in its text field

  • access: public
void setTargetDSG (string $dsg)
  • string $dsg: the previously entered target dissonance
setWarning (line 199)

Sets a warning text

Currently only used if the desired target dissonance is not attainable

  • access: public
void setWarning (string $string)
  • string $string: the warning message
_chordrectostring (line 360)

Translates an array with chord analysis back to a string of note names

  • return: string of note names
  • access: private
string _chordrectostring (array $chordrec)
  • array $chordrec: array with chord analysis
_setRadiosAndSelects (line 325)

Sets the correct states for radio buttons, checkboxes and selectmenus of the form

  • access: private
void _setRadiosAndSelects ()
_writestructure (line 378)

Translates an array with chord analysis to a readable string representation

  • return: human-readable analysis
  • access: private
string _writestructure (array $chordrec)
  • array $chordrec: array with chord analysis

Documentation generated on Sun, 26 Nov 2006 14:19:35 +0100 by phpDocumentor 1.3.1