fx knob wiring (qml coding)
Any ideas what's wrong with this:
Wire { from: "%surface_prefix%.fx.knobs.1" to: EncoderScriptAdapter { onTurn: { ... } } }
Am I using the right knob names/events?
Comments
-
EncoderScriptAdapter only knows onTick, onIncrement and onDecrement.
onTurn is used by KnobScriptAdapter.
0 -
EncoderScriptAdapter onIncrement doesn't seem to get called on s4mk3.left.fx.knobs.X
Using KnobScriptAdapter onTurn won't allow Traktor to start
0 -
Hmm.
Here is some code that works:
Wire { from: "%surface%.knobs.1"; to: KnobScriptAdapter { onTurn: { lastActiveKnobProp.value = 1 } } }
…
Wire { from: "%surface%.knobs.1"; to: EncoderScriptAdapter { onTick: { if (value < -minimalTickValue1 || value > minimalTickValue1) mixerFXAdjust3.value = mixerFXAdjust3.value + (value * rotationScaleFactor1); } } }
…
Wire { from: "%surface%.browse"; to: EncoderScriptAdapter { onIncrement: clockBpm.value = clockBpm.value + stepBpm.value; onDecrement: clockBpm.value = clockBpm.value - stepBpm.value } enabled: !shift }
What value do you want to control with the knob?
0 -
ButtonScriptAdapter doesn't seem to work at all for me (Traktor won't start). Is that Traktor4 specific?
Neither onTick or onIncrement work with EncoderScriptAdapter on s4mk3.left.fx.knobs.1 or s4mk3.left.knobs.1
No matter what value I try to control, the event handler is not triggered.
EncoderScriptAdapter.onIncrement works for me for %surface%.browse.encoder.turn tho.
0 -
Post your code. :)
0 -
property real b: 0;
Wire { enabled: true; from: "s4mk3.left.browse.preview"; to: ButtonScriptAdapter { brightness: b } }
Wire { enabled: true; from: "s4mk3.left.fx.knobs.1"; to: EncoderScriptAdapter { onIncrement: { b = 1 } onDecrement: { b = 0 } } }
Dunno how to format code…
0 -
Encoders are endless knobs, so I doubt EncoderScriptAdapter works with plain knobs like the FX knobs. Have you tried the KnobScriptAdapter example posted earlier?
0 -
You're right, I tried this with channel fx.amount without success.
KnobScriptAdapter works :)
0 -
Traktor won't start if I add: Wire { enabled: true from: "s4mk3.left.fx.knobs.1"; to: KnobScriptAdapter { onTurn: { b = 1 } } }
I tried different values for "from"…
0 -
property int brightnessVar: 0 Wire { from: "s4mk3.left.fx.knobs.1"; to: KnobScriptAdapter { onTurn: { if (value > .50) brightnessVar = 0.0 else brightnessVar = 1.0 } } } Wire { from: "s4mk3.left.browse.preview"; to: ButtonScriptAdapter { brightness: brightnessVar; } }
I created an example for you :)
0 -
Traktor won't start if I add that code. Have you tried it with Traktor 3?
0 -
What happens if you define b as int instead of real? You are only using int values in your example.
Why are you assigning real values (0.0, 1.0) to an int? ^^
1 -
did you add "import QtQuick 2.0" in your qml file?
If not, it might not work for you.@Sûlherokhh You're right, but there shouldn't be any errors
1 -
Changing b to real doesn't seem to make a difference. As soon as I add KnobScriptAdapter to my qml file, Traktor fails to load.
0 -
KnobScriptAdapter may indeed be new to Traktor 4. Only X1Mk3 and Z1Mk2 use it.
How about this?
MappingPropertyDescriptor { id: CounterProp; path: "mapping.state.left.counter"; type: MappingPropertyDescriptor.Float; value: 0.0; min: 0.0 max: 1.0 } Wire { from: "s4mk3.left.fx.knobs.1"; to: DirectPropertyAdapter{ path: CounterProp.path } }
1
Categories
- All Categories
- 19 Welcome
- 1.4K Hangout
- 60 NI News
- 732 Tech Talks
- 3.9K Native Access
- 15.8K Komplete
- 1.9K Komplete General
- 4.1K Komplete Kontrol
- 5.5K Kontakt
- 1.5K Reaktor
- 364 Battery 4
- 814 Guitar Rig & FX
- 416 Massive X & Synths
- 1.2K Other Software & Hardware
- 5.5K Maschine
- 6.9K Traktor
- 6.9K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators