Prof.Dr.Godfried-Willem RAES

<GMT> & <Harmony Library> Reference Manual: Module 2: Harmony Analysis functions


<Index > <Introduction> <General Functions>
<Fuzzy Functions> <Analysis Functions> <Acoustical Functions>
<Visualisation Functions> <File Management> <Psychological Functions>

CHAPTER 2: HARM.ANA

HARMONY ANALYSIS LIBRARY

Files: now all included in gmt_lib.dll - declarations for Power Basic are in gmt_lib.bi


Alphabetical list of functions contained is this module:

FUNCTION IsChordClassic% (ChordType&)
FUNCTION Name3Chord$ (ChordNumber%)
FUNCTION NameChord$ (ChordNumber%)
FUNCTION QuestTcCnr (cnr AS INTEGER) AS INTEGER
FUNCTION QuestTcHar (cnr AS INTEGER, norm AS SINGLE) AS INTEGER
FUNCTION Tonality$ (n%, Tc%)

Use and description of procedures and functions in HARM_ANA:

FUNCTION NameChord$ (i%)

Use:

name$= NameChord$ (Cnn%)

This function returns a string composed of an italian fundamentaldiscriptor depending on the setting for the tonal center as present in the high nibble of the parameter (a chordnumber), followed by a string representation of the intervallic structure. This string is build after the model of the Chordtype chorddescriptor variable. The chordtype in its hexadecimal string format makes out the ending of the string returned.

examples:

This function makes the structure of chords very readable. If users prefer the more logical anglosaxon note names (A,B,C,D,... ), the stringconstants in the source code for the function Tonality$() have to be changed accordingly. However, we may implement the function in a future release with a language parameter. 


FUNCTION Name3Chord$(i%)

Use:

name$ = Name3Chord$ (Cnn%)

This function returns a string description for the chord, if it conforms to classical harmony chord formation rules for third based chords.


FUNCTION IsChordClassic%(i&)

Use:

b%= IsChordClassic% (Ctype&)

This function returns either false (0) or true (-1) if the chordtype number transferred to it in the argument conforms to a basic chord based on the tonic in the given tonal center. The argument must be a chordtype, not a chordnumber! This function is called upon in some procedures contained in the modules HARM_PSI and HARM_FUZ.


FUNCTION Tonality$ (i%,j%)

Use:

t$ = Tonality$ (n%, key%)

This function converts a midi note number to the latin note name (Do, Do#, re, mi, fa...Sib, Si). This notenumber is given in the argument n%. The context key is given in argument key%. Any midi values can be given as arguments. The function always returns a 4 character string. The last character in the string is always _ (underline character). Double sharps are indicated using *. (asterix). In a future implementation the function might also take a language parameter to conform to the more logical anglosaxon notenaming.


FUNCTION QuestTcCnr (cnr AS INTEGER) AS INTEGER

This function attempts to find a tonal center for the chordnumber passed. It only uses the high nibble -if set to anything but -1 - as a starting point for the search. If it succeeds in matching the chord to a classic structure for a certain tonality, it will return the tonic of this tonality. If no tonal center could be found, the function will return -1. Note that the values 0,1,2,3,4,5,6,7,8,9,10,11 refer to valid tonal centers.

There is no guarantee that the value returned is the only possible value, nor that it is the most appropriate answer in a given situation.


FUNCTION QuestTcHar (h AS HarmType, norm as SINGLE) AS INTEGER

This function operates similarly to QuestTcCnr, but in this case a complete harmony string, placed in the h.vel field of the harmonytype structure, may be passed to the function. The norm parameter lets the user specify the strictness werewith tonality criteria will be applied. The norm parameter specifies a upperlimit of looseness, since the function will always try the find a tonal center for the lowest norm value (0) first, then increasing its norm until the specified value is reached or, until a suitable tonal center could be returned.

If no tonal center for traditional criteria could be found, the function will attempt to return the strongest pitch component from the chord.


Filedate: 970220 - last update : 2004-11-02

<Index > <Introduction> <General Functions>
<Fuzzy Functions> <Analysis Functions> <Acoustical Functions>
<Visualisation Functions> <File Management> <Psychological Functions>

EXIT Composition software website...

To homepage dr.Godfried-Willem RAES