├── .gitignore ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── circle.png ├── note.ico ├── circle_icon.png ├── signature.ico ├── signature.png ├── play_sounds.qrc ├── CircleOfFifths.qrc ├── myslider.py ├── mylabel.py ├── mydropdown.py ├── chordprogression.py ├── play_sounds.py ├── README.md ├── keyfromchords.py ├── circle.py ├── findkey.py ├── tonnetz.py ├── CircleOfFifths.py ├── keysfromchords_ui.py ├── circle_ui.py ├── CircleOfFifths.ui ├── LICENSE └── keyfromchords.ui /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/* 2 | build/* 3 | CircleOfFifths.spec -------------------------------------------------------------------------------- /1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/1.png -------------------------------------------------------------------------------- /2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/2.png -------------------------------------------------------------------------------- /3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/3.png -------------------------------------------------------------------------------- /4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/4.png -------------------------------------------------------------------------------- /5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/5.png -------------------------------------------------------------------------------- /6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/6.png -------------------------------------------------------------------------------- /7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/7.png -------------------------------------------------------------------------------- /circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/circle.png -------------------------------------------------------------------------------- /note.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/note.ico -------------------------------------------------------------------------------- /circle_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/circle_icon.png -------------------------------------------------------------------------------- /signature.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/signature.ico -------------------------------------------------------------------------------- /signature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mreintz/circleOfFifths/HEAD/signature.png -------------------------------------------------------------------------------- /play_sounds.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | florestan-piano.sf2 4 | 5 | 6 | -------------------------------------------------------------------------------- /CircleOfFifths.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | note.ico 4 | circle.png 5 | signature.png 6 | signature.ico 7 | 8 | 9 | -------------------------------------------------------------------------------- /myslider.py: -------------------------------------------------------------------------------- 1 | from PyQt5 import QtWidgets, QtCore 2 | from PyQt5.QtCore import * 3 | 4 | class mySlider(QtWidgets.QSlider): 5 | def __init__(self, parent): 6 | super().__init__(parent) 7 | 8 | up = pyqtSignal() 9 | down = pyqtSignal() 10 | pageup = pyqtSignal() 11 | pagedown = pyqtSignal() 12 | 13 | def keyPressEvent(self, event): 14 | if event.key() == QtCore.Qt.Key_Up: 15 | self.up.emit() 16 | elif event.key() == QtCore.Qt.Key_Down: 17 | self.down.emit() 18 | elif event.key() == QtCore.Qt.Key_PageUp: 19 | self.pageup.emit() 20 | elif event.key() == QtCore.Qt.Key_PageDown: 21 | self.pagedown.emit() 22 | else: 23 | super(mySlider, self).keyPressEvent(event) 24 | -------------------------------------------------------------------------------- /mylabel.py: -------------------------------------------------------------------------------- 1 | from PyQt5 import QtWidgets, QtGui 2 | from PyQt5.QtCore import * 3 | 4 | class myLabel(QtWidgets.QLabel): 5 | def __init__(self, parent): 6 | super().__init__(parent) 7 | 8 | clicked, right_clicked, control, shift, both = [ pyqtSignal() for i in range(5) ] 9 | 10 | def mousePressEvent(self, event): 11 | modifiers = QtGui.QGuiApplication.keyboardModifiers() 12 | if modifiers & Qt.ShiftModifier: 13 | if modifiers & Qt.ControlModifier: 14 | self.both.emit() 15 | else: 16 | self.shift.emit() 17 | elif modifiers & Qt.ControlModifier: 18 | self.control.emit() 19 | else: 20 | if event.button() == Qt.RightButton: 21 | self.right_clicked.emit() 22 | else: 23 | self.clicked.emit() 24 | -------------------------------------------------------------------------------- /mydropdown.py: -------------------------------------------------------------------------------- 1 | from PyQt5 import QtWidgets, QtCore 2 | from PyQt5.QtCore import * 3 | 4 | class myDropdown(QtWidgets.QComboBox): 5 | 6 | def __init__(self, parent): 7 | super().__init__(parent) 8 | 9 | keypressed = pyqtSignal() 10 | right = pyqtSignal() 11 | left = pyqtSignal() 12 | space = pyqtSignal() 13 | progressions = pyqtSignal() 14 | 15 | def keyPressEvent(self, event): 16 | if event.key() == QtCore.Qt.Key_M: 17 | self.keypressed.emit() 18 | elif event.key() == QtCore.Qt.Key_Right: 19 | self.right.emit() 20 | elif event.key() == QtCore.Qt.Key_Left: 21 | self.left.emit() 22 | elif event.key() == QtCore.Qt.Key_Space: 23 | self.space.emit() 24 | elif event.key() == QtCore.Qt.Key_P: 25 | self.progressions.emit() 26 | else: 27 | super(myDropdown, self).keyPressEvent(event) 28 | 29 | 30 | -------------------------------------------------------------------------------- /chordprogression.py: -------------------------------------------------------------------------------- 1 | from musthe import * 2 | 3 | def translate(string): 4 | string=string.replace('b', '') 5 | string=string.replace('#', '') 6 | return string 7 | 8 | def majmin(chordno, chord): 9 | if '°' in chordno: 10 | return chord+'°' 11 | elif chordno.islower(): 12 | return chord+'m' 13 | else: 14 | return chord 15 | 16 | translateNote = { 17 | 'B#': 'C', 18 | 'E#': 'F', 19 | 'Fb': 'E', 20 | 'Cb': 'B', 21 | 'Ebb': 'D', 22 | 'Bbb': 'A' 23 | } 24 | 25 | def readable(note): 26 | return str(note.letter)+note.accidental 27 | 28 | def progression(key, pattern, mode): 29 | pat = [] 30 | chords = [] 31 | 32 | if mode == 'Major': 33 | s = Scale(key, 'major') 34 | else: 35 | s = Scale(key, 'natural_minor') 36 | 37 | for p in pattern[0]: 38 | note = readable(s[p]) 39 | 40 | pat.append(pattern[1][p]) 41 | chords.append(majmin(pattern[1][p], translate(translateNote.get(note, note)))) 42 | 43 | return (pat, chords) -------------------------------------------------------------------------------- /play_sounds.py: -------------------------------------------------------------------------------- 1 | import time 2 | import os 3 | import tinysoundfont 4 | from musthe import Note, Chord, Scale 5 | from PyQt5.QtCore import QFile 6 | import play_sounds_resources 7 | 8 | synthfilename = "florestan-piano.sf2" 9 | __location__ = os.getcwd() #os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) 10 | synthfile = os.path.join(__location__, synthfilename) 11 | 12 | if not os.path.isfile(synthfile): 13 | print("Exporting synth file") 14 | QFile.copy(":/resources/florestan-piano.sf2", synthfile) 15 | 16 | synth = tinysoundfont.Synth() 17 | sfid = synth.sfload(synthfile) 18 | synth.program_select(0, sfid, 0, 0) 19 | synth.start() 20 | 21 | def play_arpeggio(notes): 22 | midi_notes = [ n.midi_note() for n in notes ] 23 | for n in midi_notes: 24 | synth.noteon(0, n, 100) 25 | time.sleep(0.3) 26 | synth.noteoff(0, n) 27 | 28 | def play_chord(notes): 29 | midi_notes = [ n.midi_note() for n in notes ] 30 | for n in midi_notes: 31 | synth.noteon(0, n, 100) 32 | time.sleep(0.5) 33 | for n in midi_notes: 34 | synth.noteoff(0, n) 35 | 36 | if __name__ == '__main__': 37 | chord = Chord(Note('C#'), 'min') 38 | note = Note('C') 39 | scale = Scale(note, 'major') 40 | 41 | scale_notes = [(note + i) for i in scale.intervals] 42 | 43 | play_chord(chord.notes) 44 | time.sleep(1) 45 | play_arpeggio(chord.notes) 46 | time.sleep(1) 47 | play_arpeggio(scale_notes) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # circleOfFifths 2 | Simple Circle of Fifths application. Works on both Windows and Linux. 3 | 4 | NEW FEATURE! Right click to play chords, Ctrl+click to play notes, Shift-click to play arpeggios. 5 | 6 | Requires: 7 | - PyQt5==5.15.1 8 | - musthe==1.0.0 9 | - tinysoundfont==0.3.6 (if you want sound output support) 10 | - PyAudio==0.2.14 (if you want sound output support) 11 | 12 | PyAudio might have som requirements. On my Linux box I needed to install portaudio19-dev on the base system in order to compile the wheel for pyaudio. 13 | 14 | Please note that you don't need to install anything if you run the binaries under Releases. 15 | 16 | Uses the https://nwhitehead.github.io/tinysoundfont-pybind/guide.html library and default sound font. 17 | 18 | Can be built into a single executable binary using: 19 | - pyinstaller @ https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz 20 | - pyinstaller-hooks-contrib==2020.9 21 | 22 | `pyinstaller --clean --onefile --windowed --icon=note.ico .\CircleOfFifths.py` 23 | 24 | The GUI and resource files are generated from the .ui and .qrc files created with Qt Designer, thus: 25 | 26 | `pyuic5.exe .\CircleOfFifths.ui -o circle_ui.py` 27 | 28 | `pyrcc5.exe .\CircleOfFifths.qrc -o CircleOfFifths_rc.py` 29 | 30 | Chords in key of C Major 31 | 32 | ![Major](/1.png) 33 | 34 | A Major - 3 sharps in key 35 | 36 | ![sharps](/2.png) 37 | 38 | Modes 39 | 40 | ![modes](/3.png) 41 | 42 | Notes in common chords 43 | 44 | ![notes in chord](/4.png) 45 | 46 | Adom7 chord shown on Mixolydian scale 47 | 48 | ![notes in chord](/5.png) 49 | 50 | Common chord progressions 51 | 52 | ![Chord progressions](/6.png) 53 | 54 | Click on center to find key from chords 55 | 56 | ![Find key from chords](/7.png) 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /keyfromchords.py: -------------------------------------------------------------------------------- 1 | import circle 2 | from musthe import * 3 | 4 | keys0 = ['C', 'G', 'D', 'A', 'E', 'B', 'F#', 'Db', 'Ab', 'Eb', 'Bb', 'F'] 5 | keys0_sharp = ['C', 'G', 'D', 'A', 'E', 'B', 'F#', 'C#', 'G#', 'D#', 'A#', 'F'] 6 | keys0x2 = keys0 + keys0 7 | keys0_sx2 = keys0_sharp + keys0_sharp 8 | 9 | keys_chords = [] 10 | for key in keys0: 11 | chords = [] 12 | c = circle.CircleOfFifths(Note(key)) 13 | for chord in c.chords(): 14 | chords.append(chord[3]) 15 | keys_chords.append(chords) 16 | 17 | def findKeyFromChords(mychords, *args): 18 | if args: 19 | majmin = args[0] 20 | else: 21 | majmin = False 22 | 23 | if mychords == '' or mychords == []: 24 | return [] 25 | 26 | sharpchords = mychords.copy() 27 | flatchords = mychords.copy() 28 | i = 0 29 | 30 | for c in sharpchords: 31 | major = c.split('m') 32 | if len(major) == 2: 33 | minor = 'm' 34 | else: 35 | minor = '' 36 | 37 | try: 38 | if major[0] == 'Gb': 39 | major = 'F#'+minor 40 | else: 41 | sharp = keys0_sharp[keys0x2.index(major[0])]+minor 42 | sharpchords[i] = sharp 43 | except ValueError: 44 | pass 45 | finally: 46 | i = i + 1 47 | 48 | i = 0 49 | for c in flatchords: 50 | major = c.split('m') 51 | if len(major) == 2: 52 | minor = 'm' 53 | else: 54 | minor = '' 55 | 56 | try: 57 | if major[0] == 'F#': 58 | flat = 'Gb'+minor 59 | else: 60 | flat = keys0[keys0_sx2.index(major[0])]+minor 61 | flatchords[i] = flat 62 | except ValueError: 63 | pass 64 | finally: 65 | i = i + 1 66 | 67 | possible_keys = [] 68 | i = 0 69 | for keys in keys_chords: 70 | if all(elem in keys_chords[i] for elem in flatchords) or all(elem in keys_chords[i] for elem in sharpchords): 71 | major = keys_chords[i][0] 72 | try: 73 | minor = keys0x2[keys0_sx2.index(major) + 3] 74 | except ValueError: 75 | minor = keys0x2[keys0x2.index(major) + 3] 76 | 77 | if majmin == 'minor': 78 | possible_keys.append(minor+'m') 79 | elif majmin == 'major': 80 | possible_keys.append(major) 81 | else: 82 | possible_keys.append(major) 83 | possible_keys.append(minor+'m') 84 | 85 | i = i + 1 86 | 87 | return possible_keys -------------------------------------------------------------------------------- /circle.py: -------------------------------------------------------------------------------- 1 | from musthe import * 2 | 3 | translateNote = { 4 | 'B#': 'C', 5 | 'E#': 'F', 6 | 'Fb': 'E', 7 | 'Cb': 'B', 8 | 'Ebb': 'D', 9 | 'Bbb': 'A' 10 | } 11 | 12 | modes = { 13 | 'Lydian': -1, 14 | 'Major': 0, 'Ionian': 0, 15 | 'Mixolydian': 1, 16 | 'Dorian': 2, 17 | 'Minor': 3, 'Aeolian': 3, 18 | 'Phrygian': 4, 19 | 'Locrian': 5 20 | } 21 | 22 | class CircleOfFifths(): 23 | def __init__(self, key, **args): 24 | self.mode = 'Major' 25 | if args: 26 | for k,v in args.items(): 27 | if k == 'mode': 28 | self.mode = v 29 | 30 | fifth = Interval('P5') 31 | fourth = Interval('P4') 32 | 33 | n = key 34 | if n == Note('Gb'): 35 | n = Note('F#') 36 | self.circle = [] 37 | self.sharpcircle = [] 38 | 39 | for i in range(12): 40 | self.sharpcircle.append(n) 41 | n = (n + fifth).to_octave(4) 42 | i = i + 1 43 | 44 | self.circle = self.sharpcircle[:7] 45 | 46 | self.flatcircle = [] 47 | n = key 48 | for i in range(11): 49 | n = (n + fourth).to_octave(4) 50 | self.flatcircle.append(n) 51 | i = i + 1 52 | 53 | reverse_circle = self.flatcircle[:5] 54 | reverse_circle.reverse() 55 | self.circle = self.circle + reverse_circle 56 | 57 | self.circlestring = [] 58 | for n in self.circle: 59 | notestring = str(n.letter)+str(n.accidental) 60 | self.circlestring.append(translateNote.get(notestring,notestring)) 61 | 62 | def key_signature(self): 63 | 64 | c0_string = ['C', 'G', 'D', 'A', 'E', 'B', 'F#', 'Db', 'Ab', 'Eb', 'Bb', 'F'] 65 | c0_sharpstring = ['C', 'G', 'D', 'A', 'E', 'B', 'F#', 'C#', 'G#', 'D#', 'A#', 'F'] 66 | 67 | mode = modes[self.mode] 68 | 69 | try: 70 | sig = c0_string.index(self.circlestring[0]) - mode 71 | except AttributeError: 72 | sig = c0_sharpstring.index(self.circlestring[0]) - mode 73 | 74 | if( sig == 0 ): 75 | sigstring = '♮' 76 | elif( sig < 0 ): 77 | sigstring = str(-sig) + "b" 78 | elif( sig <= 6 ): 79 | sigstring = str(sig) + "#" 80 | else: 81 | sigstring = str(12-sig) + "b" 82 | 83 | return (sig, sigstring) 84 | 85 | def chords(self): 86 | 87 | mode = modes[self.mode] 88 | 89 | chord_template = { 90 | -1: ['I', 'V', 'II', 'vi', 'iii', 'vii', 'iv°', '', '', '', '', ''], 91 | 0: ['I', 'V', 'ii', 'vi', 'iii', 'vii°', '', '', '', '', '', 'IV'], 92 | 1: ['I', 'v', 'ii', 'vi', 'iii°', '', '', '', '', '', 'VII', 'IV'], 93 | 2: ['i', 'v', 'ii', 'vi°', '', '', '', '', '', 'III', 'VII', 'IV'], 94 | 3: ['i', 'v', 'ii°', '', '', '', '', '', 'VI', 'III', 'VII', 'iv'], 95 | 4: ['i', 'v°', '', '', '', '', '', 'II', 'VI', 'III', 'vii', 'iv'], 96 | 5: ['i°', '', '', '', '', '', 'V', 'II', 'VI', 'iii', 'vii', 'iv'] 97 | } 98 | 99 | chord_type = { 100 | -1: ['M', 'M', 'M', 'm', 'm', 'm', 'd', '', '', '', '', ''], 101 | 0: ['M', 'M', 'm', 'm', 'm', 'd', '', '', '', '', '', 'M'], 102 | 1: ['M', 'm', 'm', 'm', 'd', '', '', '', '', '', 'M', 'M'], 103 | 2: ['m', 'm', 'm', 'd', '', '', '', '', '', 'M', 'M', 'M'], 104 | 3: ['m', 'm', 'd', '', '', '', '', '', 'M', 'M', 'M', 'm'], 105 | 4: ['m', 'd', '', '', '', '', '', 'M', 'M', 'M', 'm', 'm'], 106 | 5: ['d', '', '', '', '', '', 'M', 'M', 'M', 'm', 'm', 'm'], 107 | } 108 | 109 | chord_numbering = { 110 | -1: [1, 5, 2, 6, 3, 7, 4, 0, 0, 0, 0, 0], 111 | 0: [1, 5, 2, 6, 3, 7, 0, 0, 0, 0, 0, 4], 112 | 1: [1, 5, 2, 6, 3, 0, 0, 0, 0, 0, 7, 4], 113 | 2: [1, 5, 2, 6, 0, 0, 0, 0, 0, 3, 7, 4], 114 | 3: [1, 5, 2, 0, 0, 0, 0, 0, 6, 3, 7, 4], 115 | 4: [1, 5, 0, 0, 0, 0, 0, 2, 6, 3, 7, 4], 116 | 5: [1, 0, 0, 0, 0, 0, 5, 2, 6, 3, 7, 4] 117 | } 118 | 119 | numbering = chord_numbering[mode] 120 | template = chord_template[mode] 121 | cformat = chord_type[mode] 122 | 123 | chords = [] 124 | for i in range(7): 125 | i = i + 1 126 | ind = numbering.index(i) 127 | chord_type = template[ind] 128 | chord = self.circlestring[ind] 129 | chord_format = cformat[ind] 130 | if chord_format == 'M': 131 | formatted_chord = chord 132 | elif chord_format == 'm': 133 | formatted_chord = chord+'m' 134 | elif chord_format == 'd': 135 | formatted_chord = chord+'°' 136 | 137 | chords.append((chord_type, chord, chord_format, formatted_chord)) 138 | 139 | return chords 140 | -------------------------------------------------------------------------------- /findkey.py: -------------------------------------------------------------------------------- 1 | from PyQt5 import QtWidgets, uic, QtCore, QtGui 2 | from pyparsing import Diagnostics 3 | from keyfromchords import findKeyFromChords 4 | import sys 5 | 6 | from keysfromchords_ui import Ui_Dialog 7 | 8 | import CircleOfFifths_rc 9 | 10 | majorcolor = "QPushButton {background-color : rgba(205, 253, 205, 80%)};" 11 | minorcolor = "QPushButton {background-color : rgba(173, 215, 229, 80%)};" 12 | 13 | 14 | def translate(string): 15 | string=string.replace('b', '') 16 | string=string.replace('#', '♯') 17 | return string 18 | 19 | """class FindKeyUi(QtWidgets.QDialog): 20 | def __init__(self): 21 | super(FindKeyUi, self).__init__() 22 | uic.loadUi('keyfromchords.ui', self)""" 23 | 24 | 25 | class FindKeyUi(QtWidgets.QDialog, Ui_Dialog): 26 | def __init__(self, *args, obj=None, **kwargs): 27 | super(FindKeyUi, self).__init__(*args, **kwargs) 28 | self.setupUi(self) 29 | 30 | self.chords = [] 31 | self.majorMinor = False 32 | 33 | self.cButton.clicked.connect(lambda: self.addChord('C')) 34 | self.dButton.clicked.connect(lambda: self.addChord('D')) 35 | self.eButton.clicked.connect(lambda: self.addChord('E')) 36 | self.fButton.clicked.connect(lambda: self.addChord('F')) 37 | self.gButton.clicked.connect(lambda: self.addChord('G')) 38 | self.aButton.clicked.connect(lambda: self.addChord('A')) 39 | self.bButton.clicked.connect(lambda: self.addChord('B')) 40 | 41 | self.csButton.clicked.connect(lambda: self.addChord('C#')) 42 | self.dsButton.clicked.connect(lambda: self.addChord('D#')) 43 | self.fsButton.clicked.connect(lambda: self.addChord('F#')) 44 | self.gsButton.clicked.connect(lambda: self.addChord('G#')) 45 | self.asButton.clicked.connect(lambda: self.addChord('A#')) 46 | 47 | self.dbButton.clicked.connect(lambda: self.addChord('Db')) 48 | self.ebButton.clicked.connect(lambda: self.addChord('Eb')) 49 | self.gbButton.clicked.connect(lambda: self.addChord('F#')) 50 | self.abButton.clicked.connect(lambda: self.addChord('Ab')) 51 | self.bbButton.clicked.connect(lambda: self.addChord('Bb')) 52 | 53 | self.cButton_2.clicked.connect(lambda: self.addChord('Cm')) 54 | self.dButton_2.clicked.connect(lambda: self.addChord('Dm')) 55 | self.eButton_2.clicked.connect(lambda: self.addChord('Em')) 56 | self.fButton_2.clicked.connect(lambda: self.addChord('Fm')) 57 | self.gButton_2.clicked.connect(lambda: self.addChord('Gm')) 58 | self.aButton_2.clicked.connect(lambda: self.addChord('Am')) 59 | self.bButton_2.clicked.connect(lambda: self.addChord('Bm')) 60 | 61 | self.csButton_2.clicked.connect(lambda: self.addChord('C#m')) 62 | self.dsButton_2.clicked.connect(lambda: self.addChord('D#m')) 63 | self.fsButton_2.clicked.connect(lambda: self.addChord('F#m')) 64 | self.gsButton_2.clicked.connect(lambda: self.addChord('G#m')) 65 | self.asButton_2.clicked.connect(lambda: self.addChord('A#m')) 66 | 67 | self.dbButton_2.clicked.connect(lambda: self.addChord('Dbm')) 68 | self.ebButton_2.clicked.connect(lambda: self.addChord('Ebm')) 69 | self.gbButton_2.clicked.connect(lambda: self.addChord('F#m')) 70 | self.abButton_2.clicked.connect(lambda: self.addChord('Abm')) 71 | self.bbButton_2.clicked.connect(lambda: self.addChord('Bbm')) 72 | 73 | self.majorMinorSlider.valueChanged.connect(self.majorOrMinor) 74 | 75 | self.setWindowTitle("Find key from chords") 76 | self.setWindowIcon(QtGui.QIcon(":/images/signature.ico")) 77 | 78 | self.keyButtons = [] 79 | 80 | self.show() 81 | 82 | def majorOrMinor(self): 83 | if self.majorMinorSlider.value() == 0: 84 | self.majorMinor = 'major' 85 | elif self.majorMinorSlider.value() == 2: 86 | self.majorMinor = 'minor' 87 | else: 88 | self.majorMinor = False 89 | self.getPossibleKeys() 90 | 91 | def addChord(self, chord): 92 | if chord in self.chords: 93 | self.chords.remove(chord) 94 | else: 95 | self.chords.append(chord) 96 | self.getPossibleKeys() 97 | 98 | def getPossibleKeys(self): 99 | self.keys = findKeyFromChords(self.chords, self.majorMinor) 100 | if self.keyButtons != []: 101 | for button in self.keyButtons: 102 | self.deleteKeyButton(button) 103 | 104 | if self.keys != []: 105 | for k in self.keys: 106 | self.makeKeyButton(k) 107 | 108 | def makeKeyButton(self, key): 109 | self.keyButton = QtWidgets.QPushButton(self.keyWidget) 110 | self.keyButton.setMinimumSize(QtCore.QSize(60, 50)) 111 | self.keyButton.setMaximumSize(QtCore.QSize(60, 50)) 112 | font = QtGui.QFont() 113 | font.setPointSize(16) 114 | self.keyButton.setFont(font) 115 | if 'm' in key: 116 | self.keyButton.setStyleSheet(minorcolor) 117 | else: 118 | self.keyButton.setStyleSheet(majorcolor) 119 | self.keyButton.setCheckable(True) 120 | self.keyButton.setObjectName(key+"keyButton") 121 | self.keyButton.setText(key) 122 | self.horizontalLayout_4.addWidget(self.keyButton) 123 | 124 | self.keyButton.clicked.connect(lambda: self.chooseKey(key)) 125 | self.keyButtons.append(self.keyButton) 126 | 127 | def chooseKey(self, key): 128 | self.keys = key 129 | self.close() 130 | 131 | def deleteKeyButton(self, button): 132 | try: 133 | self.horizontalLayout_4.removeWidget(button) 134 | button.deleteLater() 135 | button = None 136 | except RuntimeError: 137 | pass 138 | 139 | if __name__ == '__main__': 140 | app = QtWidgets.QApplication(sys.argv) 141 | window = FindKeyUi() 142 | app.exec_() -------------------------------------------------------------------------------- /tonnetz.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from PyQt5.QtWidgets import ( 3 | QApplication, QGraphicsView, QGraphicsScene, QGraphicsEllipseItem, 4 | QGraphicsTextItem, QMainWindow, QGraphicsDropShadowEffect 5 | ) 6 | from PyQt5.QtGui import QBrush, QPen, QFont, QPainter, QColor 7 | from PyQt5.QtCore import Qt, QRectF, QPointF 8 | 9 | NODE_RADIUS = 18 10 | GRID_SIZE = 120 11 | 12 | CHROMATIC = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"] 13 | ENHARMONIC = { 14 | "Db": "C#", "Eb": "D#", "Gb": "F#", "Ab": "G#", "Bb": "A#", 15 | "Cb": "B", "Fb": "E", "E#": "F", "B#": "C" 16 | } 17 | 18 | def normalize_note(note): 19 | return ENHARMONIC.get(note, note) 20 | 21 | def fifth(note): 22 | idx = CHROMATIC.index(normalize_note(note)) 23 | return CHROMATIC[(idx + 7) % 12] 24 | 25 | def minor_third(note): 26 | idx = CHROMATIC.index(normalize_note(note)) 27 | return CHROMATIC[(idx + 3) % 12] 28 | 29 | def major_third(note): 30 | idx = CHROMATIC.index(normalize_note(note)) 31 | return CHROMATIC[(idx + 4) % 12] 32 | 33 | def pretty_note(note): 34 | return note.replace("#", "♯").replace("b", "♭") 35 | 36 | class NoteNode(QGraphicsEllipseItem): 37 | def __init__(self, x, y, i, j, note, pretty, parent=None): 38 | super().__init__(x - NODE_RADIUS, y - NODE_RADIUS, NODE_RADIUS * 2, NODE_RADIUS * 2, parent) 39 | self.note = note 40 | self.pretty = pretty 41 | self.i = i 42 | self.j = j 43 | self.text_item = None 44 | self.setBrush(QBrush(Qt.white)) 45 | self.setPen(QPen(Qt.gray, 1)) 46 | self.setFlag(QGraphicsEllipseItem.ItemIsSelectable) 47 | self.setAcceptHoverEvents(True) 48 | self.setZValue(1) 49 | 50 | def set_text_item(self, text_item): 51 | self.text_item = text_item 52 | 53 | def set_glow(self, glow): 54 | if glow: 55 | effect = QGraphicsDropShadowEffect() 56 | effect.setBlurRadius(30) 57 | effect.setColor(QColor(255, 255, 0)) 58 | effect.setOffset(0) 59 | self.setGraphicsEffect(effect) 60 | else: 61 | self.setGraphicsEffect(None) 62 | 63 | class IsoGridScene(QGraphicsScene): 64 | def __init__(self, parent=None): 65 | super().__init__(parent) 66 | self.setSceneRect(-5000, -5000, 10000, 10000) 67 | self.grid_size = 40 68 | self.nodes = {} # (i, j): NoteNode 69 | self.note_to_nodes = {} # normalized note: set of NoteNode 70 | self.selected_triangles = set() 71 | self.draw_grid() 72 | 73 | def draw_grid(self): 74 | node_positions = {} 75 | for i in range(-self.grid_size, self.grid_size + 1): 76 | for j in range(-self.grid_size, self.grid_size + 1): 77 | x = (i - j) * GRID_SIZE / 2 78 | y = (i + j) * GRID_SIZE / 4 79 | node_positions[(i, j)] = (x, y) 80 | 81 | # Draw lines first (so they appear under the nodes) 82 | for (i, j), (x, y) in node_positions.items(): 83 | for di, dj in [ 84 | (1, 0), (-1, 0), (0, 1), (0, -1), (1, 1), (-1, -1) 85 | ]: 86 | neighbor = (i + di, j + dj) 87 | if neighbor in node_positions: 88 | nx, ny = node_positions[neighbor] 89 | self.addLine(x, y, nx, ny, QPen(Qt.lightGray, 1)) 90 | 91 | # BFS to fill the grid with note labels 92 | labels = {} 93 | center = (0, 0) 94 | labels[center] = "C" 95 | from collections import deque 96 | queue = deque() 97 | queue.append(center) 98 | while queue: 99 | i, j = queue.popleft() 100 | note = labels[(i, j)] 101 | # Above/up: (i-1, j-1) = one fifth above 102 | up = (i - 1, j - 1) 103 | if up in node_positions and up not in labels: 104 | labels[up] = fifth(note) 105 | queue.append(up) 106 | # Up and to the left: (i - 1, j) = one minor third above 107 | ul = (i - 1, j) 108 | if ul in node_positions and ul not in labels: 109 | labels[ul] = minor_third(note) 110 | queue.append(ul) 111 | # Up and to the right: (i, j - 1) = one major third above 112 | ur = (i, j - 1) 113 | if ur in node_positions and ur not in labels: 114 | labels[ur] = major_third(note) 115 | queue.append(ur) 116 | 117 | # Draw all nodes first 118 | for (i, j), (x, y) in node_positions.items(): 119 | note = labels.get((i, j)) 120 | if note is None: 121 | continue 122 | pretty = pretty_note(note) 123 | node = NoteNode(x, y, i, j, note, pretty) 124 | self.addItem(node) 125 | self.nodes[(i, j)] = node 126 | n_note = normalize_note(note) 127 | if n_note not in self.note_to_nodes: 128 | self.note_to_nodes[n_note] = [] 129 | self.note_to_nodes[n_note].append(node) 130 | 131 | # Draw all labels after nodes so they are on top 132 | for (i, j), node in self.nodes.items(): 133 | x = node.rect().center().x() + node.pos().x() 134 | y = node.rect().center().y() + node.pos().y() 135 | text = QGraphicsTextItem(node.pretty) 136 | text.setFont(QFont("Arial", 16, QFont.Bold)) 137 | text.setDefaultTextColor(Qt.black) 138 | text_rect = text.boundingRect() 139 | text.setPos(x - text_rect.width() / 2, y - text_rect.height() / 2) 140 | text.setZValue(10) 141 | self.addItem(text) 142 | node.set_text_item(text) 143 | 144 | def clear_glow(self): 145 | for node in self.nodes.values(): 146 | node.set_glow(False) 147 | 148 | def highlight_like_nodes(self, note): 149 | self.clear_glow() 150 | self.selected_triangles.clear() 151 | n_note = normalize_note(note) 152 | for node in self.note_to_nodes.get(n_note, []): 153 | node.set_glow(True) 154 | 155 | def highlight_triangle_apexes(self, apexes, expand=True): 156 | tri_set = frozenset(apexes) 157 | if tri_set in self.selected_triangles: 158 | # Deselect if already selected 159 | self.selected_triangles.remove(tri_set) 160 | elif expand and self.selected_triangles: 161 | # Expand if at least one apex is shared with any selected triangle 162 | for sel_tri in self.selected_triangles: 163 | if len(sel_tri & tri_set) >= 1: 164 | self.selected_triangles.add(tri_set) 165 | break 166 | else: 167 | # Not adjacent, start new selection 168 | self.selected_triangles = {tri_set} 169 | else: 170 | self.selected_triangles = {tri_set} 171 | self.clear_glow() 172 | for tri in self.selected_triangles: 173 | for apex in tri: 174 | if apex in self.nodes: 175 | self.nodes[apex].set_glow(True) 176 | # Collect all apexes from all selected triangles 177 | all_apexes = set() 178 | for tri in self.selected_triangles: 179 | all_apexes.update(tri) 180 | # Sort from lower to upper (descending i+j) 181 | sorted_apexes = sorted(all_apexes, key=lambda x: x[0] + x[1], reverse=True) 182 | # Eliminate duplicate notes (by pretty label, preserving order) 183 | seen = set() 184 | notes = [] 185 | for apex in sorted_apexes: 186 | pretty = self.nodes[apex].pretty 187 | if pretty not in seen: 188 | notes.append(pretty) 189 | seen.add(pretty) 190 | print("-".join(notes)) 191 | 192 | def find_triangle_under_point(self, point): 193 | # For each triangle in the grid, check if point is inside and has a "vertical" (up-down axis) side 194 | for (i, j), node in self.nodes.items(): 195 | tri_list = [ 196 | [(i, j), (i-1, j), (i, j-1)], # up-right 197 | [(i, j), (i+1, j), (i, j+1)], # down-left 198 | [(i, j), (i-1, j-1), (i, j-1)], # up 199 | [(i, j), (i+1, j+1), (i, j+1)], # down 200 | [(i, j), (i-1, j-1), (i-1, j)], # up-left 201 | [(i, j), (i+1, j+1), (i+1, j)] # down-right 202 | ] 203 | for tri in tri_list: 204 | if all(apex in self.nodes for apex in tri): 205 | # Check for a "vertical" (up-down axis) pair: (i2-i1)==(j2-j1)==±1 206 | has_vertical = False 207 | for idx1 in range(3): 208 | for idx2 in range(idx1+1, 3): 209 | i1, j1 = tri[idx1] 210 | i2, j2 = tri[idx2] 211 | if abs(i2 - i1) == 1 and abs(j2 - j1) == 1 and (i2 - i1) == (j2 - j1): 212 | has_vertical = True 213 | if has_vertical: 214 | pts = [self.nodes[apex].rect().center() + self.nodes[apex].pos() for apex in tri] 215 | if point_in_triangle(point, pts[0], pts[1], pts[2]): 216 | return tri 217 | return None 218 | 219 | def point_in_triangle(p, a, b, c): 220 | # Barycentric technique 221 | def det(p1, p2, p3): 222 | return (p2.x() - p1.x()) * (p3.y() - p1.y()) - (p3.x() - p1.x()) * (p2.y() - p1.y()) 223 | d1 = det(p, a, b) 224 | d2 = det(p, b, c) 225 | d3 = det(p, c, a) 226 | has_neg = (d1 < 0) or (d2 < 0) or (d3 < 0) 227 | has_pos = (d1 > 0) or (d2 > 0) or (d3 > 0) 228 | return not (has_neg and has_pos) 229 | 230 | class IsoGridView(QGraphicsView): 231 | def __init__(self, scene): 232 | super().__init__(scene) 233 | self.setRenderHint(QPainter.Antialiasing) 234 | self.setDragMode(QGraphicsView.ScrollHandDrag) 235 | self.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate) 236 | self.setTransformationAnchor(QGraphicsView.AnchorUnderMouse) 237 | self.setResizeAnchor(QGraphicsView.AnchorUnderMouse) 238 | self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn) 239 | self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) 240 | self.setWindowTitle("Isometric Grid") 241 | self._mouse_press_pos = None 242 | 243 | def wheelEvent(self, event): 244 | if event.modifiers() & Qt.ControlModifier: 245 | factor = 1.25 if event.angleDelta().y() > 0 else 0.8 246 | self.scale(factor, factor) 247 | else: 248 | super().wheelEvent(event) 249 | 250 | def mousePressEvent(self, event): 251 | if event.button() == Qt.LeftButton: 252 | self._mouse_press_pos = event.pos() 253 | super().mousePressEvent(event) 254 | 255 | def mouseReleaseEvent(self, event): 256 | if event.button() == Qt.LeftButton and self._mouse_press_pos is not None: 257 | dist = (event.pos() - self._mouse_press_pos).manhattanLength() 258 | if dist < 5: 259 | scene_pos = self.mapToScene(event.pos()) 260 | # Check if the click is close to any node center 261 | closest_node = None 262 | min_dist = float('inf') 263 | for node in self.scene().nodes.values(): 264 | node_center = node.sceneBoundingRect().center() 265 | d = (scene_pos - node_center).manhattanLength() 266 | if d < min_dist: 267 | min_dist = d 268 | closest_node = node 269 | if min_dist < NODE_RADIUS * 0.9: 270 | self.scene().highlight_like_nodes(closest_node.note) 271 | super().mouseReleaseEvent(event) 272 | return 273 | # Otherwise, check for triangle 274 | tri = self.scene().find_triangle_under_point(scene_pos) 275 | if tri: 276 | self.scene().highlight_triangle_apexes(tri, expand=True) 277 | else: 278 | self.scene().clear_glow() 279 | super().mouseReleaseEvent(event) 280 | 281 | class MainWindow(QMainWindow): 282 | def __init__(self): 283 | super().__init__() 284 | scene = IsoGridScene() 285 | view = IsoGridView(scene) 286 | self.setCentralWidget(view) 287 | self.resize(1000, 800) 288 | self.setWindowTitle("Isometric Grid with Circular Nodes") 289 | 290 | if __name__ == "__main__": 291 | app = QApplication(sys.argv) 292 | window = MainWindow() 293 | window.show() 294 | sys.exit(app.exec_()) -------------------------------------------------------------------------------- /CircleOfFifths.py: -------------------------------------------------------------------------------- 1 | from PyQt5 import QtWidgets, uic, QtGui, QtCore 2 | import sys 3 | from circle import CircleOfFifths 4 | from musthe import * 5 | from circle_ui import Ui_MainWindow 6 | from chordprogression import progression 7 | from findkey import FindKeyUi 8 | 9 | play_sounds = False 10 | 11 | try: 12 | from play_sounds import * 13 | play_sounds = True 14 | except ModuleNotFoundError: 15 | print("Install the tinysoundfont package if you want sound support.") 16 | 17 | transparent = "background-color: rgba(255, 255, 255, 0%);" 18 | 19 | labelColors = [ 20 | "background-color: rgba(205, 253, 205, 80%);", 21 | "background-color: rgba(147, 223, 199, 80%);", 22 | "background-color: rgba(173, 215, 229, 80%);", 23 | "background-color: rgba(247, 247, 185, 80%);", 24 | "background-color: rgba(255, 210, 127, 80%);", 25 | "background-color: rgba(254, 160, 122, 80%);", 26 | "background-color: rgba(217, 170, 174, 80%);" 27 | ] 28 | 29 | translateNote = { 30 | 'B#': 'C', 31 | 'E#': 'F', 32 | 'Fb': 'E', 33 | 'Cb': 'B', 34 | 'Ebb': 'D', 35 | 'Bbb': 'A' 36 | } 37 | 38 | chord_colors = { 39 | 'm': labelColors[2], 40 | 'M': labelColors[0], 41 | 'd': labelColors[6], 42 | 'P': labelColors[0], 43 | 'A': labelColors[5], 44 | 'P1': "background-color: red; color: white;" 45 | } 46 | 47 | modes = { 48 | 'Lydian': -1, 49 | 'Major': 0, 'Ionian': 0, 50 | 'Mixolydian': 1, 51 | 'Dorian': 2, 52 | 'Minor': 3, 'Aeolian': 3, 53 | 'Phrygian': 4, 54 | 'Locrian': 5 55 | } 56 | 57 | chord_types = { 58 | 'maj': [0, 4, 1], 59 | 'min': [0, 9, 1], 60 | 'dom7': [0, 4, 1, 10], 61 | 'min7': [0, 9, 1, 10], 62 | 'maj7': [0, 4, 1, 5] 63 | } 64 | 65 | def translate(string): 66 | string=string.replace('b', '♭') 67 | string=string.replace('#', '♯') 68 | return string 69 | 70 | 71 | """class Ui(QtWidgets.QMainWindow): 72 | 73 | QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True) #enable highdpi scaling 74 | QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True) #use highdpi icons 75 | 76 | def __init__(self): 77 | super(Ui, self).__init__() 78 | uic.loadUi('CircleOfFifths.ui', self)""" 79 | 80 | class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): 81 | 82 | #QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True) #enable highdpi scaling 83 | #QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True) #use highdpi icons 84 | 85 | def __init__(self, *args, obj=None, **kwargs): 86 | super(MainWindow, self).__init__(*args, **kwargs) 87 | self.setupUi(self) 88 | 89 | self.setWindowTitle("Circle of Fifths") 90 | self.setWindowIcon(QtGui.QIcon(":/images/signature.ico")) 91 | self.setFixedSize(674, 736) 92 | 93 | self.first = True 94 | self.chordsInKey = True 95 | self.showSharps = True 96 | 97 | self.proglabels = [ 98 | self.prog1, 99 | self.prog2, 100 | self.prog3, 101 | self.prog4 102 | ] 103 | 104 | self.progchordlabels = [ 105 | self.chordprog1, 106 | self.chordprog2, 107 | self.chordprog3, 108 | self.chordprog4 109 | ] 110 | 111 | self.labels = [ 112 | self.CLabel, 113 | self.GLabel, 114 | self.DLabel, 115 | self.ALabel, 116 | self.ELabel, 117 | self.BLabel, 118 | self.FsLabel, 119 | self.DbLabel, 120 | self.AbLabel, 121 | self.EbLabel, 122 | self.BbLabel, 123 | self.FLabel 124 | ] 125 | 126 | self.chordLabels = [ 127 | self.chordLabel0, 128 | self.chordLabel1, 129 | self.chordLabel2, 130 | self.chordLabel3, 131 | self.chordLabel4, 132 | self.chordLabel5, 133 | self.chordLabel6, 134 | self.chordLabel7, 135 | self.chordLabel8, 136 | self.chordLabel9, 137 | self.chordLabel10, 138 | self.chordLabel11 139 | ] 140 | 141 | self.chordPrintLabels = [ 142 | self.onechord, 143 | self.twochord, 144 | self.threechord, 145 | self.fourchord, 146 | self.fivechord, 147 | self.sixchord, 148 | self.sevenchord 149 | ] 150 | 151 | self.intervalLabels = [ 152 | self.onechord_2, 153 | self.twochord_2, 154 | self.threechord_2, 155 | self.fourchord_2, 156 | self.fivechord_2, 157 | self.sixchord_2, 158 | self.sevenchord_2 159 | ] 160 | 161 | self.mode = 'Major' 162 | self.key = 'C' 163 | self.modeBox.addItems(modes.keys()) 164 | self.modeBox.activated.connect(self.changeMode) 165 | self.modeBox.keypressed.connect(self.keyPress) 166 | self.modeBox.right.connect(lambda attr='Right': self.rotate(attr)) 167 | self.modeBox.left.connect(lambda attr='Left': self.rotate(attr)) 168 | self.modeBox.space.connect(self.toggleMode) 169 | 170 | self.modeSlider.valueChanged.connect(self.changeCircleMode) 171 | self.sharpsProgSlider.valueChanged.connect(self.sharpsOrProg) 172 | 173 | self.modeBox.progressions.connect(self.toggleSharpsOrProg) 174 | 175 | self.c0 = ['C', 'G', 'D', 'A', 'E', 'B', 'F#', 'Db', 'Ab', 'Eb', 'Bb', 'F'] 176 | 177 | for l in self.labels: 178 | l.clicked.connect(lambda val=self.c0[self.labels.index(l)]: self.setkey(val)) 179 | l.right_clicked.connect(lambda val=self.c0[self.labels.index(l)]: self.play(val, 'chord')) 180 | l.control.connect(lambda val=self.c0[self.labels.index(l)]: self.play(val, 'note')) 181 | l.shift.connect(lambda val=self.c0[self.labels.index(l)]: self.play(val, 'arpeggio')) 182 | 183 | for i, l in enumerate(self.chordPrintLabels): 184 | l.clicked.connect(lambda val=i: self.play_scale(val, 'clicked')) 185 | l.right_clicked.connect(lambda val=i: self.play_scale(val, 'right_clicked')) 186 | l.shift.connect(lambda val=i: self.play_scale(val, 'shift_clicked')) 187 | 188 | self.SharpFlatLabel.clicked.connect(self.findKey) 189 | 190 | self.statusbar.showMessage('Click on root note.') 191 | 192 | self.modeBox.setCurrentIndex(1) 193 | self.frameOfProgressions.hide() 194 | 195 | self.findWindow = None 196 | self.setkey(self.key) 197 | 198 | def play_scale(self, val, sound_type='chord'): 199 | if self.chordsInKey: 200 | chord = self.circle.chords()[val] 201 | rootnote = chord[1] 202 | chord_type = chord[2] 203 | if chord_type == 'd': 204 | chord_type = 'dim' 205 | chord = Chord(Note(rootnote), chord_type) 206 | if sound_type=='clicked': 207 | play_chord([ Note(rootnote) ]) 208 | elif sound_type=='right_clicked': 209 | play_chord(chord.notes) 210 | elif sound_type=='shift_clicked': 211 | play_arpeggio(chord.notes) 212 | else: 213 | notes = [ Note(n[1]) for n in self.notesInChord ] 214 | note = Scale(Note(self.key), name = self.mapChordToScale())[val] 215 | if sound_type=='clicked': 216 | play_chord([ note ]) 217 | elif sound_type=='right_clicked': 218 | play_chord( notes ) 219 | elif sound_type=='shift_clicked': 220 | play_arpeggio( notes ) 221 | 222 | 223 | def play(self, val, sound_type): 224 | if self.chordsInKey: 225 | type = 'M' 226 | for chord in self.circle.chords(): 227 | if chord[1] == val: 228 | type = chord[2] 229 | break 230 | 231 | if type == 'd': 232 | type = 'dim' 233 | 234 | chord = Chord(Note(val), type) 235 | 236 | else: 237 | chord = self.chord 238 | 239 | if sound_type=='note': 240 | single_note = Note(val) 241 | 242 | if play_sounds: 243 | if sound_type=='note': 244 | play_chord([ single_note ]) 245 | elif sound_type=='chord': 246 | play_chord(chord.notes) 247 | else: 248 | play_arpeggio(chord.notes) 249 | 250 | 251 | def findKey(self): 252 | if self.chordsInKey: 253 | if not self.findWindow: 254 | px = self.geometry().x() 255 | py = self.geometry().y() 256 | self.findWindow = FindKeyUi() 257 | dw = self.findWindow.width() 258 | dh = self.findWindow.height() 259 | self.findWindow.setGeometry(px, py + 150, dw, dh) 260 | self.findWindow.exec_() 261 | 262 | try: 263 | if isinstance(self.findWindow.keys, str): 264 | if 'm' not in self.findWindow.keys: 265 | self.mode = 'Major' 266 | self.modeBox.setCurrentIndex(1) 267 | self.setkey(self.findWindow.keys) 268 | else: 269 | self.mode = 'Minor' 270 | self.modeBox.setCurrentIndex(5) 271 | self.setkey(self.findWindow.keys.split('m')[0]) 272 | 273 | self.statusbar.showMessage("Key set to {0}".format(self.findWindow.keys), 10000) 274 | except AttributeError: 275 | pass 276 | finally: 277 | self.findWindow = None 278 | 279 | else: 280 | self.findWindow.show() 281 | 282 | def updateProgressions(self): 283 | majorpatterns = [ 284 | ( 285 | [0, 3, 4], 286 | { 287 | 0: 'I', 288 | 3: 'IV', 289 | 4: 'V', 290 | } 291 | ), 292 | ( 293 | [0, 5, 3, 4], 294 | { 295 | 0: 'I', 296 | 5: 'vi', 297 | 3: 'IV', 298 | 4: 'V', 299 | } 300 | ), 301 | ( 302 | [5, 3, 0, 4], 303 | { 304 | 5: 'vi', 305 | 0: 'I', 306 | 3: 'IV', 307 | 4: 'V', 308 | } 309 | ), 310 | ( 311 | [0, 5, 1, 4], 312 | { 313 | 0: 'I', 314 | 5: 'vi', 315 | 1: 'ii', 316 | 4: 'V', 317 | } 318 | ) 319 | ] 320 | 321 | minorpatterns = [ 322 | ( 323 | [0, 3, 4], 324 | { 325 | 0: 'i', 326 | 3: 'iv', 327 | 4: 'v' 328 | } 329 | ), 330 | ( 331 | [0, 3, 4], 332 | { 333 | 0: 'i', 334 | 3: 'iv', 335 | 4: 'V' 336 | } 337 | ), 338 | ( 339 | [0, 1, 4, 0], 340 | { 341 | 0: 'i', 342 | 1: 'ii°', 343 | 4: 'V' 344 | } 345 | ), 346 | ( 347 | [0, 5, 2, 6], 348 | { 349 | 0: 'i', 350 | 5: 'VI', 351 | 2: 'III', 352 | 6: 'VII' 353 | } 354 | ) 355 | ] 356 | 357 | for i in range(4): 358 | if self.mode in ['Major', 'Lydian', 'Mixolydian', 'Ionian', 'maj']: 359 | p = progression(self.key, majorpatterns[i], 'Major') 360 | else: 361 | p = progression(self.key, minorpatterns[i], 'natural_minor') 362 | pat = '' 363 | for s in p[0]: 364 | pat = pat + "{0} - ".format(s) 365 | pat = pat[:len(pat)-2] 366 | cho = '' 367 | for s in p[1]: 368 | cho = cho + "{0} - ".format(s) 369 | cho = cho[:len(cho)-2] 370 | self.proglabels[i].setText(pat) 371 | self.progchordlabels[i].setText(cho) 372 | self.modeBox.setFocus() 373 | 374 | # Selects which scale to use for each type of chord. 375 | def mapChordToScale(self): 376 | if self.mode in ['maj', 'maj7']: 377 | self.ScaleLabel.setText('Major Scale') 378 | return 'major' 379 | elif self.mode == 'dom7': 380 | self.ScaleLabel.setText('Mixolydian Scale') 381 | return 'mixolydian' 382 | else: 383 | self.ScaleLabel.setText('Minor Scale') 384 | return 'natural_minor' 385 | 386 | # Rotates in clockwise or anti-clockwise direction. 387 | def rotate(self, direction): 388 | self.clockface = self.c0.index(self.key) 389 | if direction == 'Right': 390 | if self.clockface == 11: 391 | self.key = 'C' 392 | self.clockface = 0 393 | else: 394 | self.clockface = self.clockface + 1 395 | self.key = self.c0[self.clockface] 396 | else: 397 | if self.clockface == 0: 398 | self.key = 'F' 399 | self.clockface = 11 400 | else: 401 | self.clockface = self.clockface - 1 402 | self.key = self.c0[self.clockface] 403 | 404 | self.setkey(self.key) 405 | 406 | # This runs when slider is activated. Toggles between chords in key or notes on chord. 407 | def toggleMode(self): 408 | if self.modeSlider.value() == 1: 409 | self.modeSlider.setValue(0) 410 | else: 411 | self.modeSlider.setValue(1) 412 | 413 | def toggleSharpsOrProg(self): 414 | if self.sharpsProgSlider.value() == 1: 415 | self.sharpsProgSlider.setValue(0) 416 | else: 417 | self.sharpsProgSlider.setValue(1) 418 | 419 | def sharpsOrProg(self): 420 | if self.sharpsProgSlider.value() == 1: 421 | self.showSharps = False 422 | self.frameOfProgressions.show() 423 | self.SharpFlatLabel.hide() 424 | else: 425 | self.showSharps = True 426 | self.frameOfProgressions.hide() 427 | self.SharpFlatLabel.show() 428 | 429 | self.modeBox.setFocus() 430 | 431 | # Changes ths mode of the circle: chords in key or notes on chord. 432 | def changeCircleMode(self): 433 | if self.modeSlider.value() == 1: 434 | self.chordsInKey = False 435 | self.modeBox.clear() 436 | self.modeBox.addItems(chord_types.keys()) 437 | if self.mode == 'Major': 438 | self.modeBox.setCurrentIndex(0) 439 | else: 440 | self.modeBox.setCurrentIndex(1) 441 | else: 442 | self.chordsInKey = True 443 | self.modeBox.clear() 444 | self.modeBox.addItems(modes.keys()) 445 | if self.mode == 'maj': 446 | self.modeBox.setCurrentIndex(1) 447 | else: 448 | self.modeBox.setCurrentIndex(5) 449 | 450 | self.changeMode() 451 | self.modeBox.setFocus() 452 | 453 | # This runs when pressing the space bar. Toggles between chords in key or notes on chord. 454 | def keyPress(self): 455 | if ( self.mode == 'Major' or self.mode == 'maj' ): 456 | if self.chordsInKey: 457 | self.mode = 'Minor' 458 | self.modeBox.setCurrentIndex(5) 459 | else: 460 | self.mode = 'min' 461 | self.modeBox.setCurrentIndex(1) 462 | else: 463 | if self.chordsInKey: 464 | self.mode = 'Major' 465 | self.modeBox.setCurrentIndex(1) 466 | else: 467 | self.mode = 'maj' 468 | self.modeBox.setCurrentIndex(0) 469 | 470 | self.changeMode() 471 | 472 | #Get the mode or chord type from the dropdown menu, then set the key and paint the circle. 473 | def changeMode(self): 474 | self.mode = self.modeBox.currentText() 475 | self.setkey(self.key) 476 | 477 | # Sets the key according to user input. 478 | def setkey(self, key): 479 | if self.first: 480 | self.first = False 481 | self.statusbar.showMessage('"m" switches between Major and Minor modes. Try space, "p", and arrow keys. Try Ctrl- and Shift-clicking for sound output.', 20000) 482 | 483 | # Set the key label in the upper left corner to the selected key. 484 | self.keyLabel.setText(translate(key)) 485 | self.key = key 486 | 487 | # Get the "clockface" index, i.e. the position on the "basic" circle of the new key. 0 for C, 1 for G, etc. 488 | self.clockface = self.c0.index(self.key) 489 | 490 | # Repaint the circle. 491 | self.updateCircle() 492 | # Update the color labels on the notes, the chord types (I, ii, iii, etc.) in the inner circle plus the actual chords at the bottom. 493 | self.updateChords() 494 | 495 | # Update the actual circle of fifths according to user input. 496 | def updateCircle(self): 497 | # Generate the abstract circle of fifths from the key and the mode. 498 | self.circle = CircleOfFifths(Note(self.key), mode=self.mode) 499 | 500 | # Create the "clockstring", i.e. the string of note labels to be written starting from 12 o'clock on the circle. 501 | # It will always start with a C, but the flats and sharps will vary. 502 | self.clockstring = self.circle.circlestring[12-self.clockface:]+self.circle.circlestring[:12-self.clockface] 503 | 504 | # Write the clockstring onto the labels. 505 | i = 0 506 | for l in self.labels: 507 | l.setText(translate(self.clockstring[i])) 508 | i = i + 1 509 | 510 | if self.chordsInKey: 511 | # Set the number of sharps or flats in the middle of the circle. Do this only when in chords in key mode. 512 | self.SharpFlatLabel.setText(translate(self.circle.key_signature()[1])) 513 | else: 514 | self.SharpFlatLabel.setText('') 515 | 516 | self.chord = Chord(Note(self.key), self.modeBox.currentText()) 517 | 518 | # Otherwise, get the notes in the selected chord. 519 | self.notesInChord = [] 520 | i = 0 521 | for n in self.chord.notes: 522 | notestring = str(n.letter)+str(n.accidental) 523 | self.notesInChord.append([self.chord.recipes[self.modeBox.currentText()][i], notestring]) 524 | i = i + 1 525 | 526 | # Update the "inner labels" on the circle. 527 | def updateChords(self): 528 | 529 | # Reset everything. 530 | for l in self.chordLabels: 531 | l.setText('') 532 | 533 | for l in self.labels: 534 | l.setStyleSheet(transparent) 535 | 536 | # If in chords in key mode, set the I, ii, iii, etc. labels. 537 | if self.chordsInKey: 538 | self.ScaleLabel.setText('') 539 | 540 | chord_index = 0 541 | for c in self.circle.chords(): 542 | # The type of chord, e.g. 'I'-chord 543 | text = c[0] 544 | # The note, e.g. 'G' 545 | note = c[1] 546 | # The type of chord, i.e. Major, minor, diminished. 547 | ctype = c[2] 548 | # The actual chord, e.g. Gbm. 549 | chord = c[3] 550 | 551 | # Set the labels at the bottom. 552 | self.intervalLabels[chord_index].setText(text) 553 | 554 | for i in range(12): 555 | l = self.labels[i] 556 | 557 | # When we get a match for our chord, set the appropriate background color for the note, then set the inner circle chord indicators. 558 | if l.text() == translate(note): 559 | self.chordLabels[i].setText(text) 560 | l.setStyleSheet(chord_colors[ctype]) 561 | i = i + 1 562 | 563 | # Update the chords at the very bottom. 564 | self.chordPrintLabels[chord_index].setText(translate(chord)) 565 | self.chordPrintLabels[chord_index].setStyleSheet(chord_colors[ctype]) 566 | 567 | chord_index = chord_index + 1 568 | else: 569 | # Else write out the scale and indicate the intervals. 570 | scale = Scale(Note(self.key), name = self.mapChordToScale()) # Gets the approprite scale, major or natural minor. 571 | 572 | # Gets the intervals and writes them to the bottom labels. 573 | intervals = [str(i) for i in scale.intervals] 574 | for i in range(7): 575 | self.intervalLabels[i].setText(intervals[i]) 576 | 577 | # Makes the list of scale notes 578 | scale_labels = [] 579 | for n in scale.notes: 580 | note = str(n.letter)+n.accidental 581 | scale_labels.append(note) 582 | 583 | # Writes the intervals to the labels. 584 | for i in range(7): 585 | self.chordPrintLabels[i].setText(translate(translateNote.get(scale_labels[i], scale_labels[i]))) 586 | self.chordPrintLabels[i].setStyleSheet(transparent) 587 | 588 | i = 0 589 | for n in self.notesInChord: 590 | # The interval, e.g. "P4" 591 | interval = n[0] 592 | interval_on_scale = interval[1] 593 | if interval == 'P1': 594 | self.chordPrintLabels[int(interval_on_scale)-1].setStyleSheet(chord_colors['P1']) 595 | else: 596 | self.chordPrintLabels[int(interval_on_scale)-1].setStyleSheet(chord_colors[interval[0]]) 597 | 598 | # The note, e.g. F#. 599 | note = n[1] 600 | 601 | recipe = chord_types[self.mode][i] 602 | 603 | hour = self.clockface+recipe 604 | if hour > 11: 605 | hour = hour - 12 606 | 607 | l = self.labels[hour] 608 | self.chordLabels[hour].setText(interval) 609 | if recipe == 0: 610 | l.setStyleSheet(chord_colors['P1']) 611 | else: 612 | l.setStyleSheet(chord_colors[interval[0]]) 613 | 614 | i = i + 1 615 | 616 | self.updateProgressions() 617 | 618 | app = QtWidgets.QApplication(sys.argv) 619 | #window = Ui() 620 | window = MainWindow() 621 | window.show() 622 | app.exec_() 623 | -------------------------------------------------------------------------------- /keysfromchords_ui.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'keyfromchords.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.6 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_Dialog(object): 15 | def setupUi(self, Dialog): 16 | Dialog.setObjectName("Dialog") 17 | Dialog.resize(837, 371) 18 | self.horizontalLayout_5 = QtWidgets.QHBoxLayout(Dialog) 19 | self.horizontalLayout_5.setObjectName("horizontalLayout_5") 20 | self.verticalLayout_12 = QtWidgets.QVBoxLayout() 21 | self.verticalLayout_12.setObjectName("verticalLayout_12") 22 | self.horizontalLayout = QtWidgets.QHBoxLayout() 23 | self.horizontalLayout.setObjectName("horizontalLayout") 24 | self.cButton = QtWidgets.QPushButton(Dialog) 25 | self.cButton.setMinimumSize(QtCore.QSize(60, 50)) 26 | self.cButton.setMaximumSize(QtCore.QSize(60, 50)) 27 | font = QtGui.QFont() 28 | font.setPointSize(16) 29 | self.cButton.setFont(font) 30 | self.cButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 31 | self.cButton.setCheckable(True) 32 | self.cButton.setObjectName("cButton") 33 | self.horizontalLayout.addWidget(self.cButton) 34 | self.verticalLayout = QtWidgets.QVBoxLayout() 35 | self.verticalLayout.setObjectName("verticalLayout") 36 | self.csButton = QtWidgets.QPushButton(Dialog) 37 | self.csButton.setMinimumSize(QtCore.QSize(60, 50)) 38 | self.csButton.setMaximumSize(QtCore.QSize(60, 50)) 39 | font = QtGui.QFont() 40 | font.setPointSize(16) 41 | self.csButton.setFont(font) 42 | self.csButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 43 | self.csButton.setCheckable(True) 44 | self.csButton.setObjectName("csButton") 45 | self.verticalLayout.addWidget(self.csButton) 46 | self.dbButton = QtWidgets.QPushButton(Dialog) 47 | self.dbButton.setMinimumSize(QtCore.QSize(60, 50)) 48 | self.dbButton.setMaximumSize(QtCore.QSize(60, 50)) 49 | font = QtGui.QFont() 50 | font.setPointSize(16) 51 | self.dbButton.setFont(font) 52 | self.dbButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 53 | self.dbButton.setCheckable(True) 54 | self.dbButton.setObjectName("dbButton") 55 | self.verticalLayout.addWidget(self.dbButton) 56 | self.horizontalLayout.addLayout(self.verticalLayout) 57 | self.dButton = QtWidgets.QPushButton(Dialog) 58 | self.dButton.setMinimumSize(QtCore.QSize(60, 50)) 59 | self.dButton.setMaximumSize(QtCore.QSize(60, 50)) 60 | font = QtGui.QFont() 61 | font.setPointSize(16) 62 | self.dButton.setFont(font) 63 | self.dButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 64 | self.dButton.setCheckable(True) 65 | self.dButton.setObjectName("dButton") 66 | self.horizontalLayout.addWidget(self.dButton) 67 | self.verticalLayout_2 = QtWidgets.QVBoxLayout() 68 | self.verticalLayout_2.setObjectName("verticalLayout_2") 69 | self.dsButton = QtWidgets.QPushButton(Dialog) 70 | self.dsButton.setMinimumSize(QtCore.QSize(60, 50)) 71 | self.dsButton.setMaximumSize(QtCore.QSize(60, 50)) 72 | font = QtGui.QFont() 73 | font.setPointSize(16) 74 | self.dsButton.setFont(font) 75 | self.dsButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 76 | self.dsButton.setCheckable(True) 77 | self.dsButton.setObjectName("dsButton") 78 | self.verticalLayout_2.addWidget(self.dsButton) 79 | self.ebButton = QtWidgets.QPushButton(Dialog) 80 | self.ebButton.setMinimumSize(QtCore.QSize(60, 50)) 81 | self.ebButton.setMaximumSize(QtCore.QSize(60, 50)) 82 | font = QtGui.QFont() 83 | font.setPointSize(16) 84 | self.ebButton.setFont(font) 85 | self.ebButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 86 | self.ebButton.setCheckable(True) 87 | self.ebButton.setObjectName("ebButton") 88 | self.verticalLayout_2.addWidget(self.ebButton) 89 | self.horizontalLayout.addLayout(self.verticalLayout_2) 90 | self.eButton = QtWidgets.QPushButton(Dialog) 91 | self.eButton.setMinimumSize(QtCore.QSize(60, 50)) 92 | self.eButton.setMaximumSize(QtCore.QSize(60, 50)) 93 | font = QtGui.QFont() 94 | font.setPointSize(16) 95 | self.eButton.setFont(font) 96 | self.eButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 97 | self.eButton.setCheckable(True) 98 | self.eButton.setObjectName("eButton") 99 | self.horizontalLayout.addWidget(self.eButton) 100 | self.fButton = QtWidgets.QPushButton(Dialog) 101 | self.fButton.setMinimumSize(QtCore.QSize(60, 50)) 102 | self.fButton.setMaximumSize(QtCore.QSize(60, 50)) 103 | font = QtGui.QFont() 104 | font.setPointSize(16) 105 | self.fButton.setFont(font) 106 | self.fButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 107 | self.fButton.setCheckable(True) 108 | self.fButton.setObjectName("fButton") 109 | self.horizontalLayout.addWidget(self.fButton) 110 | self.verticalLayout_3 = QtWidgets.QVBoxLayout() 111 | self.verticalLayout_3.setObjectName("verticalLayout_3") 112 | self.fsButton = QtWidgets.QPushButton(Dialog) 113 | self.fsButton.setMinimumSize(QtCore.QSize(60, 50)) 114 | self.fsButton.setMaximumSize(QtCore.QSize(60, 50)) 115 | font = QtGui.QFont() 116 | font.setPointSize(16) 117 | self.fsButton.setFont(font) 118 | self.fsButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 119 | self.fsButton.setCheckable(True) 120 | self.fsButton.setObjectName("fsButton") 121 | self.verticalLayout_3.addWidget(self.fsButton) 122 | self.gbButton = QtWidgets.QPushButton(Dialog) 123 | self.gbButton.setMinimumSize(QtCore.QSize(60, 50)) 124 | self.gbButton.setMaximumSize(QtCore.QSize(60, 50)) 125 | font = QtGui.QFont() 126 | font.setPointSize(16) 127 | self.gbButton.setFont(font) 128 | self.gbButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 129 | self.gbButton.setCheckable(True) 130 | self.gbButton.setObjectName("gbButton") 131 | self.verticalLayout_3.addWidget(self.gbButton) 132 | self.horizontalLayout.addLayout(self.verticalLayout_3) 133 | self.gButton = QtWidgets.QPushButton(Dialog) 134 | self.gButton.setMinimumSize(QtCore.QSize(60, 50)) 135 | self.gButton.setMaximumSize(QtCore.QSize(60, 50)) 136 | font = QtGui.QFont() 137 | font.setPointSize(16) 138 | self.gButton.setFont(font) 139 | self.gButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 140 | self.gButton.setCheckable(True) 141 | self.gButton.setObjectName("gButton") 142 | self.horizontalLayout.addWidget(self.gButton) 143 | self.verticalLayout_4 = QtWidgets.QVBoxLayout() 144 | self.verticalLayout_4.setObjectName("verticalLayout_4") 145 | self.gsButton = QtWidgets.QPushButton(Dialog) 146 | self.gsButton.setMinimumSize(QtCore.QSize(60, 50)) 147 | self.gsButton.setMaximumSize(QtCore.QSize(60, 50)) 148 | font = QtGui.QFont() 149 | font.setPointSize(16) 150 | self.gsButton.setFont(font) 151 | self.gsButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 152 | self.gsButton.setCheckable(True) 153 | self.gsButton.setObjectName("gsButton") 154 | self.verticalLayout_4.addWidget(self.gsButton) 155 | self.abButton = QtWidgets.QPushButton(Dialog) 156 | self.abButton.setMinimumSize(QtCore.QSize(60, 50)) 157 | self.abButton.setMaximumSize(QtCore.QSize(60, 50)) 158 | font = QtGui.QFont() 159 | font.setPointSize(16) 160 | self.abButton.setFont(font) 161 | self.abButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 162 | self.abButton.setCheckable(True) 163 | self.abButton.setObjectName("abButton") 164 | self.verticalLayout_4.addWidget(self.abButton) 165 | self.horizontalLayout.addLayout(self.verticalLayout_4) 166 | self.aButton = QtWidgets.QPushButton(Dialog) 167 | self.aButton.setMinimumSize(QtCore.QSize(60, 50)) 168 | self.aButton.setMaximumSize(QtCore.QSize(60, 50)) 169 | font = QtGui.QFont() 170 | font.setPointSize(16) 171 | self.aButton.setFont(font) 172 | self.aButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 173 | self.aButton.setCheckable(True) 174 | self.aButton.setObjectName("aButton") 175 | self.horizontalLayout.addWidget(self.aButton) 176 | self.verticalLayout_5 = QtWidgets.QVBoxLayout() 177 | self.verticalLayout_5.setObjectName("verticalLayout_5") 178 | self.asButton = QtWidgets.QPushButton(Dialog) 179 | self.asButton.setMinimumSize(QtCore.QSize(60, 50)) 180 | self.asButton.setMaximumSize(QtCore.QSize(60, 50)) 181 | font = QtGui.QFont() 182 | font.setPointSize(16) 183 | self.asButton.setFont(font) 184 | self.asButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 185 | self.asButton.setCheckable(True) 186 | self.asButton.setObjectName("asButton") 187 | self.verticalLayout_5.addWidget(self.asButton) 188 | self.bbButton = QtWidgets.QPushButton(Dialog) 189 | self.bbButton.setMinimumSize(QtCore.QSize(60, 50)) 190 | self.bbButton.setMaximumSize(QtCore.QSize(60, 50)) 191 | font = QtGui.QFont() 192 | font.setPointSize(16) 193 | self.bbButton.setFont(font) 194 | self.bbButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 195 | self.bbButton.setCheckable(True) 196 | self.bbButton.setObjectName("bbButton") 197 | self.verticalLayout_5.addWidget(self.bbButton) 198 | self.horizontalLayout.addLayout(self.verticalLayout_5) 199 | self.bButton = QtWidgets.QPushButton(Dialog) 200 | self.bButton.setMinimumSize(QtCore.QSize(60, 50)) 201 | self.bButton.setMaximumSize(QtCore.QSize(60, 50)) 202 | font = QtGui.QFont() 203 | font.setPointSize(16) 204 | self.bButton.setFont(font) 205 | self.bButton.setStyleSheet("QPushButton::checked{background-color : rgba(205, 253, 205, 80%)};") 206 | self.bButton.setCheckable(True) 207 | self.bButton.setObjectName("bButton") 208 | self.horizontalLayout.addWidget(self.bButton) 209 | self.verticalLayout_12.addLayout(self.horizontalLayout) 210 | self.line = QtWidgets.QFrame(Dialog) 211 | self.line.setFrameShape(QtWidgets.QFrame.HLine) 212 | self.line.setFrameShadow(QtWidgets.QFrame.Sunken) 213 | self.line.setObjectName("line") 214 | self.verticalLayout_12.addWidget(self.line) 215 | self.horizontalLayout_2 = QtWidgets.QHBoxLayout() 216 | self.horizontalLayout_2.setObjectName("horizontalLayout_2") 217 | self.cButton_2 = QtWidgets.QPushButton(Dialog) 218 | self.cButton_2.setMinimumSize(QtCore.QSize(60, 50)) 219 | self.cButton_2.setMaximumSize(QtCore.QSize(60, 50)) 220 | font = QtGui.QFont() 221 | font.setPointSize(16) 222 | self.cButton_2.setFont(font) 223 | self.cButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 224 | self.cButton_2.setCheckable(True) 225 | self.cButton_2.setObjectName("cButton_2") 226 | self.horizontalLayout_2.addWidget(self.cButton_2) 227 | self.verticalLayout_6 = QtWidgets.QVBoxLayout() 228 | self.verticalLayout_6.setObjectName("verticalLayout_6") 229 | self.csButton_2 = QtWidgets.QPushButton(Dialog) 230 | self.csButton_2.setMinimumSize(QtCore.QSize(60, 50)) 231 | self.csButton_2.setMaximumSize(QtCore.QSize(60, 50)) 232 | font = QtGui.QFont() 233 | font.setPointSize(16) 234 | self.csButton_2.setFont(font) 235 | self.csButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 236 | self.csButton_2.setCheckable(True) 237 | self.csButton_2.setObjectName("csButton_2") 238 | self.verticalLayout_6.addWidget(self.csButton_2) 239 | self.dbButton_2 = QtWidgets.QPushButton(Dialog) 240 | self.dbButton_2.setMinimumSize(QtCore.QSize(60, 50)) 241 | self.dbButton_2.setMaximumSize(QtCore.QSize(60, 50)) 242 | font = QtGui.QFont() 243 | font.setPointSize(16) 244 | self.dbButton_2.setFont(font) 245 | self.dbButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 246 | self.dbButton_2.setCheckable(True) 247 | self.dbButton_2.setObjectName("dbButton_2") 248 | self.verticalLayout_6.addWidget(self.dbButton_2) 249 | self.horizontalLayout_2.addLayout(self.verticalLayout_6) 250 | self.dButton_2 = QtWidgets.QPushButton(Dialog) 251 | self.dButton_2.setMinimumSize(QtCore.QSize(60, 50)) 252 | self.dButton_2.setMaximumSize(QtCore.QSize(60, 50)) 253 | font = QtGui.QFont() 254 | font.setPointSize(16) 255 | self.dButton_2.setFont(font) 256 | self.dButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 257 | self.dButton_2.setCheckable(True) 258 | self.dButton_2.setObjectName("dButton_2") 259 | self.horizontalLayout_2.addWidget(self.dButton_2) 260 | self.verticalLayout_7 = QtWidgets.QVBoxLayout() 261 | self.verticalLayout_7.setObjectName("verticalLayout_7") 262 | self.dsButton_2 = QtWidgets.QPushButton(Dialog) 263 | self.dsButton_2.setMinimumSize(QtCore.QSize(60, 50)) 264 | self.dsButton_2.setMaximumSize(QtCore.QSize(60, 50)) 265 | font = QtGui.QFont() 266 | font.setPointSize(16) 267 | self.dsButton_2.setFont(font) 268 | self.dsButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 269 | self.dsButton_2.setCheckable(True) 270 | self.dsButton_2.setObjectName("dsButton_2") 271 | self.verticalLayout_7.addWidget(self.dsButton_2) 272 | self.ebButton_2 = QtWidgets.QPushButton(Dialog) 273 | self.ebButton_2.setMinimumSize(QtCore.QSize(60, 50)) 274 | self.ebButton_2.setMaximumSize(QtCore.QSize(60, 50)) 275 | font = QtGui.QFont() 276 | font.setPointSize(16) 277 | self.ebButton_2.setFont(font) 278 | self.ebButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 279 | self.ebButton_2.setCheckable(True) 280 | self.ebButton_2.setObjectName("ebButton_2") 281 | self.verticalLayout_7.addWidget(self.ebButton_2) 282 | self.horizontalLayout_2.addLayout(self.verticalLayout_7) 283 | self.eButton_2 = QtWidgets.QPushButton(Dialog) 284 | self.eButton_2.setMinimumSize(QtCore.QSize(60, 50)) 285 | self.eButton_2.setMaximumSize(QtCore.QSize(60, 50)) 286 | font = QtGui.QFont() 287 | font.setPointSize(16) 288 | self.eButton_2.setFont(font) 289 | self.eButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 290 | self.eButton_2.setCheckable(True) 291 | self.eButton_2.setObjectName("eButton_2") 292 | self.horizontalLayout_2.addWidget(self.eButton_2) 293 | self.fButton_2 = QtWidgets.QPushButton(Dialog) 294 | self.fButton_2.setMinimumSize(QtCore.QSize(60, 50)) 295 | self.fButton_2.setMaximumSize(QtCore.QSize(60, 50)) 296 | font = QtGui.QFont() 297 | font.setPointSize(16) 298 | self.fButton_2.setFont(font) 299 | self.fButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 300 | self.fButton_2.setCheckable(True) 301 | self.fButton_2.setObjectName("fButton_2") 302 | self.horizontalLayout_2.addWidget(self.fButton_2) 303 | self.verticalLayout_8 = QtWidgets.QVBoxLayout() 304 | self.verticalLayout_8.setObjectName("verticalLayout_8") 305 | self.fsButton_2 = QtWidgets.QPushButton(Dialog) 306 | self.fsButton_2.setMinimumSize(QtCore.QSize(60, 50)) 307 | self.fsButton_2.setMaximumSize(QtCore.QSize(60, 50)) 308 | font = QtGui.QFont() 309 | font.setPointSize(16) 310 | self.fsButton_2.setFont(font) 311 | self.fsButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 312 | self.fsButton_2.setCheckable(True) 313 | self.fsButton_2.setObjectName("fsButton_2") 314 | self.verticalLayout_8.addWidget(self.fsButton_2) 315 | self.gbButton_2 = QtWidgets.QPushButton(Dialog) 316 | self.gbButton_2.setMinimumSize(QtCore.QSize(60, 50)) 317 | self.gbButton_2.setMaximumSize(QtCore.QSize(60, 50)) 318 | font = QtGui.QFont() 319 | font.setPointSize(16) 320 | self.gbButton_2.setFont(font) 321 | self.gbButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 322 | self.gbButton_2.setCheckable(True) 323 | self.gbButton_2.setObjectName("gbButton_2") 324 | self.verticalLayout_8.addWidget(self.gbButton_2) 325 | self.horizontalLayout_2.addLayout(self.verticalLayout_8) 326 | self.gButton_2 = QtWidgets.QPushButton(Dialog) 327 | self.gButton_2.setMinimumSize(QtCore.QSize(60, 50)) 328 | self.gButton_2.setMaximumSize(QtCore.QSize(60, 50)) 329 | font = QtGui.QFont() 330 | font.setPointSize(16) 331 | self.gButton_2.setFont(font) 332 | self.gButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 333 | self.gButton_2.setCheckable(True) 334 | self.gButton_2.setObjectName("gButton_2") 335 | self.horizontalLayout_2.addWidget(self.gButton_2) 336 | self.verticalLayout_9 = QtWidgets.QVBoxLayout() 337 | self.verticalLayout_9.setObjectName("verticalLayout_9") 338 | self.gsButton_2 = QtWidgets.QPushButton(Dialog) 339 | self.gsButton_2.setMinimumSize(QtCore.QSize(60, 50)) 340 | self.gsButton_2.setMaximumSize(QtCore.QSize(60, 50)) 341 | font = QtGui.QFont() 342 | font.setPointSize(16) 343 | self.gsButton_2.setFont(font) 344 | self.gsButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 345 | self.gsButton_2.setCheckable(True) 346 | self.gsButton_2.setObjectName("gsButton_2") 347 | self.verticalLayout_9.addWidget(self.gsButton_2) 348 | self.abButton_2 = QtWidgets.QPushButton(Dialog) 349 | self.abButton_2.setMinimumSize(QtCore.QSize(60, 50)) 350 | self.abButton_2.setMaximumSize(QtCore.QSize(60, 50)) 351 | font = QtGui.QFont() 352 | font.setPointSize(16) 353 | self.abButton_2.setFont(font) 354 | self.abButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 355 | self.abButton_2.setCheckable(True) 356 | self.abButton_2.setObjectName("abButton_2") 357 | self.verticalLayout_9.addWidget(self.abButton_2) 358 | self.horizontalLayout_2.addLayout(self.verticalLayout_9) 359 | self.aButton_2 = QtWidgets.QPushButton(Dialog) 360 | self.aButton_2.setMinimumSize(QtCore.QSize(60, 50)) 361 | self.aButton_2.setMaximumSize(QtCore.QSize(60, 50)) 362 | font = QtGui.QFont() 363 | font.setPointSize(16) 364 | self.aButton_2.setFont(font) 365 | self.aButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 366 | self.aButton_2.setCheckable(True) 367 | self.aButton_2.setObjectName("aButton_2") 368 | self.horizontalLayout_2.addWidget(self.aButton_2) 369 | self.verticalLayout_10 = QtWidgets.QVBoxLayout() 370 | self.verticalLayout_10.setObjectName("verticalLayout_10") 371 | self.asButton_2 = QtWidgets.QPushButton(Dialog) 372 | self.asButton_2.setMinimumSize(QtCore.QSize(60, 50)) 373 | self.asButton_2.setMaximumSize(QtCore.QSize(60, 50)) 374 | font = QtGui.QFont() 375 | font.setPointSize(16) 376 | self.asButton_2.setFont(font) 377 | self.asButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 378 | self.asButton_2.setCheckable(True) 379 | self.asButton_2.setObjectName("asButton_2") 380 | self.verticalLayout_10.addWidget(self.asButton_2) 381 | self.bbButton_2 = QtWidgets.QPushButton(Dialog) 382 | self.bbButton_2.setMinimumSize(QtCore.QSize(60, 50)) 383 | self.bbButton_2.setMaximumSize(QtCore.QSize(60, 50)) 384 | font = QtGui.QFont() 385 | font.setPointSize(16) 386 | self.bbButton_2.setFont(font) 387 | self.bbButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 388 | self.bbButton_2.setCheckable(True) 389 | self.bbButton_2.setObjectName("bbButton_2") 390 | self.verticalLayout_10.addWidget(self.bbButton_2) 391 | self.horizontalLayout_2.addLayout(self.verticalLayout_10) 392 | self.bButton_2 = QtWidgets.QPushButton(Dialog) 393 | self.bButton_2.setMinimumSize(QtCore.QSize(60, 50)) 394 | self.bButton_2.setMaximumSize(QtCore.QSize(60, 50)) 395 | font = QtGui.QFont() 396 | font.setPointSize(16) 397 | self.bButton_2.setFont(font) 398 | self.bButton_2.setStyleSheet("QPushButton::checked{background-color : rgba(173, 215, 229, 80%)};") 399 | self.bButton_2.setCheckable(True) 400 | self.bButton_2.setObjectName("bButton_2") 401 | self.horizontalLayout_2.addWidget(self.bButton_2) 402 | self.verticalLayout_12.addLayout(self.horizontalLayout_2) 403 | self.line_2 = QtWidgets.QFrame(Dialog) 404 | self.line_2.setFrameShape(QtWidgets.QFrame.HLine) 405 | self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) 406 | self.line_2.setObjectName("line_2") 407 | self.verticalLayout_12.addWidget(self.line_2) 408 | self.horizontalLayout_4 = QtWidgets.QHBoxLayout() 409 | self.horizontalLayout_4.setObjectName("horizontalLayout_4") 410 | self.verticalLayout_11 = QtWidgets.QVBoxLayout() 411 | self.verticalLayout_11.setSizeConstraint(QtWidgets.QLayout.SetFixedSize) 412 | self.verticalLayout_11.setObjectName("verticalLayout_11") 413 | self.label_2 = QtWidgets.QLabel(Dialog) 414 | self.label_2.setMinimumSize(QtCore.QSize(200, 0)) 415 | self.label_2.setMaximumSize(QtCore.QSize(200, 16777215)) 416 | font = QtGui.QFont() 417 | font.setPointSize(16) 418 | self.label_2.setFont(font) 419 | self.label_2.setObjectName("label_2") 420 | self.verticalLayout_11.addWidget(self.label_2) 421 | self.majorMinorSlider = mySlider(Dialog) 422 | self.majorMinorSlider.setMinimumSize(QtCore.QSize(200, 0)) 423 | self.majorMinorSlider.setMaximumSize(QtCore.QSize(200, 16777215)) 424 | self.majorMinorSlider.setMaximum(2) 425 | self.majorMinorSlider.setPageStep(1) 426 | self.majorMinorSlider.setSliderPosition(1) 427 | self.majorMinorSlider.setOrientation(QtCore.Qt.Horizontal) 428 | self.majorMinorSlider.setTickPosition(QtWidgets.QSlider.TicksBelow) 429 | self.majorMinorSlider.setTickInterval(1) 430 | self.majorMinorSlider.setObjectName("majorMinorSlider") 431 | self.verticalLayout_11.addWidget(self.majorMinorSlider) 432 | self.horizontalLayout_3 = QtWidgets.QHBoxLayout() 433 | self.horizontalLayout_3.setObjectName("horizontalLayout_3") 434 | self.label = QtWidgets.QLabel(Dialog) 435 | font = QtGui.QFont() 436 | font.setPointSize(16) 437 | self.label.setFont(font) 438 | self.label.setObjectName("label") 439 | self.horizontalLayout_3.addWidget(self.label) 440 | self.label_3 = QtWidgets.QLabel(Dialog) 441 | font = QtGui.QFont() 442 | font.setPointSize(16) 443 | self.label_3.setFont(font) 444 | self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 445 | self.label_3.setObjectName("label_3") 446 | self.horizontalLayout_3.addWidget(self.label_3) 447 | self.verticalLayout_11.addLayout(self.horizontalLayout_3) 448 | self.horizontalLayout_4.addLayout(self.verticalLayout_11) 449 | self.keyLayout = QtWidgets.QHBoxLayout() 450 | self.keyLayout.setObjectName("keyLayout") 451 | self.keyWidget = QtWidgets.QWidget(Dialog) 452 | self.keyWidget.setMinimumSize(QtCore.QSize(0, 130)) 453 | self.keyWidget.setMaximumSize(QtCore.QSize(16777215, 130)) 454 | self.keyWidget.setObjectName("keyWidget") 455 | self.keyLayout.addWidget(self.keyWidget) 456 | self.horizontalLayout_4.addLayout(self.keyLayout) 457 | self.horizontalLayout_4.setStretch(0, 1) 458 | self.horizontalLayout_4.setStretch(1, 3) 459 | self.verticalLayout_12.addLayout(self.horizontalLayout_4) 460 | self.horizontalLayout_5.addLayout(self.verticalLayout_12) 461 | 462 | self.retranslateUi(Dialog) 463 | QtCore.QMetaObject.connectSlotsByName(Dialog) 464 | 465 | def retranslateUi(self, Dialog): 466 | _translate = QtCore.QCoreApplication.translate 467 | Dialog.setWindowTitle(_translate("Dialog", "Dialog")) 468 | self.cButton.setText(_translate("Dialog", "C")) 469 | self.csButton.setText(_translate("Dialog", "C♯")) 470 | self.dbButton.setText(_translate("Dialog", "D♭")) 471 | self.dButton.setText(_translate("Dialog", "D")) 472 | self.dsButton.setText(_translate("Dialog", "D♯")) 473 | self.ebButton.setText(_translate("Dialog", "E♭")) 474 | self.eButton.setText(_translate("Dialog", "E")) 475 | self.fButton.setText(_translate("Dialog", "F")) 476 | self.fsButton.setText(_translate("Dialog", "F♯")) 477 | self.gbButton.setText(_translate("Dialog", "G♭")) 478 | self.gButton.setText(_translate("Dialog", "G")) 479 | self.gsButton.setText(_translate("Dialog", "G♯")) 480 | self.abButton.setText(_translate("Dialog", "A♭")) 481 | self.aButton.setText(_translate("Dialog", "A")) 482 | self.asButton.setText(_translate("Dialog", "A♯")) 483 | self.bbButton.setText(_translate("Dialog", "B♭")) 484 | self.bButton.setText(_translate("Dialog", "B")) 485 | self.cButton_2.setText(_translate("Dialog", "Cm")) 486 | self.csButton_2.setText(_translate("Dialog", "C♯m")) 487 | self.dbButton_2.setText(_translate("Dialog", "D♭m")) 488 | self.dButton_2.setText(_translate("Dialog", "Dm")) 489 | self.dsButton_2.setText(_translate("Dialog", "D♯m")) 490 | self.ebButton_2.setText(_translate("Dialog", "E♭m")) 491 | self.eButton_2.setText(_translate("Dialog", "Em")) 492 | self.fButton_2.setText(_translate("Dialog", "Fm")) 493 | self.fsButton_2.setText(_translate("Dialog", "F♯m")) 494 | self.gbButton_2.setText(_translate("Dialog", "G♭m")) 495 | self.gButton_2.setText(_translate("Dialog", "Gm")) 496 | self.gsButton_2.setText(_translate("Dialog", "G♯m")) 497 | self.abButton_2.setText(_translate("Dialog", "A♭m")) 498 | self.aButton_2.setText(_translate("Dialog", "Am")) 499 | self.asButton_2.setText(_translate("Dialog", "A♯m")) 500 | self.bbButton_2.setText(_translate("Dialog", "B♭m")) 501 | self.bButton_2.setText(_translate("Dialog", "Bm")) 502 | self.label_2.setText(_translate("Dialog", "Feels:")) 503 | self.label.setText(_translate("Dialog", "Major")) 504 | self.label_3.setText(_translate("Dialog", "Minor")) 505 | from myslider import mySlider 506 | -------------------------------------------------------------------------------- /circle_ui.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file '.\CircleOfFifths.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.6 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtGui, QtWidgets 12 | 13 | 14 | class Ui_MainWindow(object): 15 | def setupUi(self, MainWindow): 16 | MainWindow.setObjectName("MainWindow") 17 | MainWindow.resize(674, 736) 18 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) 19 | sizePolicy.setHorizontalStretch(0) 20 | sizePolicy.setVerticalStretch(0) 21 | sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) 22 | MainWindow.setSizePolicy(sizePolicy) 23 | self.centralwidget = QtWidgets.QWidget(MainWindow) 24 | self.centralwidget.setObjectName("centralwidget") 25 | self.BaseLabel = QtWidgets.QLabel(self.centralwidget) 26 | self.BaseLabel.setGeometry(QtCore.QRect(80, 80, 501, 501)) 27 | self.BaseLabel.setText("") 28 | self.BaseLabel.setPixmap(QtGui.QPixmap(":/images/circle.png")) 29 | self.BaseLabel.setScaledContents(True) 30 | self.BaseLabel.setAlignment(QtCore.Qt.AlignCenter) 31 | self.BaseLabel.setObjectName("BaseLabel") 32 | self.CLabel = myLabel(self.centralwidget) 33 | self.CLabel.setGeometry(QtCore.QRect(300, 60, 51, 51)) 34 | font = QtGui.QFont() 35 | font.setPointSize(27) 36 | self.CLabel.setFont(font) 37 | self.CLabel.setAlignment(QtCore.Qt.AlignCenter) 38 | self.CLabel.setObjectName("CLabel") 39 | self.ALabel = myLabel(self.centralwidget) 40 | self.ALabel.setGeometry(QtCore.QRect(560, 300, 51, 51)) 41 | font = QtGui.QFont() 42 | font.setPointSize(27) 43 | self.ALabel.setFont(font) 44 | self.ALabel.setAlignment(QtCore.Qt.AlignCenter) 45 | self.ALabel.setObjectName("ALabel") 46 | self.EbLabel = myLabel(self.centralwidget) 47 | self.EbLabel.setGeometry(QtCore.QRect(50, 300, 60, 51)) 48 | font = QtGui.QFont() 49 | font.setPointSize(27) 50 | self.EbLabel.setFont(font) 51 | self.EbLabel.setAlignment(QtCore.Qt.AlignCenter) 52 | self.EbLabel.setObjectName("EbLabel") 53 | self.FsLabel = myLabel(self.centralwidget) 54 | self.FsLabel.setGeometry(QtCore.QRect(300, 550, 60, 51)) 55 | font = QtGui.QFont() 56 | font.setPointSize(27) 57 | self.FsLabel.setFont(font) 58 | self.FsLabel.setAlignment(QtCore.Qt.AlignCenter) 59 | self.FsLabel.setObjectName("FsLabel") 60 | self.GLabel = myLabel(self.centralwidget) 61 | self.GLabel.setGeometry(QtCore.QRect(430, 90, 51, 51)) 62 | font = QtGui.QFont() 63 | font.setPointSize(27) 64 | self.GLabel.setFont(font) 65 | self.GLabel.setAlignment(QtCore.Qt.AlignCenter) 66 | self.GLabel.setObjectName("GLabel") 67 | self.DLabel = myLabel(self.centralwidget) 68 | self.DLabel.setGeometry(QtCore.QRect(520, 180, 51, 51)) 69 | font = QtGui.QFont() 70 | font.setPointSize(27) 71 | self.DLabel.setFont(font) 72 | self.DLabel.setAlignment(QtCore.Qt.AlignCenter) 73 | self.DLabel.setObjectName("DLabel") 74 | self.ELabel = myLabel(self.centralwidget) 75 | self.ELabel.setGeometry(QtCore.QRect(520, 430, 51, 51)) 76 | font = QtGui.QFont() 77 | font.setPointSize(27) 78 | self.ELabel.setFont(font) 79 | self.ELabel.setAlignment(QtCore.Qt.AlignCenter) 80 | self.ELabel.setObjectName("ELabel") 81 | self.BLabel = myLabel(self.centralwidget) 82 | self.BLabel.setGeometry(QtCore.QRect(440, 520, 51, 51)) 83 | font = QtGui.QFont() 84 | font.setPointSize(27) 85 | self.BLabel.setFont(font) 86 | self.BLabel.setAlignment(QtCore.Qt.AlignCenter) 87 | self.BLabel.setObjectName("BLabel") 88 | self.DbLabel = myLabel(self.centralwidget) 89 | self.DbLabel.setGeometry(QtCore.QRect(160, 520, 60, 51)) 90 | font = QtGui.QFont() 91 | font.setPointSize(27) 92 | self.DbLabel.setFont(font) 93 | self.DbLabel.setAlignment(QtCore.Qt.AlignCenter) 94 | self.DbLabel.setObjectName("DbLabel") 95 | self.AbLabel = myLabel(self.centralwidget) 96 | self.AbLabel.setGeometry(QtCore.QRect(80, 430, 60, 51)) 97 | font = QtGui.QFont() 98 | font.setPointSize(27) 99 | self.AbLabel.setFont(font) 100 | self.AbLabel.setAlignment(QtCore.Qt.AlignCenter) 101 | self.AbLabel.setObjectName("AbLabel") 102 | self.BbLabel = myLabel(self.centralwidget) 103 | self.BbLabel.setGeometry(QtCore.QRect(80, 180, 60, 51)) 104 | font = QtGui.QFont() 105 | font.setPointSize(27) 106 | self.BbLabel.setFont(font) 107 | self.BbLabel.setAlignment(QtCore.Qt.AlignCenter) 108 | self.BbLabel.setObjectName("BbLabel") 109 | self.FLabel = myLabel(self.centralwidget) 110 | self.FLabel.setGeometry(QtCore.QRect(170, 90, 51, 51)) 111 | font = QtGui.QFont() 112 | font.setPointSize(27) 113 | self.FLabel.setFont(font) 114 | self.FLabel.setAlignment(QtCore.Qt.AlignCenter) 115 | self.FLabel.setObjectName("FLabel") 116 | self.SharpFlatLabel = myLabel(self.centralwidget) 117 | self.SharpFlatLabel.setGeometry(QtCore.QRect(300, 300, 60, 51)) 118 | font = QtGui.QFont() 119 | font.setPointSize(27) 120 | self.SharpFlatLabel.setFont(font) 121 | self.SharpFlatLabel.setAlignment(QtCore.Qt.AlignCenter) 122 | self.SharpFlatLabel.setObjectName("SharpFlatLabel") 123 | self.chordLabel1 = QtWidgets.QLabel(self.centralwidget) 124 | self.chordLabel1.setGeometry(QtCore.QRect(400, 150, 51, 51)) 125 | font = QtGui.QFont() 126 | font.setPointSize(12) 127 | self.chordLabel1.setFont(font) 128 | self.chordLabel1.setText("") 129 | self.chordLabel1.setAlignment(QtCore.Qt.AlignCenter) 130 | self.chordLabel1.setObjectName("chordLabel1") 131 | self.chordLabel2 = QtWidgets.QLabel(self.centralwidget) 132 | self.chordLabel2.setGeometry(QtCore.QRect(470, 220, 51, 51)) 133 | font = QtGui.QFont() 134 | font.setPointSize(12) 135 | self.chordLabel2.setFont(font) 136 | self.chordLabel2.setText("") 137 | self.chordLabel2.setAlignment(QtCore.Qt.AlignCenter) 138 | self.chordLabel2.setObjectName("chordLabel2") 139 | self.chordLabel3 = QtWidgets.QLabel(self.centralwidget) 140 | self.chordLabel3.setGeometry(QtCore.QRect(490, 300, 51, 51)) 141 | font = QtGui.QFont() 142 | font.setPointSize(12) 143 | self.chordLabel3.setFont(font) 144 | self.chordLabel3.setText("") 145 | self.chordLabel3.setAlignment(QtCore.Qt.AlignCenter) 146 | self.chordLabel3.setObjectName("chordLabel3") 147 | self.chordLabel4 = QtWidgets.QLabel(self.centralwidget) 148 | self.chordLabel4.setGeometry(QtCore.QRect(460, 400, 51, 51)) 149 | font = QtGui.QFont() 150 | font.setPointSize(12) 151 | self.chordLabel4.setFont(font) 152 | self.chordLabel4.setText("") 153 | self.chordLabel4.setAlignment(QtCore.Qt.AlignCenter) 154 | self.chordLabel4.setObjectName("chordLabel4") 155 | self.chordLabel5 = QtWidgets.QLabel(self.centralwidget) 156 | self.chordLabel5.setGeometry(QtCore.QRect(410, 460, 51, 51)) 157 | font = QtGui.QFont() 158 | font.setPointSize(12) 159 | self.chordLabel5.setFont(font) 160 | self.chordLabel5.setText("") 161 | self.chordLabel5.setAlignment(QtCore.Qt.AlignCenter) 162 | self.chordLabel5.setObjectName("chordLabel5") 163 | self.chordLabel6 = QtWidgets.QLabel(self.centralwidget) 164 | self.chordLabel6.setGeometry(QtCore.QRect(310, 490, 51, 51)) 165 | font = QtGui.QFont() 166 | font.setPointSize(12) 167 | self.chordLabel6.setFont(font) 168 | self.chordLabel6.setText("") 169 | self.chordLabel6.setAlignment(QtCore.Qt.AlignCenter) 170 | self.chordLabel6.setObjectName("chordLabel6") 171 | self.chordLabel7 = QtWidgets.QLabel(self.centralwidget) 172 | self.chordLabel7.setGeometry(QtCore.QRect(210, 460, 51, 51)) 173 | font = QtGui.QFont() 174 | font.setPointSize(12) 175 | self.chordLabel7.setFont(font) 176 | self.chordLabel7.setText("") 177 | self.chordLabel7.setAlignment(QtCore.Qt.AlignCenter) 178 | self.chordLabel7.setObjectName("chordLabel7") 179 | self.chordLabel8 = QtWidgets.QLabel(self.centralwidget) 180 | self.chordLabel8.setGeometry(QtCore.QRect(150, 400, 51, 51)) 181 | font = QtGui.QFont() 182 | font.setPointSize(12) 183 | self.chordLabel8.setFont(font) 184 | self.chordLabel8.setText("") 185 | self.chordLabel8.setAlignment(QtCore.Qt.AlignCenter) 186 | self.chordLabel8.setObjectName("chordLabel8") 187 | self.chordLabel9 = QtWidgets.QLabel(self.centralwidget) 188 | self.chordLabel9.setGeometry(QtCore.QRect(120, 300, 51, 51)) 189 | font = QtGui.QFont() 190 | font.setPointSize(12) 191 | self.chordLabel9.setFont(font) 192 | self.chordLabel9.setText("") 193 | self.chordLabel9.setAlignment(QtCore.Qt.AlignCenter) 194 | self.chordLabel9.setObjectName("chordLabel9") 195 | self.chordLabel10 = QtWidgets.QLabel(self.centralwidget) 196 | self.chordLabel10.setGeometry(QtCore.QRect(140, 220, 51, 51)) 197 | font = QtGui.QFont() 198 | font.setPointSize(12) 199 | self.chordLabel10.setFont(font) 200 | self.chordLabel10.setText("") 201 | self.chordLabel10.setAlignment(QtCore.Qt.AlignCenter) 202 | self.chordLabel10.setObjectName("chordLabel10") 203 | self.chordLabel11 = QtWidgets.QLabel(self.centralwidget) 204 | self.chordLabel11.setGeometry(QtCore.QRect(210, 150, 51, 51)) 205 | font = QtGui.QFont() 206 | font.setPointSize(12) 207 | self.chordLabel11.setFont(font) 208 | self.chordLabel11.setText("") 209 | self.chordLabel11.setAlignment(QtCore.Qt.AlignCenter) 210 | self.chordLabel11.setObjectName("chordLabel11") 211 | self.chordLabel0 = QtWidgets.QLabel(self.centralwidget) 212 | self.chordLabel0.setGeometry(QtCore.QRect(300, 120, 51, 51)) 213 | font = QtGui.QFont() 214 | font.setPointSize(12) 215 | self.chordLabel0.setFont(font) 216 | self.chordLabel0.setText("") 217 | self.chordLabel0.setAlignment(QtCore.Qt.AlignCenter) 218 | self.chordLabel0.setObjectName("chordLabel0") 219 | self.modeBox = myDropdown(self.centralwidget) 220 | self.modeBox.setGeometry(QtCore.QRect(70, 16, 191, 41)) 221 | font = QtGui.QFont() 222 | font.setPointSize(16) 223 | self.modeBox.setFont(font) 224 | self.modeBox.setObjectName("modeBox") 225 | self.keyLabel = QtWidgets.QLabel(self.centralwidget) 226 | self.keyLabel.setGeometry(QtCore.QRect(10, 10, 61, 51)) 227 | font = QtGui.QFont() 228 | font.setPointSize(27) 229 | self.keyLabel.setFont(font) 230 | self.keyLabel.setText("") 231 | self.keyLabel.setAlignment(QtCore.Qt.AlignCenter) 232 | self.keyLabel.setObjectName("keyLabel") 233 | self.layoutWidget = QtWidgets.QWidget(self.centralwidget) 234 | self.layoutWidget.setGeometry(QtCore.QRect(10, 650, 651, 31)) 235 | self.layoutWidget.setObjectName("layoutWidget") 236 | self.horizontalLayout = QtWidgets.QHBoxLayout(self.layoutWidget) 237 | self.horizontalLayout.setContentsMargins(0, 0, 0, 0) 238 | self.horizontalLayout.setObjectName("horizontalLayout") 239 | self.onechord = myLabel(self.layoutWidget) 240 | font = QtGui.QFont() 241 | font.setPointSize(14) 242 | self.onechord.setFont(font) 243 | self.onechord.setText("") 244 | self.onechord.setAlignment(QtCore.Qt.AlignCenter) 245 | self.onechord.setObjectName("onechord") 246 | self.horizontalLayout.addWidget(self.onechord) 247 | self.twochord = myLabel(self.layoutWidget) 248 | font = QtGui.QFont() 249 | font.setPointSize(14) 250 | self.twochord.setFont(font) 251 | self.twochord.setText("") 252 | self.twochord.setAlignment(QtCore.Qt.AlignCenter) 253 | self.twochord.setObjectName("twochord") 254 | self.horizontalLayout.addWidget(self.twochord) 255 | self.threechord = myLabel(self.layoutWidget) 256 | font = QtGui.QFont() 257 | font.setPointSize(14) 258 | self.threechord.setFont(font) 259 | self.threechord.setText("") 260 | self.threechord.setAlignment(QtCore.Qt.AlignCenter) 261 | self.threechord.setObjectName("threechord") 262 | self.horizontalLayout.addWidget(self.threechord) 263 | self.fourchord = myLabel(self.layoutWidget) 264 | font = QtGui.QFont() 265 | font.setPointSize(14) 266 | self.fourchord.setFont(font) 267 | self.fourchord.setText("") 268 | self.fourchord.setAlignment(QtCore.Qt.AlignCenter) 269 | self.fourchord.setObjectName("fourchord") 270 | self.horizontalLayout.addWidget(self.fourchord) 271 | self.fivechord = myLabel(self.layoutWidget) 272 | font = QtGui.QFont() 273 | font.setPointSize(14) 274 | self.fivechord.setFont(font) 275 | self.fivechord.setText("") 276 | self.fivechord.setAlignment(QtCore.Qt.AlignCenter) 277 | self.fivechord.setObjectName("fivechord") 278 | self.horizontalLayout.addWidget(self.fivechord) 279 | self.sixchord = myLabel(self.layoutWidget) 280 | font = QtGui.QFont() 281 | font.setPointSize(14) 282 | self.sixchord.setFont(font) 283 | self.sixchord.setText("") 284 | self.sixchord.setAlignment(QtCore.Qt.AlignCenter) 285 | self.sixchord.setObjectName("sixchord") 286 | self.horizontalLayout.addWidget(self.sixchord) 287 | self.sevenchord = myLabel(self.layoutWidget) 288 | font = QtGui.QFont() 289 | font.setPointSize(14) 290 | self.sevenchord.setFont(font) 291 | self.sevenchord.setText("") 292 | self.sevenchord.setAlignment(QtCore.Qt.AlignCenter) 293 | self.sevenchord.setObjectName("sevenchord") 294 | self.horizontalLayout.addWidget(self.sevenchord) 295 | self.horizontalLayoutWidget = QtWidgets.QWidget(self.centralwidget) 296 | self.horizontalLayoutWidget.setGeometry(QtCore.QRect(459, 15, 201, 41)) 297 | self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") 298 | self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) 299 | self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) 300 | self.horizontalLayout_2.setObjectName("horizontalLayout_2") 301 | self.label_2 = QtWidgets.QLabel(self.horizontalLayoutWidget) 302 | font = QtGui.QFont() 303 | font.setPointSize(11) 304 | self.label_2.setFont(font) 305 | self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 306 | self.label_2.setWordWrap(True) 307 | self.label_2.setObjectName("label_2") 308 | self.horizontalLayout_2.addWidget(self.label_2) 309 | self.modeSlider = QtWidgets.QSlider(self.horizontalLayoutWidget) 310 | self.modeSlider.setMaximum(1) 311 | self.modeSlider.setOrientation(QtCore.Qt.Horizontal) 312 | self.modeSlider.setTickInterval(0) 313 | self.modeSlider.setObjectName("modeSlider") 314 | self.horizontalLayout_2.addWidget(self.modeSlider) 315 | self.label = QtWidgets.QLabel(self.horizontalLayoutWidget) 316 | font = QtGui.QFont() 317 | font.setPointSize(11) 318 | self.label.setFont(font) 319 | self.label.setWordWrap(True) 320 | self.label.setObjectName("label") 321 | self.horizontalLayout_2.addWidget(self.label) 322 | self.horizontalLayout_2.setStretch(0, 1) 323 | self.horizontalLayout_2.setStretch(1, 1) 324 | self.horizontalLayout_2.setStretch(2, 1) 325 | self.layoutWidget_2 = QtWidgets.QWidget(self.centralwidget) 326 | self.layoutWidget_2.setGeometry(QtCore.QRect(10, 680, 651, 31)) 327 | self.layoutWidget_2.setObjectName("layoutWidget_2") 328 | self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.layoutWidget_2) 329 | self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) 330 | self.horizontalLayout_3.setObjectName("horizontalLayout_3") 331 | self.onechord_2 = QtWidgets.QLabel(self.layoutWidget_2) 332 | font = QtGui.QFont() 333 | font.setPointSize(12) 334 | self.onechord_2.setFont(font) 335 | self.onechord_2.setText("") 336 | self.onechord_2.setAlignment(QtCore.Qt.AlignCenter) 337 | self.onechord_2.setObjectName("onechord_2") 338 | self.horizontalLayout_3.addWidget(self.onechord_2) 339 | self.twochord_2 = QtWidgets.QLabel(self.layoutWidget_2) 340 | font = QtGui.QFont() 341 | font.setPointSize(12) 342 | self.twochord_2.setFont(font) 343 | self.twochord_2.setText("") 344 | self.twochord_2.setAlignment(QtCore.Qt.AlignCenter) 345 | self.twochord_2.setObjectName("twochord_2") 346 | self.horizontalLayout_3.addWidget(self.twochord_2) 347 | self.threechord_2 = QtWidgets.QLabel(self.layoutWidget_2) 348 | font = QtGui.QFont() 349 | font.setPointSize(12) 350 | self.threechord_2.setFont(font) 351 | self.threechord_2.setText("") 352 | self.threechord_2.setAlignment(QtCore.Qt.AlignCenter) 353 | self.threechord_2.setObjectName("threechord_2") 354 | self.horizontalLayout_3.addWidget(self.threechord_2) 355 | self.fourchord_2 = QtWidgets.QLabel(self.layoutWidget_2) 356 | font = QtGui.QFont() 357 | font.setPointSize(12) 358 | self.fourchord_2.setFont(font) 359 | self.fourchord_2.setText("") 360 | self.fourchord_2.setAlignment(QtCore.Qt.AlignCenter) 361 | self.fourchord_2.setObjectName("fourchord_2") 362 | self.horizontalLayout_3.addWidget(self.fourchord_2) 363 | self.fivechord_2 = QtWidgets.QLabel(self.layoutWidget_2) 364 | font = QtGui.QFont() 365 | font.setPointSize(12) 366 | self.fivechord_2.setFont(font) 367 | self.fivechord_2.setText("") 368 | self.fivechord_2.setAlignment(QtCore.Qt.AlignCenter) 369 | self.fivechord_2.setObjectName("fivechord_2") 370 | self.horizontalLayout_3.addWidget(self.fivechord_2) 371 | self.sixchord_2 = QtWidgets.QLabel(self.layoutWidget_2) 372 | font = QtGui.QFont() 373 | font.setPointSize(12) 374 | self.sixchord_2.setFont(font) 375 | self.sixchord_2.setText("") 376 | self.sixchord_2.setAlignment(QtCore.Qt.AlignCenter) 377 | self.sixchord_2.setObjectName("sixchord_2") 378 | self.horizontalLayout_3.addWidget(self.sixchord_2) 379 | self.sevenchord_2 = QtWidgets.QLabel(self.layoutWidget_2) 380 | font = QtGui.QFont() 381 | font.setPointSize(12) 382 | self.sevenchord_2.setFont(font) 383 | self.sevenchord_2.setText("") 384 | self.sevenchord_2.setAlignment(QtCore.Qt.AlignCenter) 385 | self.sevenchord_2.setObjectName("sevenchord_2") 386 | self.horizontalLayout_3.addWidget(self.sevenchord_2) 387 | self.ScaleLabel = QtWidgets.QLabel(self.centralwidget) 388 | self.ScaleLabel.setGeometry(QtCore.QRect(10, 620, 161, 21)) 389 | font = QtGui.QFont() 390 | font.setPointSize(14) 391 | self.ScaleLabel.setFont(font) 392 | self.ScaleLabel.setText("") 393 | self.ScaleLabel.setObjectName("ScaleLabel") 394 | self.frameOfProgressions = QtWidgets.QFrame(self.centralwidget) 395 | self.frameOfProgressions.setGeometry(QtCore.QRect(190, 250, 291, 151)) 396 | self.frameOfProgressions.setStyleSheet("border:0") 397 | self.frameOfProgressions.setFrameShape(QtWidgets.QFrame.StyledPanel) 398 | self.frameOfProgressions.setFrameShadow(QtWidgets.QFrame.Raised) 399 | self.frameOfProgressions.setObjectName("frameOfProgressions") 400 | self.gridLayoutWidget = QtWidgets.QWidget(self.frameOfProgressions) 401 | self.gridLayoutWidget.setGeometry(QtCore.QRect(-10, 0, 301, 151)) 402 | self.gridLayoutWidget.setObjectName("gridLayoutWidget") 403 | self.boxOfProgressions = QtWidgets.QGridLayout(self.gridLayoutWidget) 404 | self.boxOfProgressions.setContentsMargins(0, 0, 0, 0) 405 | self.boxOfProgressions.setObjectName("boxOfProgressions") 406 | self.prog2 = QtWidgets.QLabel(self.gridLayoutWidget) 407 | self.prog2.setMinimumSize(QtCore.QSize(0, 0)) 408 | self.prog2.setMaximumSize(QtCore.QSize(16777215, 16777215)) 409 | font = QtGui.QFont() 410 | font.setPointSize(12) 411 | self.prog2.setFont(font) 412 | self.prog2.setText("") 413 | self.prog2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 414 | self.prog2.setObjectName("prog2") 415 | self.boxOfProgressions.addWidget(self.prog2, 1, 0, 1, 1) 416 | self.chordprog3 = QtWidgets.QLabel(self.gridLayoutWidget) 417 | font = QtGui.QFont() 418 | font.setPointSize(12) 419 | font.setBold(True) 420 | font.setWeight(75) 421 | self.chordprog3.setFont(font) 422 | self.chordprog3.setText("") 423 | self.chordprog3.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 424 | self.chordprog3.setObjectName("chordprog3") 425 | self.boxOfProgressions.addWidget(self.chordprog3, 2, 2, 1, 1) 426 | self.prog3 = QtWidgets.QLabel(self.gridLayoutWidget) 427 | self.prog3.setMinimumSize(QtCore.QSize(0, 0)) 428 | self.prog3.setMaximumSize(QtCore.QSize(16777215, 16777215)) 429 | font = QtGui.QFont() 430 | font.setPointSize(12) 431 | self.prog3.setFont(font) 432 | self.prog3.setText("") 433 | self.prog3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 434 | self.prog3.setObjectName("prog3") 435 | self.boxOfProgressions.addWidget(self.prog3, 2, 0, 1, 1) 436 | self.prog4 = QtWidgets.QLabel(self.gridLayoutWidget) 437 | self.prog4.setMinimumSize(QtCore.QSize(0, 0)) 438 | self.prog4.setMaximumSize(QtCore.QSize(16777215, 16777215)) 439 | font = QtGui.QFont() 440 | font.setPointSize(12) 441 | self.prog4.setFont(font) 442 | self.prog4.setText("") 443 | self.prog4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 444 | self.prog4.setObjectName("prog4") 445 | self.boxOfProgressions.addWidget(self.prog4, 3, 0, 1, 1) 446 | self.prog1 = QtWidgets.QLabel(self.gridLayoutWidget) 447 | self.prog1.setMinimumSize(QtCore.QSize(0, 0)) 448 | self.prog1.setMaximumSize(QtCore.QSize(16777215, 16777215)) 449 | font = QtGui.QFont() 450 | font.setPointSize(12) 451 | self.prog1.setFont(font) 452 | self.prog1.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 453 | self.prog1.setObjectName("prog1") 454 | self.boxOfProgressions.addWidget(self.prog1, 0, 0, 1, 1) 455 | self.chordprog2 = QtWidgets.QLabel(self.gridLayoutWidget) 456 | font = QtGui.QFont() 457 | font.setPointSize(12) 458 | font.setBold(True) 459 | font.setWeight(75) 460 | self.chordprog2.setFont(font) 461 | self.chordprog2.setText("") 462 | self.chordprog2.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 463 | self.chordprog2.setObjectName("chordprog2") 464 | self.boxOfProgressions.addWidget(self.chordprog2, 1, 2, 1, 1) 465 | self.chordprog1 = QtWidgets.QLabel(self.gridLayoutWidget) 466 | font = QtGui.QFont() 467 | font.setPointSize(12) 468 | font.setBold(True) 469 | font.setWeight(75) 470 | self.chordprog1.setFont(font) 471 | self.chordprog1.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 472 | self.chordprog1.setObjectName("chordprog1") 473 | self.boxOfProgressions.addWidget(self.chordprog1, 0, 2, 1, 1) 474 | self.chordprog4 = QtWidgets.QLabel(self.gridLayoutWidget) 475 | font = QtGui.QFont() 476 | font.setPointSize(12) 477 | font.setBold(True) 478 | font.setWeight(75) 479 | self.chordprog4.setFont(font) 480 | self.chordprog4.setText("") 481 | self.chordprog4.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 482 | self.chordprog4.setObjectName("chordprog4") 483 | self.boxOfProgressions.addWidget(self.chordprog4, 3, 2, 1, 1) 484 | self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.centralwidget) 485 | self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(460, 600, 201, 41)) 486 | self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2") 487 | self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2) 488 | self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0) 489 | self.horizontalLayout_4.setObjectName("horizontalLayout_4") 490 | self.label_3 = QtWidgets.QLabel(self.horizontalLayoutWidget_2) 491 | font = QtGui.QFont() 492 | font.setPointSize(14) 493 | self.label_3.setFont(font) 494 | self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 495 | self.label_3.setWordWrap(True) 496 | self.label_3.setObjectName("label_3") 497 | self.horizontalLayout_4.addWidget(self.label_3) 498 | self.sharpsProgSlider = QtWidgets.QSlider(self.horizontalLayoutWidget_2) 499 | self.sharpsProgSlider.setMaximum(1) 500 | self.sharpsProgSlider.setOrientation(QtCore.Qt.Horizontal) 501 | self.sharpsProgSlider.setTickInterval(0) 502 | self.sharpsProgSlider.setObjectName("sharpsProgSlider") 503 | self.horizontalLayout_4.addWidget(self.sharpsProgSlider) 504 | self.label_4 = QtWidgets.QLabel(self.horizontalLayoutWidget_2) 505 | font = QtGui.QFont() 506 | font.setPointSize(11) 507 | self.label_4.setFont(font) 508 | self.label_4.setWordWrap(True) 509 | self.label_4.setObjectName("label_4") 510 | self.horizontalLayout_4.addWidget(self.label_4) 511 | self.horizontalLayout_4.setStretch(0, 1) 512 | self.horizontalLayout_4.setStretch(1, 1) 513 | self.horizontalLayout_4.setStretch(2, 1) 514 | MainWindow.setCentralWidget(self.centralwidget) 515 | self.menubar = QtWidgets.QMenuBar(MainWindow) 516 | self.menubar.setGeometry(QtCore.QRect(0, 0, 674, 21)) 517 | self.menubar.setObjectName("menubar") 518 | MainWindow.setMenuBar(self.menubar) 519 | self.statusbar = QtWidgets.QStatusBar(MainWindow) 520 | self.statusbar.setObjectName("statusbar") 521 | MainWindow.setStatusBar(self.statusbar) 522 | 523 | self.retranslateUi(MainWindow) 524 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 525 | 526 | def retranslateUi(self, MainWindow): 527 | _translate = QtCore.QCoreApplication.translate 528 | MainWindow.setWindowTitle(_translate("MainWindow", "Circle of Fifths")) 529 | self.CLabel.setText(_translate("MainWindow", "C")) 530 | self.ALabel.setText(_translate("MainWindow", "A")) 531 | self.EbLabel.setText(_translate("MainWindow", "E")) 532 | self.FsLabel.setText(_translate("MainWindow", "F")) 533 | self.GLabel.setText(_translate("MainWindow", "G")) 534 | self.DLabel.setText(_translate("MainWindow", "D")) 535 | self.ELabel.setText(_translate("MainWindow", "E")) 536 | self.BLabel.setText(_translate("MainWindow", "B")) 537 | self.DbLabel.setText(_translate("MainWindow", "D")) 538 | self.AbLabel.setText(_translate("MainWindow", "A")) 539 | self.BbLabel.setText(_translate("MainWindow", "B")) 540 | self.FLabel.setText(_translate("MainWindow", "F")) 541 | self.SharpFlatLabel.setText(_translate("MainWindow", "♯")) 542 | self.label_2.setText(_translate("MainWindow", "Key")) 543 | self.label.setText(_translate("MainWindow", "Chord")) 544 | self.prog1.setText(_translate("MainWindow", "I - IV - V")) 545 | self.chordprog1.setText(_translate("MainWindow", "C - F - G")) 546 | self.label_3.setText(_translate("MainWindow", "♯ / ♭")) 547 | self.label_4.setText(_translate("MainWindow", "I - IV - V")) 548 | from mydropdown import myDropdown 549 | from mylabel import myLabel 550 | import CircleOfFifths_rc 551 | -------------------------------------------------------------------------------- /CircleOfFifths.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 674 10 | 736 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | Circle of Fifths 21 | 22 | 23 | 24 | 25 | 26 | 80 27 | 80 28 | 501 29 | 501 30 | 31 | 32 | 33 | 34 | 35 | 36 | :/images/circle.png 37 | 38 | 39 | true 40 | 41 | 42 | Qt::AlignCenter 43 | 44 | 45 | 46 | 47 | 48 | 300 49 | 60 50 | 51 51 | 51 52 | 53 | 54 | 55 | 56 | 27 57 | 58 | 59 | 60 | C 61 | 62 | 63 | Qt::AlignCenter 64 | 65 | 66 | 67 | 68 | 69 | 560 70 | 300 71 | 51 72 | 51 73 | 74 | 75 | 76 | 77 | 27 78 | 79 | 80 | 81 | A 82 | 83 | 84 | Qt::AlignCenter 85 | 86 | 87 | 88 | 89 | 90 | 50 91 | 300 92 | 60 93 | 51 94 | 95 | 96 | 97 | 98 | 27 99 | 100 | 101 | 102 | E<sub>♭</sub> 103 | 104 | 105 | Qt::AlignCenter 106 | 107 | 108 | 109 | 110 | 111 | 300 112 | 550 113 | 60 114 | 51 115 | 116 | 117 | 118 | 119 | 27 120 | 121 | 122 | 123 | F<sup>♯</sup> 124 | 125 | 126 | Qt::AlignCenter 127 | 128 | 129 | 130 | 131 | 132 | 430 133 | 90 134 | 51 135 | 51 136 | 137 | 138 | 139 | 140 | 27 141 | 142 | 143 | 144 | G 145 | 146 | 147 | Qt::AlignCenter 148 | 149 | 150 | 151 | 152 | 153 | 520 154 | 180 155 | 51 156 | 51 157 | 158 | 159 | 160 | 161 | 27 162 | 163 | 164 | 165 | D 166 | 167 | 168 | Qt::AlignCenter 169 | 170 | 171 | 172 | 173 | 174 | 520 175 | 430 176 | 51 177 | 51 178 | 179 | 180 | 181 | 182 | 27 183 | 184 | 185 | 186 | E 187 | 188 | 189 | Qt::AlignCenter 190 | 191 | 192 | 193 | 194 | 195 | 440 196 | 520 197 | 51 198 | 51 199 | 200 | 201 | 202 | 203 | 27 204 | 205 | 206 | 207 | B 208 | 209 | 210 | Qt::AlignCenter 211 | 212 | 213 | 214 | 215 | 216 | 160 217 | 520 218 | 60 219 | 51 220 | 221 | 222 | 223 | 224 | 27 225 | 226 | 227 | 228 | D<sub>♭</sub> 229 | 230 | 231 | Qt::AlignCenter 232 | 233 | 234 | 235 | 236 | 237 | 80 238 | 430 239 | 60 240 | 51 241 | 242 | 243 | 244 | 245 | 27 246 | 247 | 248 | 249 | A<sub>♭</sub> 250 | 251 | 252 | Qt::AlignCenter 253 | 254 | 255 | 256 | 257 | 258 | 80 259 | 180 260 | 60 261 | 51 262 | 263 | 264 | 265 | 266 | 27 267 | 268 | 269 | 270 | B<sub>♭</sub> 271 | 272 | 273 | Qt::AlignCenter 274 | 275 | 276 | 277 | 278 | 279 | 170 280 | 90 281 | 51 282 | 51 283 | 284 | 285 | 286 | 287 | 27 288 | 289 | 290 | 291 | F 292 | 293 | 294 | Qt::AlignCenter 295 | 296 | 297 | 298 | 299 | 300 | 300 301 | 300 302 | 60 303 | 51 304 | 305 | 306 | 307 | 308 | 27 309 | 310 | 311 | 312 | 313 | 314 | 315 | Qt::AlignCenter 316 | 317 | 318 | 319 | 320 | 321 | 400 322 | 150 323 | 51 324 | 51 325 | 326 | 327 | 328 | 329 | 12 330 | 331 | 332 | 333 | 334 | 335 | 336 | Qt::AlignCenter 337 | 338 | 339 | 340 | 341 | 342 | 470 343 | 220 344 | 51 345 | 51 346 | 347 | 348 | 349 | 350 | 12 351 | 352 | 353 | 354 | 355 | 356 | 357 | Qt::AlignCenter 358 | 359 | 360 | 361 | 362 | 363 | 490 364 | 300 365 | 51 366 | 51 367 | 368 | 369 | 370 | 371 | 12 372 | 373 | 374 | 375 | 376 | 377 | 378 | Qt::AlignCenter 379 | 380 | 381 | 382 | 383 | 384 | 460 385 | 400 386 | 51 387 | 51 388 | 389 | 390 | 391 | 392 | 12 393 | 394 | 395 | 396 | 397 | 398 | 399 | Qt::AlignCenter 400 | 401 | 402 | 403 | 404 | 405 | 410 406 | 460 407 | 51 408 | 51 409 | 410 | 411 | 412 | 413 | 12 414 | 415 | 416 | 417 | 418 | 419 | 420 | Qt::AlignCenter 421 | 422 | 423 | 424 | 425 | 426 | 310 427 | 490 428 | 51 429 | 51 430 | 431 | 432 | 433 | 434 | 12 435 | 436 | 437 | 438 | 439 | 440 | 441 | Qt::AlignCenter 442 | 443 | 444 | 445 | 446 | 447 | 210 448 | 460 449 | 51 450 | 51 451 | 452 | 453 | 454 | 455 | 12 456 | 457 | 458 | 459 | 460 | 461 | 462 | Qt::AlignCenter 463 | 464 | 465 | 466 | 467 | 468 | 150 469 | 400 470 | 51 471 | 51 472 | 473 | 474 | 475 | 476 | 12 477 | 478 | 479 | 480 | 481 | 482 | 483 | Qt::AlignCenter 484 | 485 | 486 | 487 | 488 | 489 | 120 490 | 300 491 | 51 492 | 51 493 | 494 | 495 | 496 | 497 | 12 498 | 499 | 500 | 501 | 502 | 503 | 504 | Qt::AlignCenter 505 | 506 | 507 | 508 | 509 | 510 | 140 511 | 220 512 | 51 513 | 51 514 | 515 | 516 | 517 | 518 | 12 519 | 520 | 521 | 522 | 523 | 524 | 525 | Qt::AlignCenter 526 | 527 | 528 | 529 | 530 | 531 | 210 532 | 150 533 | 51 534 | 51 535 | 536 | 537 | 538 | 539 | 12 540 | 541 | 542 | 543 | 544 | 545 | 546 | Qt::AlignCenter 547 | 548 | 549 | 550 | 551 | 552 | 300 553 | 120 554 | 51 555 | 51 556 | 557 | 558 | 559 | 560 | 12 561 | 562 | 563 | 564 | 565 | 566 | 567 | Qt::AlignCenter 568 | 569 | 570 | 571 | 572 | 573 | 70 574 | 16 575 | 191 576 | 41 577 | 578 | 579 | 580 | 581 | 16 582 | 583 | 584 | 585 | 586 | 587 | 588 | 10 589 | 10 590 | 61 591 | 51 592 | 593 | 594 | 595 | 596 | 27 597 | 598 | 599 | 600 | 601 | 602 | 603 | Qt::AlignCenter 604 | 605 | 606 | 607 | 608 | 609 | 10 610 | 650 611 | 651 612 | 31 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 14 621 | 622 | 623 | 624 | 625 | 626 | 627 | Qt::AlignCenter 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 14 636 | 637 | 638 | 639 | 640 | 641 | 642 | Qt::AlignCenter 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 14 651 | 652 | 653 | 654 | 655 | 656 | 657 | Qt::AlignCenter 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 14 666 | 667 | 668 | 669 | 670 | 671 | 672 | Qt::AlignCenter 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 14 681 | 682 | 683 | 684 | 685 | 686 | 687 | Qt::AlignCenter 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 14 696 | 697 | 698 | 699 | 700 | 701 | 702 | Qt::AlignCenter 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 14 711 | 712 | 713 | 714 | 715 | 716 | 717 | Qt::AlignCenter 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 459 727 | 15 728 | 201 729 | 41 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 11 738 | 739 | 740 | 741 | Key 742 | 743 | 744 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 745 | 746 | 747 | true 748 | 749 | 750 | 751 | 752 | 753 | 754 | 1 755 | 756 | 757 | Qt::Horizontal 758 | 759 | 760 | 0 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 11 769 | 770 | 771 | 772 | Chord 773 | 774 | 775 | true 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 10 785 | 680 786 | 651 787 | 31 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 12 796 | 797 | 798 | 799 | 800 | 801 | 802 | Qt::AlignCenter 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 12 811 | 812 | 813 | 814 | 815 | 816 | 817 | Qt::AlignCenter 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 12 826 | 827 | 828 | 829 | 830 | 831 | 832 | Qt::AlignCenter 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 12 841 | 842 | 843 | 844 | 845 | 846 | 847 | Qt::AlignCenter 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 12 856 | 857 | 858 | 859 | 860 | 861 | 862 | Qt::AlignCenter 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 12 871 | 872 | 873 | 874 | 875 | 876 | 877 | Qt::AlignCenter 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 12 886 | 887 | 888 | 889 | 890 | 891 | 892 | Qt::AlignCenter 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 10 902 | 620 903 | 161 904 | 21 905 | 906 | 907 | 908 | 909 | 14 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 190 920 | 250 921 | 291 922 | 151 923 | 924 | 925 | 926 | border:0 927 | 928 | 929 | QFrame::StyledPanel 930 | 931 | 932 | QFrame::Raised 933 | 934 | 935 | 936 | 937 | -10 938 | 0 939 | 301 940 | 151 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 0 949 | 0 950 | 951 | 952 | 953 | 954 | 16777215 955 | 16777215 956 | 957 | 958 | 959 | 960 | 12 961 | 962 | 963 | 964 | 965 | 966 | 967 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 12 976 | 75 977 | true 978 | 979 | 980 | 981 | 982 | 983 | 984 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 0 993 | 0 994 | 995 | 996 | 997 | 998 | 16777215 999 | 16777215 1000 | 1001 | 1002 | 1003 | 1004 | 12 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 0 1020 | 0 1021 | 1022 | 1023 | 1024 | 1025 | 16777215 1026 | 16777215 1027 | 1028 | 1029 | 1030 | 1031 | 12 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 0 1047 | 0 1048 | 1049 | 1050 | 1051 | 1052 | 16777215 1053 | 16777215 1054 | 1055 | 1056 | 1057 | 1058 | 12 1059 | 1060 | 1061 | 1062 | I - IV - V 1063 | 1064 | 1065 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 12 1074 | 75 1075 | true 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 12 1091 | 75 1092 | true 1093 | 1094 | 1095 | 1096 | C - F - G 1097 | 1098 | 1099 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 12 1108 | 75 1109 | true 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 460 1127 | 600 1128 | 201 1129 | 41 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 14 1138 | 1139 | 1140 | 1141 | ♯ / ♭ 1142 | 1143 | 1144 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 1145 | 1146 | 1147 | true 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1 1155 | 1156 | 1157 | Qt::Horizontal 1158 | 1159 | 1160 | 0 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 11 1169 | 1170 | 1171 | 1172 | I - IV - V 1173 | 1174 | 1175 | true 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 0 1186 | 0 1187 | 674 1188 | 21 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | 1195 | 1196 | myLabel 1197 | QLabel 1198 |
mylabel.h
1199 |
1200 | 1201 | myDropdown 1202 | QComboBox 1203 |
mydropdown.h
1204 |
1205 |
1206 | 1207 | 1208 | 1209 | 1210 |
1211 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /keyfromchords.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 837 10 | 371 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 60 26 | 50 27 | 28 | 29 | 30 | 31 | 60 32 | 50 33 | 34 | 35 | 36 | 37 | 16 38 | 39 | 40 | 41 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 42 | 43 | 44 | C 45 | 46 | 47 | true 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 60 58 | 50 59 | 60 | 61 | 62 | 63 | 60 64 | 50 65 | 66 | 67 | 68 | 69 | 16 70 | 71 | 72 | 73 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 74 | 75 | 76 | C♯ 77 | 78 | 79 | true 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 60 88 | 50 89 | 90 | 91 | 92 | 93 | 60 94 | 50 95 | 96 | 97 | 98 | 99 | 16 100 | 101 | 102 | 103 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 104 | 105 | 106 | D♭ 107 | 108 | 109 | true 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 60 120 | 50 121 | 122 | 123 | 124 | 125 | 60 126 | 50 127 | 128 | 129 | 130 | 131 | 16 132 | 133 | 134 | 135 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 136 | 137 | 138 | D 139 | 140 | 141 | true 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 60 152 | 50 153 | 154 | 155 | 156 | 157 | 60 158 | 50 159 | 160 | 161 | 162 | 163 | 16 164 | 165 | 166 | 167 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 168 | 169 | 170 | D♯ 171 | 172 | 173 | true 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 60 182 | 50 183 | 184 | 185 | 186 | 187 | 60 188 | 50 189 | 190 | 191 | 192 | 193 | 16 194 | 195 | 196 | 197 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 198 | 199 | 200 | E♭ 201 | 202 | 203 | true 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 60 214 | 50 215 | 216 | 217 | 218 | 219 | 60 220 | 50 221 | 222 | 223 | 224 | 225 | 16 226 | 227 | 228 | 229 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 230 | 231 | 232 | E 233 | 234 | 235 | true 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 60 244 | 50 245 | 246 | 247 | 248 | 249 | 60 250 | 50 251 | 252 | 253 | 254 | 255 | 16 256 | 257 | 258 | 259 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 260 | 261 | 262 | F 263 | 264 | 265 | true 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 60 276 | 50 277 | 278 | 279 | 280 | 281 | 60 282 | 50 283 | 284 | 285 | 286 | 287 | 16 288 | 289 | 290 | 291 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 292 | 293 | 294 | F♯ 295 | 296 | 297 | true 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 60 306 | 50 307 | 308 | 309 | 310 | 311 | 60 312 | 50 313 | 314 | 315 | 316 | 317 | 16 318 | 319 | 320 | 321 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 322 | 323 | 324 | G♭ 325 | 326 | 327 | true 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 60 338 | 50 339 | 340 | 341 | 342 | 343 | 60 344 | 50 345 | 346 | 347 | 348 | 349 | 16 350 | 351 | 352 | 353 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 354 | 355 | 356 | G 357 | 358 | 359 | true 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 60 370 | 50 371 | 372 | 373 | 374 | 375 | 60 376 | 50 377 | 378 | 379 | 380 | 381 | 16 382 | 383 | 384 | 385 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 386 | 387 | 388 | G♯ 389 | 390 | 391 | true 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 60 400 | 50 401 | 402 | 403 | 404 | 405 | 60 406 | 50 407 | 408 | 409 | 410 | 411 | 16 412 | 413 | 414 | 415 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 416 | 417 | 418 | A♭ 419 | 420 | 421 | true 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 60 432 | 50 433 | 434 | 435 | 436 | 437 | 60 438 | 50 439 | 440 | 441 | 442 | 443 | 16 444 | 445 | 446 | 447 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 448 | 449 | 450 | A 451 | 452 | 453 | true 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 60 464 | 50 465 | 466 | 467 | 468 | 469 | 60 470 | 50 471 | 472 | 473 | 474 | 475 | 16 476 | 477 | 478 | 479 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 480 | 481 | 482 | A♯ 483 | 484 | 485 | true 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 60 494 | 50 495 | 496 | 497 | 498 | 499 | 60 500 | 50 501 | 502 | 503 | 504 | 505 | 16 506 | 507 | 508 | 509 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 510 | 511 | 512 | B♭ 513 | 514 | 515 | true 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 60 526 | 50 527 | 528 | 529 | 530 | 531 | 60 532 | 50 533 | 534 | 535 | 536 | 537 | 16 538 | 539 | 540 | 541 | QPushButton::checked{background-color : rgba(205, 253, 205, 80%)}; 542 | 543 | 544 | B 545 | 546 | 547 | true 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | Qt::Horizontal 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 60 567 | 50 568 | 569 | 570 | 571 | 572 | 60 573 | 50 574 | 575 | 576 | 577 | 578 | 16 579 | 580 | 581 | 582 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 583 | 584 | 585 | Cm 586 | 587 | 588 | true 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 60 599 | 50 600 | 601 | 602 | 603 | 604 | 60 605 | 50 606 | 607 | 608 | 609 | 610 | 16 611 | 612 | 613 | 614 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 615 | 616 | 617 | C♯m 618 | 619 | 620 | true 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 60 629 | 50 630 | 631 | 632 | 633 | 634 | 60 635 | 50 636 | 637 | 638 | 639 | 640 | 16 641 | 642 | 643 | 644 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 645 | 646 | 647 | D♭m 648 | 649 | 650 | true 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 60 661 | 50 662 | 663 | 664 | 665 | 666 | 60 667 | 50 668 | 669 | 670 | 671 | 672 | 16 673 | 674 | 675 | 676 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 677 | 678 | 679 | Dm 680 | 681 | 682 | true 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 60 693 | 50 694 | 695 | 696 | 697 | 698 | 60 699 | 50 700 | 701 | 702 | 703 | 704 | 16 705 | 706 | 707 | 708 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 709 | 710 | 711 | D♯m 712 | 713 | 714 | true 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 60 723 | 50 724 | 725 | 726 | 727 | 728 | 60 729 | 50 730 | 731 | 732 | 733 | 734 | 16 735 | 736 | 737 | 738 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 739 | 740 | 741 | E♭m 742 | 743 | 744 | true 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 60 755 | 50 756 | 757 | 758 | 759 | 760 | 60 761 | 50 762 | 763 | 764 | 765 | 766 | 16 767 | 768 | 769 | 770 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 771 | 772 | 773 | Em 774 | 775 | 776 | true 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 60 785 | 50 786 | 787 | 788 | 789 | 790 | 60 791 | 50 792 | 793 | 794 | 795 | 796 | 16 797 | 798 | 799 | 800 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 801 | 802 | 803 | Fm 804 | 805 | 806 | true 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 60 817 | 50 818 | 819 | 820 | 821 | 822 | 60 823 | 50 824 | 825 | 826 | 827 | 828 | 16 829 | 830 | 831 | 832 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 833 | 834 | 835 | F♯m 836 | 837 | 838 | true 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 60 847 | 50 848 | 849 | 850 | 851 | 852 | 60 853 | 50 854 | 855 | 856 | 857 | 858 | 16 859 | 860 | 861 | 862 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 863 | 864 | 865 | G♭m 866 | 867 | 868 | true 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 60 879 | 50 880 | 881 | 882 | 883 | 884 | 60 885 | 50 886 | 887 | 888 | 889 | 890 | 16 891 | 892 | 893 | 894 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 895 | 896 | 897 | Gm 898 | 899 | 900 | true 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 60 911 | 50 912 | 913 | 914 | 915 | 916 | 60 917 | 50 918 | 919 | 920 | 921 | 922 | 16 923 | 924 | 925 | 926 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 927 | 928 | 929 | G♯m 930 | 931 | 932 | true 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 60 941 | 50 942 | 943 | 944 | 945 | 946 | 60 947 | 50 948 | 949 | 950 | 951 | 952 | 16 953 | 954 | 955 | 956 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 957 | 958 | 959 | A♭m 960 | 961 | 962 | true 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 60 973 | 50 974 | 975 | 976 | 977 | 978 | 60 979 | 50 980 | 981 | 982 | 983 | 984 | 16 985 | 986 | 987 | 988 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 989 | 990 | 991 | Am 992 | 993 | 994 | true 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 60 1005 | 50 1006 | 1007 | 1008 | 1009 | 1010 | 60 1011 | 50 1012 | 1013 | 1014 | 1015 | 1016 | 16 1017 | 1018 | 1019 | 1020 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 1021 | 1022 | 1023 | A♯m 1024 | 1025 | 1026 | true 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 60 1035 | 50 1036 | 1037 | 1038 | 1039 | 1040 | 60 1041 | 50 1042 | 1043 | 1044 | 1045 | 1046 | 16 1047 | 1048 | 1049 | 1050 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 1051 | 1052 | 1053 | B♭m 1054 | 1055 | 1056 | true 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 60 1067 | 50 1068 | 1069 | 1070 | 1071 | 1072 | 60 1073 | 50 1074 | 1075 | 1076 | 1077 | 1078 | 16 1079 | 1080 | 1081 | 1082 | QPushButton::checked{background-color : rgba(173, 215, 229, 80%)}; 1083 | 1084 | 1085 | Bm 1086 | 1087 | 1088 | true 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | Qt::Horizontal 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | QLayout::SetFixedSize 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 200 1113 | 0 1114 | 1115 | 1116 | 1117 | 1118 | 200 1119 | 16777215 1120 | 1121 | 1122 | 1123 | 1124 | 16 1125 | 1126 | 1127 | 1128 | Feels: 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 200 1137 | 0 1138 | 1139 | 1140 | 1141 | 1142 | 200 1143 | 16777215 1144 | 1145 | 1146 | 1147 | 2 1148 | 1149 | 1150 | 1 1151 | 1152 | 1153 | 1 1154 | 1155 | 1156 | Qt::Horizontal 1157 | 1158 | 1159 | QSlider::TicksBelow 1160 | 1161 | 1162 | 1 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 16 1173 | 1174 | 1175 | 1176 | Major 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 16 1185 | 1186 | 1187 | 1188 | Minor 1189 | 1190 | 1191 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | 1198 | 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 1205 | 0 1206 | 130 1207 | 1208 | 1209 | 1210 | 1211 | 16777215 1212 | 130 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | mySlider 1228 | QSlider 1229 |
myslider.h
1230 |
1231 |
1232 | 1233 | 1234 |
1235 | --------------------------------------------------------------------------------