Package jazzparser :: Package misc :: Package chordlabel :: Module chord_vocabs
[hide private]
[frames] | no frames]

Module chord_vocabs

source code

Predefined chord vocabs for the chord labeling model.


Author: Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>

Functions [hide private]
 
get_mapping(mapping, reverse=False)
Gets a dict of the given list mapping, optionally reversing it.
source code
Variables [hide private]
  __author__ = 'Mark Granroth-Wilding <mark.granroth-wilding@ed....
Chord vocabularies defined for MIREX 2011 tasks.
  MIREX_DYAD = {'maj': [0, 4, 7], 'min': [0, 3, 7]}
  MIREX_TRIAD = {'aug': [0, 4, 8], 'dim': [0, 3, 6], 'maj': [0, ...
  MIREX_TETRAD = {'7': [0, 4, 7, 10], 'aug': [0, 4, 8], 'aug(7)'...
  TRIAD = {'aug': [0, 4, 8], 'dim': [0, 3, 6], 'maj': [0, 4, 7],...
  TETRAD = {'7': [0, 4, 7, 10], 'aug': [0, 4, 8], 'dim': [0, 3, ...
Mappings from the chord labels in the chord corpus to each of the above chord vocabularies.
  MIREX_DYAD_CORPUS_MAPPING = [('', 'maj'), ('m', 'min'), ('M7',...
  MIREX_TRIAD_CORPUS_MAPPING = [('', 'maj'), ('m', 'min'), ('M7'...
  MIREX_TETRAD_CORPUS_MAPPING = [('', 'maj'), ('m', 'min'), ('M7...
  TRIAD_CORPUS_MAPPING = [('', 'maj'), ('m', 'min'), ('M7', 'maj...
  TETRAD_CORPUS_MAPPING = [('', 'maj'), ('m', 'min'), ('M7', 'ma...
  CHORD_VOCABS = {'mirex-dyad': ({'maj': [0, 4, 7], 'min': [0, 3...
  __package__ = None
hash(x)
Function Details [hide private]

get_mapping(mapping, reverse=False)

source code 

Gets a dict of the given list mapping, optionally reversing it. Where a mapping is not unique, the first instance is used.


Variables Details [hide private]

__author__

Chord vocabularies defined for MIREX 2011 tasks.

See http://www.music-ir.org/mirex/wiki/2010:Audio_Chord_Estimation.

Value:
'Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>'

MIREX_TRIAD

Value:
{'aug': [0, 4, 8],
 'dim': [0, 3, 6],
 'maj': [0, 4, 7],
 'min': [0, 3, 7],
 'sus2': [0, 2, 7],
 'sus4': [0, 5, 7]}

MIREX_TETRAD

Value:
{'7': [0, 4, 7, 10],
 'aug': [0, 4, 8],
 'aug(7)': [0, 4, 8, 11],
 'dim': [0, 3, 6],
 'dim(7)': [0, 3, 6, 11],
 'dim7': [0, 3, 6, 9],
 'hdim7': [0, 3, 6, 10],
 'maj': [0, 4, 7],
...

TRIAD

Value:
{'aug': [0, 4, 8],
 'dim': [0, 3, 6],
 'maj': [0, 4, 7],
 'min': [0, 3, 7],
 'sus4': [0, 5, 7]}

TETRAD

Mappings from the chord labels in the chord corpus to each of the above chord vocabularies.

Value:
{'7': [0, 4, 7, 10],
 'aug': [0, 4, 8],
 'dim': [0, 3, 6],
 'dim7': [0, 3, 6, 9],
 'hdim7': [0, 3, 6, 10],
 'maj': [0, 4, 7],
 'maj7': [0, 4, 7, 11],
 'min': [0, 3, 7],
...

MIREX_DYAD_CORPUS_MAPPING

Value:
[('', 'maj'),
 ('m', 'min'),
 ('M7', 'maj'),
 ('o7', 'min'),
 ('%7', 'min'),
 ('aug', 'maj'),
 ('m,b5', 'min'),
 ('b5', 'maj'),
...

MIREX_TRIAD_CORPUS_MAPPING

Value:
[('', 'maj'),
 ('m', 'min'),
 ('M7', 'maj'),
 ('o7', 'dim'),
 ('%7', 'dim'),
 ('aug', 'aug'),
 ('m,b5', 'dim'),
 ('b5', 'maj'),
...

MIREX_TETRAD_CORPUS_MAPPING

Value:
[('', 'maj'),
 ('m', 'min'),
 ('M7', 'maj7'),
 ('o7', 'dim7'),
 ('%7', 'hdim7'),
 ('aug', 'aug'),
 ('m,b5', 'dim'),
 ('b5', 'maj'),
...

TRIAD_CORPUS_MAPPING

Value:
[('', 'maj'),
 ('m', 'min'),
 ('M7', 'maj'),
 ('o7', 'dim'),
 ('%7', 'dim'),
 ('aug', 'aug'),
 ('m,b5', 'dim'),
 ('b5', 'maj'),
...

TETRAD_CORPUS_MAPPING

Value:
[('', 'maj'),
 ('m', 'min'),
 ('M7', 'maj7'),
 ('o7', 'dim7'),
 ('%7', 'hdim7'),
 ('aug', 'aug'),
 ('m,b5', 'dim'),
 ('b5', 'maj'),
...

CHORD_VOCABS

Value:
{'mirex-dyad': ({'maj': [0, 4, 7], 'min': [0, 3, 7]},
                [('', 'maj'),
                 ('m', 'min'),
                 ('M7', 'maj'),
                 ('o7', 'min'),
                 ('%7', 'min'),
                 ('aug', 'maj'),
                 ('m,b5', 'min'),
...