Commit e42f3270 authored by Sandro Andrade's avatar Sandro Andrade

Major refactoring to separate JSON files in definitions and exercises

parent babeafc6
......@@ -87,7 +87,7 @@ include_directories(${minuet_SOURCE_DIR}/src/ ${minuet_BINARY_DIR}/src)
add_subdirectory(doc)
add_subdirectory(src)
add_subdirectory(icons)
add_subdirectory(exercises)
add_subdirectory(data)
install(FILES org.kde.minuet.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/appdata/)
......
add_subdirectory(definitions)
add_subdirectory(exercises)
install(DIRECTORY exercise-images DESTINATION ${KDE_INSTALL_DATADIR}/minuet/qml)
set(minuet_DEFINITIONS
intervals-ascending-melodic-definitions.json
intervals-descending-melodic-definitions.json
chords-root-position-definitions.json
)
install(FILES ${minuet_DEFINITIONS} DESTINATION ${KDE_INSTALL_DATADIR}/minuet/definitions)
{
"definitions": [
{
"tags": ["chord", "root-position", "minor", "triad"],
"name": "Minor",
"sequence": "3 7"
},
{
"tags": ["chord", "root-position", "major", "triad"],
"name": "Major",
"sequence": "4 7"
},
{
"tags": ["chord", "root-position", "minor", "7", "seventh"],
"name": "Minor 7",
"sequence": "3 7 10"
},
{
"tags": ["chord", "root-position", "dominant", "7", "seventh"],
"name": "Dominant 7",
"sequence": "4 7 10"
},
{
"tags": ["chord", "root-position", "diminished", "triad"],
"name": "Diminished",
"sequence": "3 6"
},
{
"tags": ["chord", "root-position", "augmented", "triad"],
"name": "Augmented",
"sequence": "4 8"
},
{
"tags": ["chord", "root-position", "minor", "9", "extended"],
"name": "Minor 9",
"sequence": "3 7 10 14"
},
{
"tags": ["chord", "root-position", "major", "9", "extended"],
"name": "Major 9",
"sequence": "4 7 10 14"
},
{
"tags": ["chord", "root-position", "major", "7", "9", "altered"],
"name": "Major 7(b9)",
"sequence": "4 7 10 13"
},
{
"tags": ["chord", "root-position", "major", "7", "seventh"],
"name": "Major maj7",
"sequence": "4 7 11"
},{
"tags": ["chord", "root-position", "major", "7", "9", "extended"],
"name": "Major maj7(9)",
"sequence": "4 7 11 14"
},
{
"tags": ["chord", "root-position", "major", "7", "extended"],
"name": "Major Seventh",
"sequence": "4 7 11"
},
{
"tags": ["chord", "root-position", "diminished", "7", "seventh"],
"name": "Diminished Seventh",
"sequence": "3 6 9"
},
{
"tags": ["chord", "root-position", "diminished", "7", "seventh"],
"name": "Half Diminished Seventh",
"sequence": "3 6 10"
},
{
"tags": ["chord", "root-position", "minor", "7", "altered"],
"name": "Minor maj7",
"sequence": "3 7 11"
},
{
"tags": ["chord", "root-position", "major", "5", "7", "altered"],
"name": "Major maj7(b5)",
"sequence": "4 6 11"
},
{
"tags": ["chord", "root-position", "major", "7", "altered"],
"name": "Major 7",
"sequence": "4 7 10"
},
{
"tags": ["chord", "root-position", "major", "5", "7", "altered"],
"name": "Major 7(b5)",
"sequence": "4 6 10"
},
{
"tags": ["chord", "root-position", "major", "5", "7", "altered"],
"name": "Major 7(#5)",
"sequence": "4 8 10"
},
{
"tags": ["chord", "root-position", "major", "7", "9", "altered"],
"name": "Major 9",
"sequence": "4 7 10 14"
},
{
"tags": ["chord", "root-position", "major", "7", "9", "altered"],
"name": "Major 7(#9)",
"sequence": "4 7 10 15"
},
{
"tags": ["chord", "root-position", "major", "7", "9", "altered"],
"name": "Major 7(b9)",
"sequence": "4 7 10 13"
},
{
"tags": ["chord", "root-position", "major", "7", "9", "altered"],
"name": "Major 7(#5/b9)",
"sequence": "4 8 10 13"
}
]
}
{
"definitions": [
{
"tags": ["interval", "ascending", "2", "minor"],
"name": "Minor Second",
"sequence": "1"
},
{
"tags": ["interval", "ascending", "2", "major"],
"name": "Major Second",
"sequence": "2"
},
{
"tags": ["interval", "ascending", "3", "minor"],
"name": "Minor Third",
"sequence": "3"
},
{
"tags": ["interval", "ascending", "3", "major"],
"name": "Major Third",
"sequence": "4"
},
{
"tags": ["interval", "ascending", "4"],
"name": "Perfect Fourth",
"sequence": "5"
},
{
"tags": ["interval", "ascending", "tritone"],
"name": "Tritone",
"sequence": "6"
},
{
"tags": ["interval", "ascending", "5"],
"name": "Perfect Fifth",
"sequence": "7"
},
{
"tags": ["interval", "ascending", "6", "minor"],
"name": "Minor Sixth",
"sequence": "8"
},
{
"tags": ["interval", "ascending", "6", "major"],
"name": "Major Sixth",
"sequence": "9"
},
{
"tags": ["interval", "ascending", "7", "minor"],
"name": "Minor Seventh",
"sequence": "10"
},
{
"tags": ["interval", "ascending", "7", "major"],
"name": "Major Seventh",
"sequence": "11"
},
{
"tags": ["interval", "ascending", "8"],
"name": "Perfect Octave",
"sequence": "12"
},
{
"tags": ["interval", "ascending", "9", "minor"],
"name": "Minor Ninth",
"sequence": "13"
},
{
"tags": ["interval", "ascending", "9", "major"],
"name": "Major Ninth",
"sequence": "14"
},
{
"tags": ["interval", "ascending", "10", "minor"],
"name": "Minor Tenth",
"sequence": "15"
},
{
"tags": ["interval", "ascending", "10", "major"],
"name": "Major Tenth",
"sequence": "16"
},
{
"tags": ["interval", "ascending", "11"],
"name": "Perfect Eleventh",
"sequence": "17"
},
{
"tags": ["interval", "ascending", "8+tritone"],
"name": "Octave + Tritone",
"sequence": "18"
},
{
"tags": ["interval", "ascending", "12"],
"name": "Perfect Twelfth",
"sequence": "19"
},
{
"tags": ["interval", "ascending", "13", "minor"],
"name": "Minor Thirteenth",
"sequence": "20"
},
{
"tags": ["interval", "ascending", "13", "major"],
"name": "Major Thirteenth",
"sequence": "21"
},
{
"tags": ["interval", "ascending", "14", "minor"],
"name": "Minor Fourteenth",
"sequence": "22"
},
{
"tags": ["interval", "ascending", "14", "major"],
"name": "Major Fourteenth",
"sequence": "23"
},
{
"tags": ["interval", "ascending", "double8"],
"name": "Perfect Double Octave",
"sequence": "24"
}
]
}
{
"definitions": [
{
"tags": ["interval", "descending", "2", "minor"],
"name": "Minor Second",
"sequence": "-1"
},
{
"tags": ["interval", "descending", "2", "major"],
"name": "Major Second",
"sequence": "-2"
},
{
"tags": ["interval", "descending", "3", "minor"],
"name": "Minor Third",
"sequence": "-3"
},
{
"tags": ["interval", "descending", "3", "major"],
"name": "Major Third",
"sequence": "-4"
},
{
"tags": ["interval", "descending", "4"],
"name": "Perfect Fourth",
"sequence": "-5"
},
{
"tags": ["interval", "descending", "tritone"],
"name": "Tritone",
"sequence": "-6"
},
{
"tags": ["interval", "descending", "5"],
"name": "Perfect Fifth",
"sequence": "-7"
},
{
"tags": ["interval", "descending", "6", "minor"],
"name": "Minor Sixth",
"sequence": "-8"
},
{
"tags": ["interval", "descending", "6", "major"],
"name": "Major Sixth",
"sequence": "-9"
},
{
"tags": ["interval", "descending", "7", "minor"],
"name": "Minor Seventh",
"sequence": "-10"
},
{
"tags": ["interval", "descending", "7", "major"],
"name": "Major Seventh",
"sequence": "-11"
},
{
"tags": ["interval", "descending", "8"],
"name": "Perfect Octave",
"sequence": "-12"
},
{
"tags": ["interval", "descending", "9", "minor"],
"name": "Minor Ninth",
"sequence": "-13"
},
{
"tags": ["interval", "descending", "9", "major"],
"name": "Major Ninth",
"sequence": "-14"
},
{
"tags": ["interval", "descending", "10", "minor"],
"name": "Minor Tenth",
"sequence": "-15"
},
{
"tags": ["interval", "descending", "10", "major"],
"name": "Major Tenth",
"sequence": "-16"
},
{
"tags": ["interval", "descending", "11"],
"name": "Perfect Eleventh",
"sequence": "-17"
},
{
"tags": ["interval", "descending", "8+tritone"],
"name": "Octave + Tritone",
"sequence": "-18"
},
{
"tags": ["interval", "descending", "12"],
"name": "Perfect Twelfth",
"sequence": "-19"
},
{
"tags": ["interval", "descending", "13", "minor"],
"name": "Minor Thirteenth",
"sequence": "-20"
},
{
"tags": ["interval", "descending", "13", "major"],
"name": "Major Thirteenth",
"sequence": "-21"
},
{
"tags": ["interval", "descending", "14", "minor"],
"name": "Minor Fourteenth",
"sequence": "-22"
},
{
"tags": ["interval", "descending", "14", "major"],
"name": "Major Fourteenth",
"sequence": "-23"
},
{
"tags": ["interval", "descending", "double8"],
"name": "Perfect Double Octave",
"sequence": "-24"
}
]
}
set(minuet_EXERCISES
intervals-ascending-melodic-exercises.json
intervals-descending-melodic-exercises.json
chords-root-position-exercises.json
)
install(FILES ${minuet_EXERCISES} DESTINATION ${KDE_INSTALL_DATADIR}/minuet/exercises)
{
"exercises": [
{
"name": "Chords",
"root": "21..104",
"playMode": "chord",
"userMessage": "the chord",
"children": [
{
"name": "Root Position",
"filter-tags": ["chord", "root-position"],
"children": [
{
"name": "Minor and Major Chords",
"filter-tags": ["triad"],
"or-tags": ["minor", "major"]
},
{
"name": "Minor 7 and Dominant 7 Chords",
"filter-tags": ["7"],
"or-tags": ["minor", "dominant"]
},
{
"name": "Diminished and Augmented Chords",
"filter-tags": ["triad"],
"or-tags": ["diminished", "augmented"]
},
{
"name": "Minor 9 and Major 9 Chords",
"filter-tags": ["9"],
"or-tags": ["minor", "major"]
},
{
"name": "Major 7(b9) and Major maj7(9) Chords",
"filter-tags": ["7", "9"],
"or-tags": ["major"]
},
{
"name": "Major Seventh, Diminished Seventh, and Half Diminished Seventh Chords",
"filter-tags": ["7"],
"or-tags": ["major", "diminished"]
},
{
"name": "Chords with 9 in their name",
"or-tags": ["9"]
},
{
"name": "Altered Chords",
"filter-tags": ["altered"]
},
{
"name": "Chords with 7 in their name",
"filter-tags": ["7"]
},
{
"name": "Minor, Major, Diminished, and Augmented Chords",
"or-tags": ["minor", "major", "diminished", "augmented"]
},
{
"name": "Lots of Chords"
}
]
}
]
}
]
}
{
"exercises": [
{
"name": "Intervals",
"root": "21..104",
"playMode": "scale",
"userMessage": "the interval",
"children": [
{
"name": "Ascending Melodic Intervals",
"filter-tags": ["interval", "ascending"],
"children": [
{
"name": "Seconds",
"or-tags": ["2"]
},
{
"name": "Thirds",
"or-tags": ["3"]
},
{
"name": "Fourths and Fifths",
"or-tags": ["4", "5"]
},
{
"name": "Sixths",
"or-tags": ["6"]
},
{
"name": "Sevenths",
"or-tags": ["7"]
},
{
"name": "Ninths",
"or-tags": ["9"]
},
{
"name": "Tenths",
"or-tags": ["10"]
},
{
"name": "Tritone and Sevenths",
"or-tags": ["tritone", "7"]
},
{
"name": "Fourths, Fifths, and Octave",
"or-tags": ["4", "5", "8"]
},
{
"name": "Seconds and Thirds",
"or-tags": ["2", "3"]
},
{
"name": "Sixths and Sevenths",
"or-tags": ["6", "7"]
},
{
"name": "Sevenths and Ninths",
"or-tags": ["7", "9"]
},
{
"name": "Second to Octave",
"or-tags": ["2", "3", "4", "tritone", "5", "6", "7", "8"]
},
{
"name": "Second to Tenth",
"or-tags": ["2", "3", "4", "tritone", "5", "6", "7", "8", "9", "10"]
},
{
"name": "Second to 15th",
"or-tags": ["2", "3", "4", "tritone", "5", "6", "7", "8", "9", "10", "11", "8+tritone", "12", "13", "14", "double8"]
}
]
}
]
}
]
}
{
"exercises": [
{
"name": "Intervals",
"root": "21..104",
"playMode": "scale",
"userMessage": "the interval",
"children": [
{
"name": "Descending Melodic Intervals",
"filter-tags": ["interval", "descending"],
"children": [
{
"name": "Seconds",
"or-tags": ["2"]
},
{
"name": "Thirds",
"or-tags": ["3"]
},
{
"name": "Fourths and Fifths",
"or-tags": ["4", "5"]
},
{
"name": "Sixths",
"or-tags": ["6"]
},
{
"name": "Sevenths",
"or-tags": ["7"]
},
{
"name": "Ninths",
"or-tags": ["9"]
},
{
"name"