Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixer FX Selector [S8 and S5] #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 45 additions & 2 deletions CSI/S5/Channel.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import CSI 1.0
import QtQuick 2.0
import "../../Screens/Defines"

Module
{
Expand Down Expand Up @@ -30,19 +32,60 @@ Module
// fx Assign

AppProperty { id: fxMode; path: "app.traktor.fx.4fx_units" }
AppProperty { id: mixerFXOn; path: app_prefix + "fx.on" }
AppProperty { id: mixerFX; path: app_prefix + "fx.select" }

WiresGroup
{
enabled: !channel.shift || (fxMode.value == FxMode.TwoFxUnits)
enabled: (!channel.shift || (fxMode.value == FxMode.TwoFxUnits)) && !prefs.mixerFXSelector && !prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.1"; } }
Wire { from: surface_prefix + "fx.assign.2"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.2"; } }
}

WiresGroup
{
enabled: channel.shift && (fxMode.value == FxMode.FourFxUnits)
enabled: (!channel.shift) && prefs.mixerFXSelector && !prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.1"; } }
Wire { from: surface_prefix + "fx.assign.2"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.2"; } }
}

WiresGroup
{
enabled: (!channel.shift) && prefs.mixerFXSelector && prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: ButtonScriptAdapter { onRelease: { mixerFX.value = (mixerFX.value + 4) % 5; } } }
Wire { from: surface_prefix + "fx.assign.2"; to: ButtonScriptAdapter { onRelease: { mixerFX.value = (mixerFX.value + 1) % 5; } } }
}

WiresGroup
{
enabled: (channel.shift && (fxMode.value == FxMode.FourFxUnits)) && !prefs.mixerFXSelector && !prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.3"; } }
Wire { from: surface_prefix + "fx.assign.2"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.4"; } }
}

WiresGroup
{
enabled: (channel.shift && (!mixerFXOn.value && fxMode.value == FxMode.FourFxUnits)) && prefs.mixerFXSelector && !prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.3"; } }
Wire { from: surface_prefix + "fx.assign.2"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.4"; } }
}

WiresGroup
{
enabled: (channel.shift && (mixerFXOn.value || fxMode.value == FxMode.TwoFxUnits)) && prefs.mixerFXSelector && !prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: ButtonScriptAdapter { onRelease: { mixerFX.value = (mixerFX.value + 4) % 5; } } }
Wire { from: surface_prefix + "fx.assign.2"; to: ButtonScriptAdapter { onRelease: { mixerFX.value = (mixerFX.value + 1) % 5; } } }
}

WiresGroup
{
enabled: (channel.shift) && prefs.mixerFXSelector && prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.1"; } }
Wire { from: surface_prefix + "fx.assign.2"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.2"; } }
}

Prefs{
id:prefs
}

}
47 changes: 45 additions & 2 deletions CSI/S8/Channel.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import CSI 1.0
import QtQuick 2.0
import "../../Screens/Defines"

Module
{
Expand Down Expand Up @@ -35,19 +37,60 @@ Module
// fx Assign

AppProperty { id: fxMode; path: "app.traktor.fx.4fx_units" }
AppProperty { id: mixerFXOn; path: app_prefix + "fx.on" }
AppProperty { id: mixerFX; path: app_prefix + "fx.select" }

WiresGroup
{
enabled: (!channel.shift || (fxMode.value == FxMode.TwoFxUnits)) && !prefs.mixerFXSelector && !prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.1"; } }
Wire { from: surface_prefix + "fx.assign.2"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.2"; } }
}

WiresGroup
{
enabled: !channel.shift || (fxMode.value == FxMode.TwoFxUnits)
enabled: (!channel.shift) && prefs.mixerFXSelector && !prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.1"; } }
Wire { from: surface_prefix + "fx.assign.2"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.2"; } }
}

WiresGroup
{
enabled: channel.shift && (fxMode.value == FxMode.FourFxUnits)
enabled: (!channel.shift) && prefs.mixerFXSelector && prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: ButtonScriptAdapter { onRelease: { mixerFX.value = (mixerFX.value + 4) % 5; } } }
Wire { from: surface_prefix + "fx.assign.2"; to: ButtonScriptAdapter { onRelease: { mixerFX.value = (mixerFX.value + 1) % 5; } } }
}

WiresGroup
{
enabled: (channel.shift && (fxMode.value == FxMode.FourFxUnits)) && !prefs.mixerFXSelector && !prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.3"; } }
Wire { from: surface_prefix + "fx.assign.2"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.4"; } }
}

WiresGroup
{
enabled: (channel.shift && (!mixerFXOn.value && fxMode.value == FxMode.FourFxUnits)) && prefs.mixerFXSelector && !prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.3"; } }
Wire { from: surface_prefix + "fx.assign.2"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.4"; } }
}

WiresGroup
{
enabled: (channel.shift && (mixerFXOn.value || fxMode.value == FxMode.TwoFxUnits)) && prefs.mixerFXSelector && !prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: ButtonScriptAdapter { onRelease: { mixerFX.value = (mixerFX.value + 4) % 5; } } }
Wire { from: surface_prefix + "fx.assign.2"; to: ButtonScriptAdapter { onRelease: { mixerFX.value = (mixerFX.value + 1) % 5; } } }
}

WiresGroup
{
enabled: (channel.shift) && prefs.mixerFXSelector && prefs.prioritizeFXSelection
Wire { from: surface_prefix + "fx.assign.1"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.1"; } }
Wire { from: surface_prefix + "fx.assign.2"; to: TogglePropertyAdapter { path: app_prefix + "fx.assign.2"; } }
}

Prefs{
id:prefs
}

}
4 changes: 4 additions & 0 deletions Screens/Defines/Prefs.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import QtQuick 2.0

QtObject {

// controller preferences
readonly property bool mixerFXSelector: false
readonly property bool prioritizeFXSelection: true

// global preferences
readonly property bool camelotKey: true
readonly property int phraseLength: 4
Expand Down