This is relatively straightforward. The problem comes when one of the letters is sharpened. In the case of C - G if we sharpen the G then we G# and because this is a semitone higher the fifth is said to be Augmented if the note was Gb a semitone lower then this would be a diminished 5th. However on a keyboard Gb is the same as F# so the same sounding interval has a different name C-F has four letters and so is a fourth (again a perfect fourth) so C-F# is now called an augmented fourth. The perfect intervals relate to only fourths and fiftths. Other intervals C-D a second or C-E a third and are both called major C-Db or C-Eb would be called minor intervals and C-D# is an augmented interval.
There are two main ways of looking at intervals the one in the text bases the intervals on which position they are in the scale. The lower note of an interval being treated as the tonic (First note of the scale) However I find this confusing as one has to remember all the sharps and flats in a scale. D-F# for example is a major third as the scale of D major has F# included in it. But D-F is a minor third. One can see how this could add to confusion.
A much simpler way is to just count the number of semitones between each interval and use the following table
- P1, d2 = 0 semitones
- m2, A1 = 1 semitones
- M2, d3 = 2 semitones
- m3, A2 = 3 semitones
- M3, d4 = 4 semitones
- P4, A3 = 5 semitones
- A4, d5 = 6 semitones
- P5, d6 = 7 semitones
- m6, A5 = 8 semitones
- M6, d7 = 9 semitones
- m7, A6 = 10 semitones
- M7, d8 = 11 semitones
- P8, A7 = 12 semitones
The number corresponds to the number of letters thus C-A is a 6th the notes between the letters are
C# D D# E F F# G G# A which is 9 so this is a major 6th. Once one has got the hang of this it is quite straightforward.
Putting my (failed) mathematicians hat on the obvious thing to do would be to draw a sort of Cayley table listing the lower note in the columns and the upper note in the intervals count the number of semitones between each note and then use the table above to label the interval. Starting from C there will be 21 entries as each note will have three forms eg Cb-C-C# however once one does that it soon becomes apparent that there are gaps. Db -D # is a good example Db-Db is a perfect unison, Db-D has one semitone and so is an Augmented unision but what is Db-D# ? it must be a unision as it has the same letters but it can't be a perfect or augmented unison. So I propose to call this a doubly augmented unison.
A similar problem occurs for say Db-B# this must be a form of 6th. there are 11 semitones between Db and B# but the only sixth's that have a name are the Major 6th 9 semitones and the Augmented 6th which has 10 semitones. Thus again I propose to call this a doubly augmented 6th. This is not a term I've seen used in any music textbook that I have, so I might have invented a new musical term.
When I've completed the laborious task of labelling all the intervals in this manner I'll publish the results.