asugg.pl: This is the Jamey Aebersold chord suggester. The most important functor is possScale([Chords]), which takes in a list of chords and suggests scales for each of them. There is also a version that looks like possScale([Chords], StartNote). It takes in a list of chords and a starting note, and outputs all recommended scales, arranging them all so they start with the specified start note.
chords.pl: This file was designed mostly to extract chords from a major scale. I don't use this much, but it exists if it's needed. The most relevant piece of this file is the flat(Note, FlattedNote), sharp(Note, SharpNote), and hstepdown sections (at the end). The flat and sharp functors are used to create scales (in the createScale file), and here is where the we can change if enharmonic notes are treated the same or differently.
class.pl: This determines the pitch class of a note (returned as a letter). This allows 'g', 'G', 'G_sharp', 'G_flat', and 'G_doubFlat' to all get mapped to the same place (in this case, 'G'). It just checks the first letter of whatever gets sent to it.
createScale.pl: A big list of scales, and how to create them.
degrees.pl: The most important functor here is probScale. probScale takes in a chord, a melody (list of note names, no durations or octaves), and returns a set of scales that the melody might be a part of, with the most probable ones listed first. The Count is the number of chromatic tones in the melody (using that particular scale). probScale2 does the exact same thing, though it also returns the full list of what's chromatic and what's not.
equals.pl: Equals sets up an enharmonic equality. This functor is used to make sure that if two scales share a note that is spelled differently, it will recognize that the note is the same.
guido.pl: This contains the functor guido, which takes in a list of notes written in my standard format ('A', 'A_sharp', 'A_flat') and changes them to guido's format. Durations are not handled here (but they are handled in the note.pl file).
itAintNecSo, loveForSale, lushLife:
This is just to show how I store a song (as a big list). You can have
prolog find suggested chords for this whole list by entering:
itAintNecessarilySo(X), possScales(X).
notes.pl: writeNotes takes in pitches described by their pitch (in 'D_flat' format), octave, duration numerator (DurNum), and duration denominator (DurDem), and writes them in guido notation. pick4([ChordNote, ChordAccidental, ScaleType]) is a predicate that makes 4 beats of 8th notes, according to the goal-note method (Berg), with specific placement of goal notes (and lesser goals). One problem is that it can suggest rests, but it also specifies an octave for the rests, which guido doesn't like, so the rests (specified by '_') have to be manually edited when they are chosen.
parse.pl: Parse contains another copy of the parser, this one just parses and does not suggest scales. It also contains the parsing auxiliary files that help the parser in asugg2.pl work.
roman.pl: This was written when we used the other (duration last) method of storing scales, and thus doesn't take the standard form of scales. This is still not complete- a complete version would take chord quality into account, while this simply depends on class. It was designed to take in a key and a chord, and find the Roman Numeral classification of the chord in that particular key.
scales.pl: This file stores the major scales in every key (well, mostly every key. Ridiculous keys such as c flat major were omitted).
sharedNotes.pl: Shared notes finds the notes that are shared between two scales. There are two ways to do this, sharedNote and allShared. sharedNote takes in a note (in most cases, a variable), and a list of scales. It then finds if the note is a member of all of the scales in the list. If the "note" input is a variable, it finds a note that is a member of all scales (if possible). allShared is set up to return all shared notes in one fell swoop.
startScale.pl: This file contains the functors needed to make a scale start on a user specified note.