Skip to content

Commit

Permalink
Add toggle for Camelot key.
Browse files Browse the repository at this point in the history
  • Loading branch information
kokernutz committed Apr 30, 2018
1 parent 180aa80 commit 8a0d831
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 30 deletions.
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,26 @@

**Changes from default screens:**

- Preferences: **NEW** Edit Screens/Views/Definitions/Prefs.qml
- Browser: **UPDATED** Display 7 or 9 items on screen (toggle in prefs)
- Browser: **FIXED** Key offset to right of key (when potential match)
- Preferences: Edit Screens/Views/Definitions/Prefs.qml
- Global: **NEW** Toggle between Open and Camelot key (toggle in prefs)
- Browser: Display 7 or 9 items on screen (toggle in prefs)
- Browser: Key offset to right of key (when potential match)
- Browser: Added color to key offset (green = up, yellow = down, blue = neighbor, red = maybe)
- Browser: Added keys of all decks to bottom
- Browser: Camelot keys
- Deck: **NEW** Spectrum colors (toggle in prefs)
- Deck: **NEW** *EXPERIMENTAL* Beat/phase meter (toggle in prefs)
- Deck: **NEW** Hide Album Art (toggle in prefs)
- Deck: **NEW** Display keylock status
- Deck: **NEW** Display key
- Deck: **NEW** Display SYNC/MASTER status
- Deck: **NEW** Display original BPM
- Deck: Spectrum colors (toggle in prefs)
- Deck: *EXPERIMENTAL* Beat/phase meter (toggle in prefs)
- Deck: Hide Album Art (toggle in prefs)
- Deck: Display keylock status
- Deck: Display key
- Deck: Display SYNC/MASTER status
- Deck: Display original BPM
- Deck: Added minute markers
- Deck: **UPDATED** Added track comment (toggle in prefs)
- Deck: **UPDATED** Added beat countdown (toggle in prefs)
- Deck: Added track comment (toggle in prefs)
- Deck: Added beat countdown (toggle in prefs)
- Deck: Always displays tempo offset
- Deck: Darkened portion of stripe already played
- Deck: **UPDATED** Time remaining to right of stripe (toggle in prefs)
- Deck: Time remaining to right of stripe (toggle in prefs)
- Deck: Camelot key on keylock overlay
- FX: Added 2 additional lines
- FX: Text now left-justified
Expand Down
25 changes: 18 additions & 7 deletions Screens/Views/Browser/BrowserFooter.qml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,24 @@ Rectangle {
MappingProperty { id: isContentListProp; path: propertiesPath + ".browser.is_content_list" }
MappingProperty { id: selectedFooterItem; path: propertiesPath + ".selected_footer_item" }

AppProperty { id: deckAKeyDisplay; path: "app.traktor.decks.1.track.key.key_for_display" }
AppProperty { id: deckBKeyDisplay; path: "app.traktor.decks.2.track.key.key_for_display" }
AppProperty { id: deckCKeyDisplay; path: "app.traktor.decks.3.track.key.key_for_display" }
AppProperty { id: deckDKeyDisplay; path: "app.traktor.decks.4.track.key.key_for_display" }
AppProperty { id: deckAKeyForDisplay; path: "app.traktor.decks.1.track.key.key_for_display" }
AppProperty { id: deckBKeyForDisplay; path: "app.traktor.decks.2.track.key.key_for_display" }
AppProperty { id: deckCKeyForDisplay; path: "app.traktor.decks.3.track.key.key_for_display" }
AppProperty { id: deckDKeyForDisplay; path: "app.traktor.decks.4.track.key.key_for_display" }

readonly property variant deckLabels: ["C", "A", "B", "D"]
readonly property variant decks: [deckCKeyDisplay, deckAKeyDisplay, deckBKeyDisplay, deckDKeyDisplay]
AppProperty { id: deckAPropMusicalKey; path: "app.traktor.decks.1.content.musical_key" }
AppProperty { id: deckBPropMusicalKey; path: "app.traktor.decks.2.content.musical_key" }
AppProperty { id: deckCPropMusicalKey; path: "app.traktor.decks.3.content.musical_key" }
AppProperty { id: deckDPropMusicalKey; path: "app.traktor.decks.4.content.musical_key" }

readonly property variant deckLabels: ["C", "A", "B", "D"]

readonly property variant decksKeyForDisplay: [utils.convertToCamelot(deckCKeyForDisplay.value),
utils.convertToCamelot(deckAKeyForDisplay.value),
utils.convertToCamelot(deckBKeyForDisplay.value),
utils.convertToCamelot(deckDKeyForDisplay.value)]

readonly property variant decksPropMusicalKey: [deckCPropMusicalKey, deckAPropMusicalKey, deckBPropMusicalKey, deckDPropMusicalKey]

//--------------------------------------------------------------------------------------------------------------------
// Behavior on Sorting Chnages (show/hide sorting widget, select next allowed sorting)
Expand Down Expand Up @@ -152,7 +163,7 @@ Rectangle {
color: (index == 1 || index == 2) ? colors.colorDeckBlueBright : colors.colorWhite //colors.colorFontBrowserHeader
width: parent.width
horizontalAlignment: Text.AlignHCenter
text: deckLabels[index] + ": " + utils.convertToCamelot(decks[index].value)
text: deckLabels[index] + ": " + (prefs.camelotKey ? decksKeyForDisplay[index] : decksPropMusicalKey[index].value)
}

Rectangle {
Expand Down
2 changes: 1 addition & 1 deletion Screens/Views/Browser/ListDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Item {
color: (model.dataType == BrowserDataType.Track) ? (((model.key == "none") || (model.key == "None")) ? textColor : (qmlBrowser.sortingId == 28 ? parent.colorForKey(model.keyIndex) : textColor)) : textColor
width: 32
clip: true
text: (model.dataType == BrowserDataType.Track) ? (((model.key == "none") || (model.key == "None")) ? "-" : keyText[model.keyIndex]) : ""
text: (model.dataType == BrowserDataType.Track) ? (((model.key == "none") || (model.key == "None")) ? "-" : (prefs.camelotKey ? keyText[model.keyIndex] : model.key)) : ""
font.pixelSize: browserFontSize
}

Expand Down
2 changes: 1 addition & 1 deletion Screens/Views/Deck/DeckHeader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ Item {
anchors.verticalCenterOffset: 1
horizontalAlignment: Text.AlignRight
font.pixelSize: fonts.middleFontSize
text: utils.convertToCamelot(deckKeyDisplay.value)
text: prefs.camelotKey ? utils.convertToCamelot(deckKeyDisplay.value) : deckKeyDisplay.value
color: parent.colorForKey(utils.returnKeyIndex(deckKeyDisplay.value))
onTextChanged: { color = parent.border.color }
}
Expand Down
19 changes: 12 additions & 7 deletions Screens/Views/Definitions/Prefs.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@ import QtQuick 2.0

QtObject {

// change the behavior of the mods by setting the following items to true or false

// global preferences
readonly property bool camelotKey: true

// browser preferences
readonly property bool displayMoreItems: true // toggle between 7 and 9 items on screen
readonly property bool displayMoreItems: true // toggle between 7 and 9 items on screen

// deck preferences
readonly property bool displayAlbumCover: true
readonly property bool displayBeatCountdown: true
readonly property bool displayPhaseMeter: true
readonly property bool displayTimeLeft: true
readonly property bool displayTrackComment: true
readonly property bool spectrumWaveformColors: true
readonly property bool displayAlbumCover: true
readonly property bool displayBeatCountdown: true
readonly property bool displayPhaseMeter: true
readonly property bool displayTimeLeft: true
readonly property bool displayTrackComment: true
readonly property bool spectrumWaveformColors: true

}
2 changes: 1 addition & 1 deletion Screens/Views/Overlays/CenterOverlays/Keylock.qml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ CenterOverlay {
font.capitalization: Font.AllUppercase
color: colors.colorGrey104
opacity: (keyDisplay.value=="") ? 0 : 1
text: "(" + utils.convertToCamelot(keyDisplay.value) + ((offset==0)?"":" ") + ")"
text: "(" + (prefs.camelotKey ? utils.convertToCamelot(keyDisplay.value) : keyDisplay.value) + ((offset==0)?"":" ") + ")"
}

// footline
Expand Down

0 comments on commit 8a0d831

Please sign in to comment.