# Copyright (C) 2006-2016  Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation (FSF), either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the Affero GNU General Public License
# version 3 along with this program. If not, see http://www.gnu.org/licenses/

dissonance = {

'A#m': {'A#m': 1098.0000000000002, 'C#m': 1321.9999999999998, 'A#': 1229.3999999999999, 'Dm': 1312.0000000000002, 'C#': 1163.3999999999996, 'Bm': 1526.1999999999998, 'G#': 1383.9999999999998, 'Fm': 1202.8, 'A': 1394.7999999999997, 'C': 1473.7999999999995, 'B': 1466.9999999999998, 'E': 1387.3999999999996, 'D': 1443.3999999999999, 'G': 1487.3999999999996, 'F': 1219.9999999999998, 'G#m': 1404.3999999999999, 'Em': 1407.8, 'D#m': 1296.9999999999998, 'Cm': 1404.3999999999999, 'Am': 1526.1999999999996, 'D#': 1254.7999999999997, 'F#': 1201.1999999999998, 'Gm': 1322.0000000000002, 'F#m': 1288.4000000000001},

'C#m': {'A#m': 1322.0000000000002, 'C#m': 1098.0000000000002, 'A#': 1487.3999999999996, 'Dm': 1526.1999999999998, 'C#': 1229.3999999999999, 'Bm': 1404.3999999999999, 'G#': 1369.7999999999997, 'Fm': 1312.0000000000002, 'A': 1173.8, 'C': 1394.7999999999997, 'B': 1383.9999999999998, 'E': 1163.3999999999996, 'D': 1466.9999999999998, 'G': 1383.9999999999995, 'F': 1443.3999999999999, 'G#m': 1297.0000000000002, 'Em': 1321.9999999999998, 'D#m': 1404.3999999999999, 'Cm': 1526.1999999999996, 'Am': 1311.9999999999998, 'D#': 1473.7999999999995, 'F#': 1254.7999999999997, 'Gm': 1407.8, 'F#m': 1296.9999999999998},

'A#': {'A#m': 1229.3999999999999, 'C#m': 1487.3999999999999, 'A#': 1098.0, 'Dm': 1173.8000000000004, 'C#': 1321.9999999999995, 'Bm': 1394.8, 'G#': 1404.3999999999999, 'Fm': 1219.6000000000001, 'A': 1526.1999999999998, 'C': 1404.3999999999999, 'B': 1526.1999999999998, 'E': 1407.7999999999995, 'D': 1311.9999999999995, 'G': 1321.9999999999995, 'F': 1202.7999999999997, 'G#m': 1473.8, 'Em': 1384.0, 'D#m': 1369.8, 'Cm': 1384.0, 'Am': 1466.9999999999998, 'D#': 1296.9999999999998, 'F#': 1288.3999999999999, 'Gm': 1163.4000000000001, 'F#m': 1362.0000000000002},

'Dm': {'A#m': 1311.9999999999998, 'C#m': 1526.1999999999996, 'A#': 1173.8, 'Dm': 1098.0000000000002, 'C#': 1394.7999999999997, 'Bm': 1322.0000000000002, 'G#': 1383.9999999999995, 'Fm': 1321.9999999999998, 'A': 1369.7999999999997, 'C': 1383.9999999999998, 'B': 1487.3999999999996, 'E': 1473.7999999999995, 'D': 1229.3999999999999, 'G': 1219.5999999999995, 'F': 1163.3999999999996, 'G#m': 1407.8, 'Em': 1404.3999999999999, 'D#m': 1526.1999999999998, 'Cm': 1404.3999999999999, 'Am': 1297.0000000000002, 'D#': 1466.9999999999998, 'F#': 1443.3999999999999, 'Gm': 1202.8, 'F#m': 1312.0000000000002},

'C#': {'A#m': 1163.4000000000001, 'C#m': 1229.3999999999999, 'A#': 1321.9999999999995, 'Dm': 1394.8, 'C#': 1098.0, 'Bm': 1473.8, 'G#': 1296.9999999999998, 'Fm': 1173.8000000000004, 'A': 1311.9999999999998, 'C': 1526.1999999999998, 'B': 1404.3999999999999, 'E': 1321.9999999999995, 'D': 1526.1999999999998, 'G': 1407.7999999999995, 'F': 1311.9999999999995, 'G#m': 1254.8000000000002, 'Em': 1487.3999999999999, 'D#m': 1384.0, 'Cm': 1466.9999999999998, 'Am': 1443.4000000000001, 'D#': 1404.3999999999999, 'F#': 1296.9999999999998, 'Gm': 1387.3999999999999, 'F#m': 1369.8},

'Bm': {'A#m': 1526.1999999999996, 'C#m': 1404.3999999999999, 'A#': 1394.7999999999997, 'Dm': 1321.9999999999998, 'C#': 1473.7999999999995, 'Bm': 1098.0000000000002, 'G#': 1487.3999999999996, 'Fm': 1407.8, 'A': 1383.9999999999998, 'C': 1466.9999999999998, 'B': 1229.3999999999999, 'E': 1254.7999999999997, 'D': 1163.3999999999996, 'G': 1173.8, 'F': 1387.3999999999996, 'G#m': 1322.0000000000002, 'Em': 1296.9999999999998, 'D#m': 1312.0000000000002, 'Cm': 1526.1999999999998, 'Am': 1404.3999999999999, 'D#': 1443.3999999999999, 'F#': 1219.9999999999998, 'Gm': 1311.9999999999998, 'F#m': 1202.8},

'G#': {'A#m': 1384.0, 'C#m': 1369.8, 'A#': 1404.3999999999999, 'Dm': 1384.0, 'C#': 1296.9999999999998, 'Bm': 1487.3999999999999, 'G#': 1098.0, 'Fm': 1130.2000000000003, 'A': 1526.1999999999998, 'C': 1311.9999999999995, 'B': 1321.9999999999995, 'E': 1288.3999999999999, 'D': 1407.7999999999995, 'G': 1526.1999999999998, 'F': 1196.8, 'G#m': 1229.3999999999999, 'Em': 1362.0000000000002, 'D#m': 1219.6000000000001, 'Cm': 1173.8000000000004, 'Am': 1394.8, 'D#': 1202.7999999999997, 'F#': 1261.3999999999999, 'Gm': 1466.9999999999998, 'F#m': 1284.2},

'Fm': {'A#m': 1202.8, 'C#m': 1311.9999999999998, 'A#': 1219.5999999999995, 'Dm': 1322.0000000000002, 'C#': 1173.8, 'Bm': 1407.8, 'G#': 1130.1999999999998, 'Fm': 1098.0000000000002, 'A': 1361.9999999999998, 'C': 1369.7999999999997, 'B': 1383.9999999999995, 'E': 1394.7999999999997, 'D': 1487.3999999999996, 'G': 1284.1999999999996, 'F': 1229.3999999999999, 'G#m': 1196.8000000000002, 'Em': 1526.1999999999996, 'D#m': 1404.3999999999999, 'Cm': 1297.0000000000002, 'Am': 1288.4000000000003, 'D#': 1383.9999999999998, 'F#': 1466.9999999999998, 'Gm': 1261.3999999999999, 'F#m': 1526.1999999999998},

'A': {'A#m': 1394.8, 'C#m': 1173.8000000000004, 'A#': 1526.1999999999998, 'Dm': 1369.8, 'C#': 1311.9999999999995, 'Bm': 1384.0, 'G#': 1526.1999999999998, 'Fm': 1362.0000000000002, 'A': 1098.0, 'C': 1321.9999999999995, 'B': 1404.3999999999999, 'E': 1202.7999999999997, 'D': 1296.9999999999998, 'G': 1404.3999999999999, 'F': 1288.3999999999999, 'G#m': 1466.9999999999998, 'Em': 1219.6000000000001, 'D#m': 1384.0, 'Cm': 1487.3999999999999, 'Am': 1229.3999999999999, 'D#': 1407.7999999999995, 'F#': 1196.8, 'Gm': 1473.8, 'F#m': 1130.2000000000003},

'C': {'A#m': 1473.8, 'C#m': 1394.8, 'A#': 1404.3999999999999, 'Dm': 1384.0, 'C#': 1526.1999999999998, 'Bm': 1466.9999999999998, 'G#': 1311.9999999999998, 'Fm': 1369.8, 'A': 1321.9999999999995, 'C': 1098.0, 'B': 1526.1999999999998, 'E': 1311.9999999999995, 'D': 1404.3999999999999, 'G': 1296.9999999999998, 'F': 1296.9999999999998, 'G#m': 1443.4000000000001, 'Em': 1173.8000000000004, 'D#m': 1487.3999999999999, 'Cm': 1229.3999999999999, 'Am': 1163.4000000000001, 'D#': 1321.9999999999995, 'F#': 1407.7999999999995, 'Gm': 1254.8000000000002, 'F#m': 1384.0},

'B': {'A#m': 1466.9999999999998, 'C#m': 1384.0, 'A#': 1526.1999999999998, 'Dm': 1487.3999999999999, 'C#': 1404.3999999999999, 'Bm': 1229.3999999999999, 'G#': 1321.9999999999995, 'Fm': 1384.0, 'A': 1404.3999999999999, 'C': 1526.1999999999998, 'B': 1098.0, 'E': 1296.9999999999998, 'D': 1321.9999999999995, 'G': 1311.9999999999998, 'F': 1407.7999999999995, 'G#m': 1163.4000000000001, 'Em': 1369.8, 'D#m': 1173.8000000000004, 'Cm': 1394.8, 'Am': 1473.8, 'D#': 1311.9999999999995, 'F#': 1202.7999999999997, 'Gm': 1443.4000000000001, 'F#m': 1219.6000000000001},

'E': {'A#m': 1387.3999999999999, 'C#m': 1163.4000000000001, 'A#': 1407.7999999999995, 'Dm': 1473.8, 'C#': 1321.9999999999995, 'Bm': 1254.8000000000002, 'G#': 1288.3999999999999, 'Fm': 1394.8, 'A': 1202.7999999999997, 'C': 1311.9999999999998, 'B': 1296.9999999999998, 'E': 1098.0, 'D': 1404.3999999999999, 'G': 1196.8, 'F': 1526.1999999999998, 'G#m': 1201.2000000000003, 'Em': 1229.3999999999999, 'D#m': 1466.9999999999998, 'Cm': 1443.4000000000001, 'Am': 1220.0000000000002, 'D#': 1526.1999999999998, 'F#': 1404.3999999999999, 'Gm': 1280.4000000000003, 'F#m': 1384.0},

'D': {'A#m': 1443.4000000000001, 'C#m': 1466.9999999999998, 'A#': 1311.9999999999998, 'Dm': 1229.3999999999999, 'C#': 1526.1999999999998, 'Bm': 1163.4000000000001, 'G#': 1407.7999999999995, 'Fm': 1487.3999999999999, 'A': 1296.9999999999998, 'C': 1404.3999999999999, 'B': 1321.9999999999995, 'E': 1404.3999999999999, 'D': 1098.0, 'G': 1202.7999999999997, 'F': 1321.9999999999995, 'G#m': 1387.3999999999999, 'Em': 1384.0, 'D#m': 1394.8, 'Cm': 1473.8, 'Am': 1254.8000000000002, 'D#': 1526.1999999999998, 'F#': 1311.9999999999995, 'Gm': 1220.0000000000002, 'F#m': 1173.8000000000004},

'G': {'A#m': 1487.3999999999999, 'C#m': 1384.0, 'A#': 1321.9999999999995, 'Dm': 1219.6000000000001, 'C#': 1407.7999999999995, 'Bm': 1173.8000000000004, 'G#': 1526.1999999999998, 'Fm': 1284.2, 'A': 1404.3999999999999, 'C': 1296.9999999999998, 'B': 1311.9999999999995, 'E': 1196.8, 'D': 1202.7999999999997, 'G': 1098.0, 'F': 1261.3999999999999, 'G#m': 1394.8, 'Em': 1130.2000000000003, 'D#m': 1362.0000000000002, 'Cm': 1369.8, 'Am': 1384.0, 'D#': 1288.3999999999999, 'F#': 1276.7999999999997, 'Gm': 1229.3999999999999, 'F#m': 1255.8000000000002},

'F': {'A#m': 1220.0000000000002, 'C#m': 1443.4000000000001, 'A#': 1202.7999999999997, 'Dm': 1163.4000000000001, 'C#': 1311.9999999999998, 'Bm': 1387.3999999999999, 'G#': 1196.8, 'Fm': 1229.3999999999999, 'A': 1288.3999999999999, 'C': 1296.9999999999998, 'B': 1407.7999999999995, 'E': 1526.1999999999998, 'D': 1321.9999999999995, 'G': 1261.3999999999994, 'F': 1098.0, 'G#m': 1280.4000000000003, 'Em': 1466.9999999999998, 'D#m': 1473.8, 'Cm': 1254.8000000000002, 'Am': 1201.2000000000003, 'D#': 1404.3999999999999, 'F#': 1526.1999999999998, 'Gm': 1235.3999999999999, 'F#m': 1394.8},

'G#m': {'A#m': 1404.3999999999999, 'C#m': 1296.9999999999998, 'A#': 1473.7999999999995, 'Dm': 1407.8, 'C#': 1254.7999999999997, 'Bm': 1321.9999999999998, 'G#': 1229.3999999999999, 'Fm': 1196.8, 'A': 1466.9999999999998, 'C': 1443.3999999999999, 'B': 1163.3999999999996, 'E': 1201.1999999999998, 'D': 1387.3999999999996, 'G': 1394.7999999999997, 'F': 1280.3999999999996, 'G#m': 1098.0000000000002, 'Em': 1288.4000000000001, 'D#m': 1202.8, 'Cm': 1312.0000000000002, 'Am': 1526.1999999999998, 'D#': 1219.9999999999998, 'F#': 1235.3999999999999, 'Gm': 1526.1999999999996, 'F#m': 1261.4000000000001},

'Em': {'A#m': 1407.8, 'C#m': 1322.0000000000002, 'A#': 1383.9999999999995, 'Dm': 1404.3999999999999, 'C#': 1487.3999999999996, 'Bm': 1297.0000000000002, 'G#': 1361.9999999999998, 'Fm': 1526.1999999999998, 'A': 1219.5999999999995, 'C': 1173.8, 'B': 1369.7999999999997, 'E': 1229.3999999999999, 'D': 1383.9999999999998, 'G': 1130.1999999999998, 'F': 1466.9999999999998, 'G#m': 1288.4000000000003, 'Em': 1098.0000000000002, 'D#m': 1526.1999999999996, 'Cm': 1311.9999999999998, 'Am': 1202.8, 'D#': 1394.7999999999997, 'F#': 1473.7999999999995, 'Gm': 1196.8000000000002, 'F#m': 1404.3999999999999},

'D#m': {'A#m': 1297.0000000000002, 'C#m': 1404.3999999999999, 'A#': 1369.7999999999997, 'Dm': 1526.1999999999996, 'C#': 1383.9999999999998, 'Bm': 1311.9999999999998, 'G#': 1219.5999999999995, 'Fm': 1404.3999999999999, 'A': 1383.9999999999995, 'C': 1487.3999999999996, 'B': 1173.8, 'E': 1466.9999999999998, 'D': 1394.7999999999997, 'G': 1361.9999999999998, 'F': 1473.7999999999995, 'G#m': 1202.8, 'Em': 1526.1999999999998, 'D#m': 1098.0000000000002, 'Cm': 1322.0000000000002, 'Am': 1407.8, 'D#': 1229.3999999999999, 'F#': 1163.3999999999996, 'Gm': 1288.4000000000003, 'F#m': 1321.9999999999998},

'Cm': {'A#m': 1404.3999999999999, 'C#m': 1526.1999999999998, 'A#': 1383.9999999999998, 'Dm': 1404.3999999999999, 'C#': 1466.9999999999998, 'Bm': 1526.1999999999996, 'G#': 1173.8, 'Fm': 1296.9999999999998, 'A': 1487.3999999999996, 'C': 1229.3999999999999, 'B': 1394.7999999999997, 'E': 1443.3999999999999, 'D': 1473.7999999999995, 'G': 1369.7999999999997, 'F': 1254.7999999999997, 'G#m': 1311.9999999999998, 'Em': 1312.0000000000002, 'D#m': 1321.9999999999998, 'Cm': 1098.0000000000002, 'Am': 1322.0000000000002, 'D#': 1163.3999999999996, 'F#': 1387.3999999999996, 'Gm': 1297.0000000000002, 'F#m': 1407.8},

'Am': {'A#m': 1526.1999999999998, 'C#m': 1312.0000000000002, 'A#': 1466.9999999999998, 'Dm': 1296.9999999999998, 'C#': 1443.3999999999999, 'Bm': 1404.3999999999999, 'G#': 1394.7999999999997, 'Fm': 1288.4000000000001, 'A': 1229.3999999999999, 'C': 1163.3999999999996, 'B': 1473.7999999999995, 'E': 1219.9999999999998, 'D': 1254.7999999999997, 'G': 1383.9999999999998, 'F': 1201.1999999999998, 'G#m': 1526.1999999999996, 'Em': 1202.8, 'D#m': 1407.8, 'Cm': 1321.9999999999998, 'Am': 1098.0000000000002, 'D#': 1387.3999999999996, 'F#': 1280.3999999999996, 'Gm': 1404.3999999999999, 'F#m': 1196.8},

'D#': {'A#m': 1254.8000000000002, 'C#m': 1473.8, 'A#': 1296.9999999999998, 'Dm': 1466.9999999999998, 'C#': 1404.3999999999999, 'Bm': 1443.4000000000001, 'G#': 1202.7999999999997, 'Fm': 1384.0, 'A': 1407.7999999999995, 'C': 1321.9999999999995, 'B': 1311.9999999999998, 'E': 1526.1999999999998, 'D': 1526.1999999999998, 'G': 1288.3999999999999, 'F': 1404.3999999999999, 'G#m': 1220.0000000000002, 'Em': 1394.8, 'D#m': 1229.3999999999999, 'Cm': 1163.4000000000001, 'Am': 1387.3999999999999, 'D#': 1098.0, 'F#': 1321.9999999999995, 'Gm': 1201.2000000000003, 'F#m': 1487.3999999999999},

'F#': {'A#m': 1201.2000000000003, 'C#m': 1254.8000000000002, 'A#': 1288.3999999999999, 'Dm': 1443.4000000000001, 'C#': 1296.9999999999998, 'Bm': 1220.0000000000002, 'G#': 1261.3999999999994, 'Fm': 1466.9999999999998, 'A': 1196.8, 'C': 1407.7999999999995, 'B': 1202.7999999999997, 'E': 1404.3999999999999, 'D': 1311.9999999999998, 'G': 1276.8, 'F': 1526.1999999999998, 'G#m': 1235.3999999999999, 'Em': 1473.8, 'D#m': 1163.4000000000001, 'Cm': 1387.3999999999999, 'Am': 1280.4000000000003, 'D#': 1321.9999999999995, 'F#': 1098.0, 'Gm': 1213.8000000000002, 'F#m': 1229.3999999999999},

'Gm': {'A#m': 1321.9999999999998, 'C#m': 1407.8, 'A#': 1163.3999999999996, 'Dm': 1202.8, 'C#': 1387.3999999999996, 'Bm': 1312.0000000000002, 'G#': 1466.9999999999998, 'Fm': 1261.4000000000001, 'A': 1473.7999999999995, 'C': 1254.7999999999997, 'B': 1443.3999999999999, 'E': 1280.3999999999996, 'D': 1219.9999999999998, 'G': 1229.3999999999999, 'F': 1235.3999999999999, 'G#m': 1526.1999999999998, 'Em': 1196.8, 'D#m': 1288.4000000000001, 'Cm': 1296.9999999999998, 'Am': 1404.3999999999999, 'D#': 1201.1999999999998, 'F#': 1213.8, 'Gm': 1098.0000000000002, 'F#m': 1276.8000000000002},

'F#m': {'A#m': 1288.4000000000003, 'C#m': 1297.0000000000002, 'A#': 1361.9999999999998, 'Dm': 1311.9999999999998, 'C#': 1369.7999999999997, 'Bm': 1202.8, 'G#': 1284.1999999999996, 'Fm': 1526.1999999999996, 'A': 1130.1999999999998, 'C': 1383.9999999999995, 'B': 1219.5999999999995, 'E': 1383.9999999999998, 'D': 1173.8, 'G': 1255.8, 'F': 1394.7999999999997, 'G#m': 1261.3999999999999, 'Em': 1404.3999999999999, 'D#m': 1322.0000000000002, 'Cm': 1407.8, 'Am': 1196.8000000000002, 'D#': 1487.3999999999996, 'F#': 1229.3999999999999, 'Gm': 1276.8000000000002, 'F#m': 1098.0000000000002}

}
