Music Recognition



Introduction to Music Theory

Musical Alphabets /Notes in music have certain spacing between them, the seven musical notes are unevenly spaced which is known as the musical distance. You might notice that distance between C and D is equal to the distance between D and E, However the distance between E and F is half that of D and E.
C      D      E   F      G      A      B   C
However this uneven space or distance can be filled by some other notes, so that it should look evenly spaced going forward from one note to the other.
C   C#   D   D#   E   F   F#   G   G#   A   A#   B   C


Area of Interest and Research

Case-1  TRIAD CHORDS

The Area of Research in Music Recognition and Interpretation is vast. Being a Guitarist, I'll confine my discussion to Guitar Notes,Scales and Chords, However it may easily be interpolated to any other instrument of area of Music. 


-----------------------------------------------------------------------------------------------------------------------------




An interesting observation of Triad Chords is their positions on the FretBoard. All the theory talks about the chord positions in terms of Relative distances between the notes on the strings.

So here is my composition of all Triads for A Chord (Major, Minor, Augmented, Diminished)    ( in Root, 1st Inversion and 2nd Inversion Positions ).

A chord is a group of notes played simultaneously, rather than sequentially ( like a melody) There are several types of chords depending on the different intervals b/w the notes.
Triads, as the name implies are made up of three notes. They are divided into four types or categories viz Major, Minor, Diminished and augmented.
We understand the construction of Major,Minor,diminished and augmented chords and show how each one is constructed, starting on any note.
Major Triad –  R-3-5
Minor Triad -- R-b3-5
Diminished -- R-b3-b5
Augmented  -- R-3 - 5#
------------------------------------------------------------------------------------------------------------------------
The preliminary program to get familiar with the Major Triad Chord created in python is as follows.

------------------------------------------------------------------------------------------------------------------------
import itertools

def circ_slice(a, start, length):
    it = itertools.cycle(a)
    next(itertools.islice(it, start, length), None)
    return list(itertools.islice(it, length))

a = ['A','A#','B','C','C#','D','D#','E','F','F#','G','G#']
n = input("Enter Root Node: ")


if n.lower() == 'a':
    start = 0
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes" , qnodes[0],qnodes[2],qnodes[4])

elif n.lower() == 'a#':
    start = 1
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2],qnodes[4])

elif n.lower() == 'b':
    start = 2
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2],qnodes[4])

elif n.lower() == 'c':
    start = 3
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2], qnodes[4])
elif n.lower() == 'c#':
    start = 4
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2], qnodes[4])
elif n.lower() == 'd':
    start = 5
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2], qnodes[4])
elif n.lower() == 'd#':
    start = 6
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2], qnodes[4])
elif n.lower() == 'e':
    start = 7
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2], qnodes[4])
elif n.lower() == 'f':
    start = 8
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2], qnodes[4])
elif n.lower() == 'f#':
    start = 9
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2], qnodes[4])
elif n.lower() == 'g':
    start = 10
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2], qnodes[4])
elif n.lower() == 'g#':
    start = 11
    qnodes = circ_slice(a, start, 5)
    print(" The Triad Chord consists of these nodes", qnodes[0], qnodes[2], qnodes[4])
else:
        print("Invalid Entry")
------------------------------------------------------------------------------------------

Find this code on github at:
https://github.com/nipunharitash/py2dl/tree/master/PYTHON%20PROJECTS



With this much of theory in mind, we can easily draw the chord shapes, which essentially is the first step of data collection. Further with this information, we can see the finger positions of 3 notes on the fret-board with respect to each other. In the following diagrams the leftmost thick string is E bass or the topmost string of the guitar.









An understanding of Python as Machine Learning tool would be a pre requisite to building the proposed system. The technical implementation of the system requires Python with modules for Music recognition, programming, production and analysis. Python has a rich library of modules for music recognition which can be accessed through its wiki page. Another music recognition and reproduction software based off of Python is Jython Music. The background study for designing such a system requires Understanding of Music Theory, Scales, Formation of chords from Scales, Chord progressions of any key of Scale and Popular Cadences used in Music specific to Guitar Playing. Also, the training set data of such a system requires extensive audio recordings of all chords in all Triad Positions for supervised learning.



All the images are taken from a single perspective, so that the vividness and difficulty of the chord positions could be appreciated. The positional difference of the chords along the fret-board is basis of our problem formulation.


A Augmented ( All Positions)


A thorough data set of fret positions for A Augmented Chord Triads is Populated in the following diagram









A Diminished ( All Positions)

A thorough data set of fret positions for A Diminished Chord Triads is Populated in the following diagram





A Major ( All Positions)

A thorough data set of fret positions for A Major Chord Triads is Populated in the following diagram






 A Minor ( All Positions )

A thorough data set of fret positions for A Minor Chord Triads is Populated in the following diagram





Case -2 7th CHORDS

A Primer on Seventh Chords. There are 6 Types of Seventh Chords, so the data set that we can Cretan and analyse is even more thickly populated.

MAJOR 7TH


Major chords consist of the root, 3rd and 5th notes of the major scale (1 3 5). The major 7th chord (Maj7) comprises of the root, 3rd, 5th and 7th notes of the major scale (1 3 5 7). So the 7th note of the major scale is added to the major chord.

For example, if you take the C major scale = C D E F G A B C.
The Cmaj7 chord comprises of the notes: C E G B (1 3 5 7).
If you take the G major scale = G A B C D E F# G.
The Gmaj7 chord comprises of the notes: G B D F# (1 3 5 7)


DOMINANT 7TH


The dominant 7th chord (dom7) comprises of the root, 3rd, 5th and flatted (b) 7th notes of the major scale (1 3 5 b7).

C7 (Cdom7) = C E G Bb (1 3 5 b7)
G7 = (Gdom7) = G B D F (1 3 5 b7)

 

MINOR MAJOR 7TH


The minor major 7th chord = m(maj7) comprises of the root, minor 3rd, 5th and 7th notes of the major scale (1 b3 5 7).

Am(maj7) = A C E G# (1 b3 5 7)
Em(maj7) = E G B D# (1 b3 5 7)

MINOR 7TH


The minor 7th chord (m7) comprises of the root, minor 3rd, 5th and flatted (b) 7th notes of the major scale (1 b3 5 b7).

Am7 = A C E G (1 b3 5 b7)
Em7 = E G B D (1 b3 5 b7)

MINOR 7b5


The minor 7b5 chord (m7b5), also called “half diminished” comprises of the root, minor 3rd, flatted (b) 5th and flatted (b) 7th notes of the major scale (1 b3 b5 b7).

Am7b5 = A C Eb G (1 b3 b5 b7)
Em7b5 = E G Bb D (1 b3 b5 b7)


DIMINISHED 7TH


The diminished 7 chord (dim7), comprises of the root, minor 3rd, flatted (b) 5th and double flatted (bb) 7th notes of the major scale (1 b3 b5 bb7). Which makes the double flatted 7th enharmonically the same as a major sixth. (bb7 = 6)

Adim7 = A C Eb Gb (1 b3 b5 bb7)
Edim7 = E G Bb Db (1 b3 b5 bb7)


GO TO PAGE-2

Any Donation in the form of Cryptos to create Free Content is much appreciated
BTC Donation Address: 172CEGuefZZfqDiZ6WHrD7Skq7Q7DWeMuD

No comments:

Post a Comment

A Compendium of Epigrams Vol:1

Buy From Amazon  Kindle Edition Sneak Peak of Second BOOK