Skip to content

Commit

Permalink
Traktor Pro 3.3 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
kokernutz committed Apr 1, 2020
1 parent 05e222a commit b6d94e5
Show file tree
Hide file tree
Showing 161 changed files with 3,961 additions and 2,711 deletions.
44 changes: 22 additions & 22 deletions CSI/S4MK3/S4MK3ChannelFX.qml → CSI/Common/ChannelFX/ChannelFX.qml
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
import CSI 1.0
import "../../Defines"
import "../../../Defines"

Module
{
id: module
property int index: 1
property alias selectedFx: fxSelect
property int channelFxSelectorVal: -1
property string surface: ""

signal fxChanged()

// helpers
readonly property string surface_prefix: "s4mk3.mixer.channels." + module.index + "."
readonly property string surface_prefix: surface + ".mixer.channels." + module.index + "."
readonly property string app_prefix: "app.traktor.mixer.channels." + module.index + "."

AppProperty { id: fxSelect; path: app_prefix + "fx.select"; }
AppProperty { id: fxOn; path: app_prefix + "fx.on" }

readonly property variant currentColor: colorScheme[fxSelect.value]

// Channel FX Knob + Enable
Wire { from: surface_prefix + "channel_fx.amount"; to: DirectPropertyAdapter { path: app_prefix + "fx.adjust" } }

Wire
{
enabled: module.channelFxSelectorVal == -1;
from: surface_prefix + "channel_fx.on";
to: TogglePropertyAdapter
{
path: app_prefix + "fx.on";
color: module.currentColor;
}
Wire
{
enabled: module.channelFxSelectorVal == -1;
from: surface_prefix + "channel_fx.on";
to: TogglePropertyAdapter
{
path: app_prefix + "fx.on";
color: module.currentColor;
}
}
Wire
{
enabled: module.channelFxSelectorVal != -1;
from: surface_prefix + "channel_fx.on";

Wire
{
enabled: module.channelFxSelectorVal != -1;
from: surface_prefix + "channel_fx.on";
to: ButtonScriptAdapter
{
onPress :
{
module.selectedFx.value = module.channelFxSelectorVal;
fxChanged();
}
color: module.currentColor;
color: module.currentColor;
brightness: fxOn.value ? 1.0 : 0.5
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Module
id: module
property bool cancelMultiSelection: false
property int currentlySelectedFx: -1
property string surface: ""

readonly property string surfacePrefix: surface + ".mixer.channel_fx"

// Mixer Effects Color Scheme
readonly property variant colorScheme: [
Expand All @@ -15,38 +18,42 @@ Module
Color.Yellow // FX4
]

// Channel Fx
S4MK3ChannelFX
// Channel Fx
ChannelFX
{
id: channel1
name: "channel1"
surface: module.surface
index: 1
onFxChanged : { module.cancelMultiSelection = true; }
channelFxSelectorVal: module.currentlySelectedFx
}

S4MK3ChannelFX
ChannelFX
{
id: channel2
name: "channel2"
surface: module.surface
index: 2
onFxChanged : { module.cancelMultiSelection = true; }
channelFxSelectorVal: module.currentlySelectedFx
}

S4MK3ChannelFX
ChannelFX
{
id: channel3
name: "channel3"
surface: module.surface
index: 3
onFxChanged : { module.cancelMultiSelection = true; }
channelFxSelectorVal: module.currentlySelectedFx
}

S4MK3ChannelFX
ChannelFX
{
id: channel4
name: "channel4"
surface: module.surface
index: 4
onFxChanged : { module.cancelMultiSelection = true; }
channelFxSelectorVal: module.currentlySelectedFx
Expand All @@ -59,7 +66,7 @@ Module
channel1.selectedFx.value = fxSelection;
channel2.selectedFx.value = fxSelection;
channel3.selectedFx.value = fxSelection;
channel4.selectedFx.value = fxSelection;
channel4.selectedFx.value = fxSelection;
}
if (module.currentlySelectedFx == fxSelection)
module.currentlySelectedFx = -1;
Expand All @@ -70,7 +77,7 @@ Module
module.cancelMultiSelection = (module.currentlySelectedFx != -1);
module.currentlySelectedFx = fxSelection;
}

function isFxUsed(index)
{
return channel1.selectedFx.value == index ||
Expand All @@ -84,9 +91,9 @@ Module
return on ? 1.0 : 0.0;
}

Wire
{
from: "s4mk3.mixer.channel_fx.filter";
Wire
{
from: surfacePrefix + ".filter";
to: ButtonScriptAdapter
{
onPress :
Expand All @@ -97,13 +104,13 @@ Module
{
onFxSelectReleased(0);
}
color: module.colorScheme[0]
color: module.colorScheme[0]
brightness: ledBrightness(isFxUsed(0))
}
}
Wire
{
from: "s4mk3.mixer.channel_fx.fx1";
Wire
{
from: surfacePrefix + ".fx1";
to: ButtonScriptAdapter
{
onPress :
Expand All @@ -114,13 +121,13 @@ Module
{
onFxSelectReleased(1);
}
color: module.colorScheme[1]
color: module.colorScheme[1]
brightness: ledBrightness(isFxUsed(1))
}
}
Wire
{
from: "s4mk3.mixer.channel_fx.fx2";
Wire
{
from: surfacePrefix + ".fx2";
to: ButtonScriptAdapter
{
onPress :
Expand All @@ -131,13 +138,13 @@ Module
{
onFxSelectReleased(2);
}
color: module.colorScheme[2]
brightness: ledBrightness(isFxUsed(2))
color: module.colorScheme[2]
brightness: ledBrightness(isFxUsed(2))
}
}
Wire
{
from: "s4mk3.mixer.channel_fx.fx3";
Wire
{
from: surfacePrefix + ".fx3";
to: ButtonScriptAdapter
{
onPress :
Expand All @@ -148,13 +155,13 @@ Module
{
onFxSelectReleased(3);
}
color: module.colorScheme[3]
brightness: ledBrightness(isFxUsed(3))
color: module.colorScheme[3]
brightness: ledBrightness(isFxUsed(3))
}
}
Wire
{
from: "s4mk3.mixer.channel_fx.fx4";
Wire
{
from: surfacePrefix + ".fx4";
to: ButtonScriptAdapter
{
onPress :
Expand All @@ -165,8 +172,8 @@ Module
{
onFxSelectReleased(4);
}
color: module.colorScheme[4]
color: module.colorScheme[4]
brightness: ledBrightness(isFxUsed(4))
}
}
}
}
4 changes: 2 additions & 2 deletions CSI/S4MK3/S4MK3Functions.js → CSI/Common/DeckHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function colorForDeck(deckIdx)
return Color.Black;
}

// primary decks defualt to track, secondary decks default to remix
// primary decks defualt to track, secondary decks default to remix
function defaultTypeForDeck(deckIdx)
{
return (deckIdx > 2) ? DeckType.Remix : DeckType.Track
Expand All @@ -41,4 +41,4 @@ function linkedDeckIdx(deckIdx)
case 1: return 3;
case 3: return 1;
}
}
}
14 changes: 7 additions & 7 deletions CSI/Common/Deck_S8Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ Module
TransportSection { name: "transport"; channel: 1 }
Scratch { name: "scratch"; channel: 1; ledBarSize: touchstripLedBarSize }
TempoBend { name: "tempo_bend"; channel: 1; ledBarSize: touchstripLedBarSize }
TrackSeek { name: "track_seek"; channel: 1; ledBarSize: touchstripLedBarSize }
TouchstripTrackSeek { name: "track_seek"; channel: 1; ledBarSize: touchstripLedBarSize }

Loop { name: "loop"; channel: 1; numberOfLeds: 4; color: Color.Blue }

Expand All @@ -1322,7 +1322,7 @@ Module
TransportSection { name: "transport"; channel: 2 }
Scratch { name: "scratch"; channel: 2; ledBarSize: touchstripLedBarSize }
TempoBend { name: "tempo_bend"; channel: 2; ledBarSize: touchstripLedBarSize }
TrackSeek { name: "track_seek"; channel: 2; ledBarSize: touchstripLedBarSize }
TouchstripTrackSeek { name: "track_seek"; channel: 2; ledBarSize: touchstripLedBarSize }

Loop { name: "loop"; channel: 2; numberOfLeds: 4; color: Color.Blue }

Expand All @@ -1349,7 +1349,7 @@ Module
TransportSection { name: "transport"; channel: 3 }
Scratch { name: "scratch"; channel: 3; ledBarSize: touchstripLedBarSize }
TempoBend { name: "tempo_bend"; channel: 3; ledBarSize: touchstripLedBarSize }
TrackSeek { name: "track_seek"; channel: 3; ledBarSize: touchstripLedBarSize }
TouchstripTrackSeek { name: "track_seek"; channel: 3; ledBarSize: touchstripLedBarSize }

Loop { name: "loop"; channel: 3; numberOfLeds: 4; color: Color.White }

Expand All @@ -1376,7 +1376,7 @@ Module
TransportSection { name: "transport"; channel: 4 }
Scratch { name: "scratch"; channel: 4; ledBarSize: touchstripLedBarSize }
TempoBend { name: "tempo_bend"; channel: 4; ledBarSize: touchstripLedBarSize }
TrackSeek { name: "track_seek"; channel: 4; ledBarSize: touchstripLedBarSize }
TouchstripTrackSeek { name: "track_seek"; channel: 4; ledBarSize: touchstripLedBarSize }

Loop { name: "loop"; channel: 4; numberOfLeds: 4; color: Color.White }

Expand Down Expand Up @@ -4152,7 +4152,7 @@ Module

enabled: (focusedDeckId == 2) && (hasTransport(deckBType))

Wire { from: "%surface%.flux"; to: "decks.2.transport.flux" ; enabled: !module.shift}
Wire { from: "%surface%.flux"; to: "decks.2.transport.flux" ; enabled: !module.shift}
Wire { from: "%surface%.flux"; to: "decks.2.transport.flux_reverse" ; enabled: module.shift}

WiresGroup
Expand Down Expand Up @@ -4211,7 +4211,7 @@ Module

enabled: (focusedDeckId == 3) && (hasTransport(deckCType))

Wire { from: "%surface%.flux"; to: "decks.3.transport.flux" ; enabled: !module.shift}
Wire { from: "%surface%.flux"; to: "decks.3.transport.flux" ; enabled: !module.shift}
Wire { from: "%surface%.flux"; to: "decks.3.transport.flux_reverse" ; enabled: module.shift}

WiresGroup
Expand Down Expand Up @@ -4270,7 +4270,7 @@ Module

enabled: (focusedDeckId == 4) && (hasTransport(deckDType))

Wire { from: "%surface%.flux"; to: "decks.4.transport.flux" ; enabled: !module.shift}
Wire { from: "%surface%.flux"; to: "decks.4.transport.flux" ; enabled: !module.shift}
Wire { from: "%surface%.flux"; to: "decks.4.transport.flux_reverse" ; enabled: module.shift}

WiresGroup
Expand Down
Loading

0 comments on commit b6d94e5

Please sign in to comment.