prime2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
prime2 [2023/11/24 00:24] – ounsatn | prime2 [2024/05/13 23:19] (current) – ounsatn | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | **This project is in progess, and not still finished** | ||
+ | |||
{{http:// | {{http:// | ||
Line 6: | Line 8: | ||
Prime use QML from QT to do assignments and map functions. | Prime use QML from QT to do assignments and map functions. | ||
You can write your own javascript / qml code to suit your needs. | You can write your own javascript / qml code to suit your needs. | ||
- | I'm not a QT expert, i'm still learning :p | ||
+ | Qml below allow to map these functions : | ||
+ | |||
+ | Back , Forward, load Right & Left , Rotary button are mapped like this : | ||
+ | (Load R/L is mapped below) | ||
+ | |||
+ | {{http:// | ||
- | Import section to get all the QT/QML prime objects | ||
< | < | ||
+ | |||
+ | ### Code Header with Air Imports ### | ||
+ | |||
import airAssignments 1.0 | import airAssignments 1.0 | ||
import ControlSurfaceModules 0.1 | import ControlSurfaceModules 0.1 | ||
Line 18: | Line 27: | ||
import Planck 1.0 | import Planck 1.0 | ||
import QtQuick 2.12 | import QtQuick 2.12 | ||
- | </ | ||
+ | ### Then assignment begin for global parameters ### | ||
- | Then Assignments begin | ||
- | < | ||
MidiAssignment { | MidiAssignment { | ||
objectName: | objectName: | ||
Line 56: | Line 63: | ||
ledType: LedType.Simple | ledType: LedType.Simple | ||
} | } | ||
+ | |||
View { | View { | ||
Line 95: | Line 103: | ||
</ | </ | ||
+ | |||
Then we create one repeater bloc for deck1 and further, another for deck2 | Then we create one repeater bloc for deck1 and further, another for deck2 | ||
Line 105: | Line 114: | ||
< | < | ||
+ | |||
+ | ### Repeater 1 for Deck Left ### | ||
Repeater { | Repeater { | ||
Line 205: | Line 216: | ||
Below some pics of these functions. | Below some pics of these functions. | ||
- | ** Cues | + | ** Cues ** |
+ | |||
{{http:// | {{http:// | ||
- | ** Loops | + | ** Loops ** |
{{http:// | {{http:// | ||
** Slicer | ** Slicer | ||
+ | |||
{{http:// | {{http:// | ||
{{http:// | {{http:// | ||
Line 274: | Line 289: | ||
< | < | ||
+ | ### Repeater 2 for Deck Right ### | ||
Repeater { | Repeater { | ||
Line 377: | Line 393: | ||
</ | </ | ||
- | Next I configure Filter Sweep button for the 2 decks like below, and parameters button used to change note repeat speed in slice mode. | ||
- | {{http:// | + | Code below allow to map functions on the pic below |
+ | {{http:// | ||
Line 421: | Line 438: | ||
- | readonly property QObjProperty padsView2: Planck.getProperty("/ | + | readonly property QObjProperty padsView2: Planck.getProperty("/ |
- | property string padsMode2: padsView2.translator.string | + | property string padsMode2: padsView2.translator.string |
- | readonly property bool padsModeIsAutoLoop2: | + | readonly property bool padsModeIsAutoLoop2: |
- | readonly property bool padsModeIsLoop2: | + | readonly property bool padsModeIsLoop2: |
- | readonly property bool padsModeIsLoopRoll2: | + | readonly property bool padsModeIsLoopRoll2: |
- | readonly property bool padsModeIsSlicerContinuous2: | + | readonly property bool padsModeIsSlicerContinuous2: |
- | readonly property bool padsModeIsSlicer2: | + | readonly property bool padsModeIsSlicer2: |
- | readonly property bool loopEnabled2: | + | readonly property bool loopEnabled2: |
- | readonly property bool loopEditable2: | + | readonly property bool loopEditable2: |
Line 475: | Line 492: | ||
</ | </ | ||
- | Then we will map FX section / Buttons. | + | Then we will map Parameters buttons, used when you are in slice or loop modes |
< | < | ||
+ | // | ||
+ | // | ||
+ | // | ||
+ | |||
+ | |||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: | ||
+ | note: 58 | ||
+ | channel: | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pHalveLoop1: | ||
+ | readonly property QObjProperty pShiftLoopLeft1: | ||
+ | readonly property QObjProperty pHalve1: Planck.getProperty("/ | ||
+ | function setValue(channel, | ||
+ | console.log(" | ||
+ | console.log(" | ||
+ | if(assignmentEnabled && value) { | ||
+ | if(padsModeIsSlicer1) { | ||
+ | pHalve1.translator.state = true | ||
+ | } | ||
+ | else if(loopEnabled1) { | ||
+ | if(device.shift) { | ||
+ | pShiftLoopLeft1.translator.state = true | ||
+ | } | ||
+ | else { | ||
+ | pHalveLoop1.translator.state = true | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: | ||
+ | note: 59 | ||
+ | channel: | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pDoubleLoop1: | ||
+ | readonly property QObjProperty pShiftLoopRight1: | ||
+ | readonly property QObjProperty pDouble1: Planck.getProperty("/ | ||
+ | function setValue(channel, | ||
+ | if(assignmentEnabled && value) { | ||
+ | if(padsModeIsSlicer1) { | ||
+ | pDouble1.translator.state = true | ||
+ | } | ||
+ | else if(loopEnabled) { | ||
+ | if(device.shift) { | ||
+ | pShiftLoopRight1.translator.state = true | ||
+ | } | ||
+ | else { | ||
+ | pDoubleLoop1.translator.state = true | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: | ||
+ | note: 62 | ||
+ | channel: | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pHalveLoop2: | ||
+ | readonly property QObjProperty pShiftLoopLeft2: | ||
+ | readonly property QObjProperty pHalve2: Planck.getProperty("/ | ||
+ | function setValue(channel, | ||
+ | // | ||
+ | // | ||
+ | // | ||
+ | if(assignmentEnabled && value) { | ||
+ | if(padsModeIsSlicer2) { | ||
+ | pHalve2.translator.state = true | ||
+ | } | ||
+ | else if(loopEnabled2) { | ||
+ | if(device.shift) { | ||
+ | pShiftLoopLeft2.translator.state = true | ||
+ | } | ||
+ | else { | ||
+ | pHalveLoop2.translator.state = true | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: | ||
+ | note: 63 | ||
+ | channel: | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pDoubleLoop2: | ||
+ | readonly property QObjProperty pShiftLoopRight2: | ||
+ | readonly property QObjProperty pDouble2: Planck.getProperty("/ | ||
- | + | function setValue(channel, | |
- | + | if(assignmentEnabled && value) { | |
- | /////////////////////////////////////////////////////////////////////////// | + | if(padsModeIsSlicer2) { |
- | // Effect Controls | + | pDouble2.translator.state = true |
- | | + | } |
- | model: ListModel | + | else if(loopEnabled2) |
- | ListElement | + | if(device.shift) |
- | deckName: | + | pShiftLoopRight2.translator.state = true |
- | deckMidiChannel: | + | } |
+ | else | ||
+ | pDoubleLoop2.translator.state = true | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
} | } | ||
- | + | ||
- | ListElement | + | |
- | deckName: "Right" | + | /* |
- | deckMidiChannel: | + | ValueCCAssignment |
+ | objectName: "Volume Deck%1".arg(deckName) | ||
+ | cc: 14 | ||
+ | normalizeValue: | ||
+ | channel: | ||
+ | output: ValueOutput { | ||
+ | useSoftTakeover: | ||
+ | target: | ||
+ | } | ||
} | } | ||
- | } | + | */ |
- | Item { | + | |
- | id: deckFx | + | objectName: |
- | + | note: | |
- | ValueNoteAssignment { | + | |
- | objectName: | + | |
- | note: | + | |
channel: | channel: | ||
- | enabled: | ||
output: ActionOutput { | output: ActionOutput { | ||
target: | target: | ||
- | path: "/ | + | path: "/ |
} | } | ||
} | } | ||
} | } | ||
- | + | ||
+ | ValueOutputAssignment { | ||
+ | objectName: " | ||
+ | enabled: | ||
+ | messageType: | ||
+ | midiIndex: | ||
+ | channel: | ||
+ | minimum: | ||
+ | path: "/ | ||
+ | } | ||
ValueNoteAssignment { | ValueNoteAssignment { | ||
- | objectName: | + | objectName: |
- | note: | + | note: |
channel: | channel: | ||
- | enabled: !device.shift | + | valueTransform: QtObject { |
+ | function transformValue(in_val) { | ||
+ | var leftVal = 0.0 | ||
+ | if (in_val === leftVal) { | ||
+ | return 1.0 | ||
+ | } | ||
+ | else { | ||
+ | return 0.0 | ||
+ | } | ||
+ | } | ||
+ | } | ||
output: ActionOutput { | output: ActionOutput { | ||
- | target: | + | behaviour: force.hold |
- | path: "/ | + | target: PropertyTarget { path: "/ |
+ | } | ||
+ | } | ||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: | ||
+ | note: 15 | ||
+ | channel: | ||
+ | valueTransform: | ||
+ | function transformValue(in_val) { | ||
+ | var rightVal = 0.0156 // A little bit less than 2/127 to make comparing easier | ||
+ | if (in_val >= rightVal) { | ||
+ | return 1.0 | ||
+ | } | ||
+ | else { | ||
+ | return 0.0 | ||
+ | } | ||
} | } | ||
+ | } | ||
+ | output: ActionOutput { | ||
+ | behaviour: | ||
+ | target: | ||
} | } | ||
} | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Repeater { | ||
+ | model: ListModel { | ||
+ | |||
+ | ListElement { | ||
+ | mixerChannelName: | ||
+ | mixerChannelMidiChannel: | ||
+ | } | ||
+ | } | ||
+ | |||
+ | Item { | ||
+ | objectName: | ||
+ | |||
+ | MixerChannelAssignmentConfig { | ||
+ | id: mixerChannelConfig | ||
+ | name: model.mixerChannelName | ||
+ | midiChannel: | ||
+ | } | ||
+ | |||
+ | MixerChannelCore { | ||
+ | pflNote: | ||
+ | trimCC: 117 | ||
+ | trebleCC: | ||
+ | midCC: 6 | ||
+ | bassCC: 30 | ||
+ | faderCC: | ||
+ | } | ||
+ | |||
+ | // | ||
+ | // cc: 23 | ||
+ | //} | ||
+ | |||
+ | SweepFxSelect { | ||
+ | channelNames: | ||
+ | buttonsModel: | ||
+ | ListElement { | ||
+ | note: 58 | ||
+ | fxIndex: | ||
+ | } | ||
+ | ListElement { | ||
+ | note: 590 | ||
+ | fxIndex: | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | /////////////////////////////////////////////////////////////////////////// | ||
+ | // Effect Controls | ||
+ | |||
+ | |||
+ | Repeater { | ||
+ | model: ListModel { | ||
+ | |||
+ | ListElement { | ||
+ | deckName: | ||
+ | deckMidiChannel: | ||
+ | } | ||
+ | |||
+ | ListElement { | ||
+ | deckName: " | ||
+ | deckMidiChannel: | ||
+ | } | ||
+ | |||
+ | } | ||
+ | Item { | ||
+ | id: deckFx | ||
- | ValueCCAssignment { | + | readonly property string activeDeckIndex: |
+ | |||
+ | Planck.getProperty("/ | ||
+ | onActiveDeckIndexChanged: | ||
+ | pGridEdit.translator.state = false | ||
+ | pShowCueEdit.translator.state = false | ||
+ | } | ||
+ | |||
+ | readonly property bool cueLEDState1: | ||
+ | |||
+ | readonly property bool cueLEDFlashing1: | ||
+ | |||
+ | readonly property QObjProperty pTempoSyncedFlashState1: | ||
+ | readonly property bool tempoSyncedFlashState1: | ||
+ | |||
+ | |||
+ | |||
+ | readonly property string syncMode1: Planck.getProperty("/ | ||
+ | |||
+ | readonly property string syncMode2: Planck.getProperty("/ | ||
+ | |||
+ | |||
+ | |||
+ | // Fx Activation Deck1 | ||
+ | ValueNoteAssignment { | ||
+ | objectName: | ||
+ | note: 93 | ||
+ | channel: deckMidiChannel | ||
+ | enabled: | ||
+ | output: ActionOutput { | ||
+ | target: | ||
+ | path: "/ | ||
+ | function setValue(deckMidiChannel) | ||
+ | { | ||
+ | console.log(" | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Fx Selection Deck1 | ||
+ | | ||
objectName: | objectName: | ||
cc: 17 | cc: 17 | ||
Line 551: | Line 838: | ||
} | } | ||
} | } | ||
- | + | ||
- | + | // Fx Selecting Deck1 | |
- | ValueCCAssignment { | + | ValueCCAssignment { |
objectName: | objectName: | ||
cc: 17 | cc: 17 | ||
channel: | channel: | ||
enabled: | enabled: | ||
- | output: ActionOutput { | + | |
- | behaviour: force.action | + | behaviour: force.action |
- | target: PropertyTarget { | + | target: PropertyTarget { |
- | path: "/ | + | path: "/ |
- | } | + | } |
+ | } | ||
+ | } | ||
+ | |||
+ | // FxAmount Deck1 | ||
+ | ValueCCAssignment { | ||
+ | objectName: | ||
+ | cc: 18 | ||
+ | channel: | ||
+ | enabled: Planck.getProperty("/ | ||
+ | |||
+ | output: JogOutput { | ||
+ | |||
+ | jogAcceleration: | ||
+ | jogSensitivity: | ||
+ | type: 0 | ||
+ | target: PropertyTarget { path: "/ | ||
+ | property bool debug: | ||
+ | |||
+ | // You can comment below, i let it as an example. Its documented in Engine binary. | ||
+ | // Open Engine Binary with 7zip, extract .rodata , open with np++ and search for " | ||
+ | |||
+ | function setValue(channel, | ||
+ | |||
+ | if(!assignmentEnabled) { | ||
+ | privateData.oldJogValue = -1.0 | ||
+ | return; | ||
+ | } | ||
+ | // | ||
+ | var t = target.get(channel, | ||
+ | |||
+ | // result[0]: bool indicating whether the value needs decreasing | ||
+ | // result[1]: float amount by which to decrease / increase | ||
+ | var result = [false, 0.0]; | ||
+ | switch(type) | ||
+ | { | ||
+ | case 0: | ||
+ | case 3: | ||
+ | calcValueTypeA(value, | ||
+ | break; | ||
+ | case 1: | ||
+ | calcValueTypeB(value, | ||
+ | break; | ||
+ | case 2: | ||
+ | calcValueTypeC(value, | ||
+ | break; | ||
+ | default: | ||
+ | console.warn(" | ||
+ | break; | ||
+ | } | ||
+ | |||
+ | if(!t || (t.editable !== undefined && !t.editable)) | ||
+ | return; | ||
+ | |||
+ | if(invert === result[0]) | ||
+ | { | ||
+ | t.incValue(result[1], | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | t.decValue(result[1], | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function calcValueTypeA(value, | ||
+ | |||
+ | var v = value * 127.0 | ||
+ | // | ||
+ | result[0] = v >= 64.0 | ||
+ | |||
+ | if(result[0]) { | ||
+ | v = 128 - v | ||
+ | } | ||
+ | |||
+ | // Now v is in [0...63] | ||
+ | v /= 63.0; | ||
+ | |||
+ | result[1] = jogSensitivity * v; | ||
+ | } | ||
+ | |||
+ | | ||
} | } | ||
+ | |||
+ | // FxMix Deck1 | ||
+ | ValueCCAssignment { | ||
+ | objectName: | ||
+ | cc: 19 | ||
+ | channel: | ||
+ | output: | ||
+ | jogAcceleration: | ||
+ | jogSensitivity: | ||
+ | type: | ||
+ | target: | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // Fx Rate Deck1 ( mapped to Inexistant CC) | ||
+ | ValueCCAssignment { | ||
+ | objectName: "FX%1 Rate" | ||
+ | cc: 1001 | ||
+ | channel: deckMidiChannel | ||
+ | enabled: Planck.getProperty("/ | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pTarget: Planck.getProperty("/ | ||
+ | function setValue(channel, | ||
+ | if(assignmentEnabled) { | ||
+ | var counterClock = value > 0.5 | ||
+ | var changeIndex = counterClock ? -1 : 1 | ||
+ | pTarget.translator.index = pTarget.translator.index + changeIndex | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | /////////////// | ||
+ | |||
+ | // Fx Activation Deck2 | ||
+ | ValueNoteAssignment { | ||
+ | objectName: | ||
+ | note: 05 | ||
+ | channel: | ||
+ | enabled: | ||
+ | output: ActionOutput { | ||
+ | target: PropertyTarget { | ||
+ | path: "/ | ||
+ | } | ||
+ | } | ||
} | } | ||
+ | // Fx Selection Deck2 | ||
ValueCCAssignment { | ValueCCAssignment { | ||
objectName: | objectName: | ||
cc: 20 | cc: 20 | ||
channel: | channel: | ||
- | |||
enabled: | enabled: | ||
- | output: QtObject { | + | |
- | readonly property QObjProperty pSelectionIndex: | + | readonly property QObjProperty pSelectionIndex: |
- | function setValue(channel, | + | function setValue(channel, |
- | if(assignmentEnabled) { | + | if(assignmentEnabled) { |
- | if(value > 0.5) { // turn counter clockwise, value normalized | + | if(value > 0.5) { // turn counter clockwise, value normalized |
- | pSelectionIndex.translator.unnormalized = pSelectionIndex.translator.unnormalized - 1 | + | pSelectionIndex.translator.unnormalized = pSelectionIndex.translator.unnormalized - 1 |
- | } | + | } |
- | else { | + | else { |
- | pSelectionIndex.translator.unnormalized = pSelectionIndex.translator.unnormalized + 1 | + | pSelectionIndex.translator.unnormalized = pSelectionIndex.translator.unnormalized + 1 |
- | } | + | } |
- | } | + | } |
- | } | + | } |
- | } | + | } |
} | } | ||
- | + | ||
- | + | // Fx Selecting Deck2 | |
ValueCCAssignment { | ValueCCAssignment { | ||
objectName: | objectName: | ||
Line 593: | Line 1006: | ||
channel: | channel: | ||
enabled: | enabled: | ||
- | output: ActionOutput { | + | |
- | behaviour: force.action | + | behaviour: force.action |
- | target: PropertyTarget { | + | target: PropertyTarget { |
- | path: "/ | + | path: "/ |
- | } | + | } |
} | } | ||
} | } | ||
- | + | // Fx Rate Deck2 ( mapped to Inexistant CC) | |
+ | ValueCCAssignment { | ||
+ | objectName: "FX%1 Rate" | ||
+ | cc: 1000 | ||
+ | channel: deckMidiChannel | ||
+ | enabled: Planck.getProperty("/ | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pTarget: Planck.getProperty("/ | ||
+ | function setValue(channel, | ||
+ | if(assignmentEnabled) { | ||
+ | var counterClock = value > 0.5 | ||
+ | var changeIndex = counterClock ? -1 : 1 | ||
+ | pTarget.translator.index = pTarget.translator.index + changeIndex | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
- | + | | |
- | + | ||
- | // ValueCCAssignment { | + | |
- | // | + | |
- | // cc: 100 | + | |
- | // | + | |
- | // | + | |
- | // | + | |
- | // | + | |
- | // | + | |
- | // | + | |
- | // | + | |
- | // | + | |
- | // | + | |
- | // } | + | |
- | // } | + | |
- | // } | + | |
- | // } | + | |
- | + | ||
- | ValueCCAssignment { | + | |
- | objectName: | + | |
- | cc: 18 | + | |
- | channel: | + | |
- | enabled: | + | |
- | output: EndlessKnobOutput { | + | |
- | smallestIncrement: | + | |
- | biggestIncrement: | + | |
- | target: | + | |
- | } | + | |
- | } | + | |
- | + | ||
ValueCCAssignment { | ValueCCAssignment { | ||
objectName: | objectName: | ||
Line 639: | Line 1038: | ||
channel: | channel: | ||
enabled: | enabled: | ||
- | output: EndlessKnobOutput { | + | |
- | smallestIncrement: | + | smallestIncrement: |
- | biggestIncrement: | + | biggestIncrement: |
- | target: PropertyTarget { path: "/ | + | target: PropertyTarget { path: "/ |
- | } | + | } |
} | } | ||
- | + | // FxMix Deck2 | |
ValueCCAssignment { | ValueCCAssignment { | ||
- | objectName: | + | objectName: |
- | cc: | + | cc: |
channel: | channel: | ||
- | output: ValueOutput { | + | |
- | target: PropertyTarget { | + | target: PropertyTarget { |
- | path: "/ | + | path: "/ |
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // In test | ||
+ | ValueNoteAssignment { | ||
+ | objectName: " | ||
+ | channel: 0 | ||
+ | note: 59 | ||
+ | output: ActionOutput { | ||
+ | behaviour: force.hold | ||
+ | target: PropertyTarget { path: "/ | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // SyncLed Deck1 | ||
+ | OutputAssignment { | ||
+ | objectName: | ||
+ | properties: | ||
+ | |||
+ | readonly property int ledValue: { | ||
+ | if(syncMode1 === " | ||
+ | globalSyncMode === " | ||
+ | } | ||
+ | else if(syncMode1 === " | ||
+ | 127 | ||
+ | } | ||
+ | else { | ||
+ | 1 | ||
} | } | ||
} | } | ||
+ | |||
+ | function send() { | ||
+ | // | ||
+ | device.sendColorSyncd1(ledValue," | ||
+ | // | ||
+ | } | ||
+ | |||
+ | Component.onCompleted: | ||
} | } | ||
+ | |||
+ | // SyncLed Deck2 | ||
+ | OutputAssignment { | ||
+ | objectName: | ||
+ | properties: | ||
+ | |||
+ | readonly property int ledValue: { | ||
+ | if(syncMode2 === " | ||
+ | globalSyncMode === " | ||
+ | } | ||
+ | else if(syncMode2 === " | ||
+ | 127 | ||
+ | } | ||
+ | else { | ||
+ | 1 | ||
+ | } | ||
+ | } | ||
+ | function send() { | ||
+ | // | ||
+ | device.sendColorSyncd2(ledValue," | ||
+ | // | ||
+ | } | ||
- | ValueCCAssignment | + | Component.onCompleted: |
- | objectName: | + | } |
- | cc: 22 | + | |
- | channel: deckMidiChannel | + | // Cue Led Deck1 |
- | output: ValueOutput | + | OutputAssignment |
- | target: PropertyTarget | + | objectName: |
- | path: "/ | + | properties: { ' |
+ | |||
+ | readonly property int ledValue: { | ||
+ | if(cueLEDState1) | ||
+ | 127 | ||
+ | } | ||
+ | else if(cueLEDFlashing1) { | ||
+ | tempoSyncedFlashState1 ? 127 : 0 | ||
+ | } | ||
+ | else { | ||
+ | 1 | ||
} | } | ||
} | } | ||
- | } | ||
- | |||
- | } | + | function send() { |
- | } | + | device.sendColorLedd1(ledValue," |
+ | } | ||
+ | |||
+ | Component.onCompleted: | ||
+ | } | ||
+ | //////////// | ||
+ | //////////// | ||
+ | //////////// | ||
+ | // RED PAD 1 | ||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selection" | ||
+ | note: 54 | ||
+ | channel: 9 | ||
+ | enabled: Planck.getProperty("/ | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pSelectionIndex: | ||
+ | function setValue(channel, | ||
+ | if(value > 0) { // turn counter clockwise, value normalized | ||
+ | pSelectionIndex.translator.unnormalized = 3 | ||
+ | // | ||
+ | // Send to device - look at device file | ||
+ | device.sendFxColorbutton(0) | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
- | /* | ||
- | FxAssignmentConfig { | ||
- | id: fxConfig | ||
- | midiChannel: | ||
- | channelNames: | ||
- | } | ||
- | DJFxSelect | + | ValueNoteAssignment |
- | pushNote: 53 | + | |
- | touchNote: 91 | + | note: 54 |
- | turnCC: 17 | + | |
- | } | + | |
+ | output: ActionOutput { | ||
+ | behaviour: force.action | ||
+ | target: PropertyTarget { | ||
+ | path: "/ | ||
+ | } | ||
+ | } | ||
+ | | ||
- | DJFxTime | + | // RED PAD 2 |
- | pushNote: 8 | + | ValueNoteAssignment |
- | turnCC: 18 | + | |
- | } | + | note: 55 |
+ | | ||
- | DJFxWetDry | + | enabled: Planck.getProperty("/ |
- | cc: 19 | + | output: QtObject |
- | } | + | |
+ | | ||
+ | function setValue(channel, | ||
- | DJFxActivate | + | if(value > 0) { // turn counter clockwise, value normalized |
- | fxActivateType: | + | |
- | activateControlsModel: ListModel { | + | // |
- | ListElement { | + | // |
- | midiChannel: 0 | + | |
- | note: 93 | + | } |
- | + | } | |
- | } | + | } |
- | ListElement { | + | } |
- | midiChannel: | + | |
- | note: 92 | + | |
- | } | + | |
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | } | + | |
- | + | ValueNoteAssignment { | |
+ | objectName: "FX%1 Selecting" | ||
+ | note: 55 | ||
+ | channel: 9 | ||
+ | enabled: !Planck.getProperty("/ | ||
+ | output: ActionOutput { | ||
+ | behaviour: force.action | ||
+ | target: PropertyTarget { | ||
+ | path: "/ | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // RED PAD 3 | ||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selection" | ||
+ | note: 56 | ||
+ | channel: 9 | ||
+ | enabled: Planck.getProperty("/ | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pSelectionIndex: | ||
+ | function setValue(channel, | ||
+ | if(value > 0) { // turn counter clockwise, value normalized | ||
+ | pSelectionIndex.translator.unnormalized = 6 | ||
+ | console.log(" | ||
+ | device.sendFxColorbutton(2) | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selecting" | ||
+ | note: 56 | ||
+ | channel: 9 | ||
+ | enabled: !Planck.getProperty("/ | ||
+ | output: ActionOutput { | ||
+ | behaviour: force.action | ||
+ | target: PropertyTarget { | ||
+ | path: "/ | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // RED PAD 4 | ||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selecting" | ||
+ | note: 57 | ||
+ | channel: 9 | ||
+ | enabled: !Planck.getProperty("/ | ||
+ | output: ActionOutput { | ||
+ | behaviour: force.action | ||
+ | target: PropertyTarget { | ||
+ | path: "/ | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selection" | ||
+ | note: 57 | ||
+ | channel: 9 | ||
+ | enabled: Planck.getProperty("/ | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pSelectionIndex: | ||
+ | function setValue(channel, | ||
+ | if(value > 0) { // turn counter clockwise, value normalized | ||
+ | pSelectionIndex.translator.unnormalized = 8 | ||
+ | console.log(" | ||
+ | device.sendFxColorbutton(3) | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | //////////// | ||
+ | |||
+ | |||
+ | //////////// | ||
+ | //////////// | ||
+ | //////////// | ||
+ | |||
+ | // GREEN PAD 1 | ||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selection" | ||
+ | note: 58 | ||
+ | channel: 9 | ||
+ | enabled: Planck.getProperty("/ | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pSelectionIndex: | ||
+ | function setValue(channel, | ||
+ | if(value > 0) { // turn counter clockwise, value normalized | ||
+ | pSelectionIndex.translator.unnormalized = 3 | ||
+ | // | ||
+ | // Send to device - look at device file | ||
+ | device.sendFxColorbuttonD2(4) | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selecting" | ||
+ | note: 58 | ||
+ | channel: 9 | ||
+ | enabled: !Planck.getProperty("/ | ||
+ | output: ActionOutput { | ||
+ | behaviour: force.action | ||
+ | target: PropertyTarget { | ||
+ | path: "/ | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // GREEN PAD 2 | ||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selection" | ||
+ | note: 59 | ||
+ | channel: 9 | ||
+ | |||
+ | enabled: Planck.getProperty("/ | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pSelectionIndex: | ||
+ | readonly property QObjProperty pFx1Active: Planck.getProperty("/ | ||
+ | function setValue(channel, | ||
+ | |||
+ | if(value > 0) { // turn counter clockwise, value normalized | ||
+ | pSelectionIndex.translator.unnormalized = 4 | ||
+ | // | ||
+ | // | ||
+ | device.sendFxColorbuttonD2(5) | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selecting" | ||
+ | note: 59 | ||
+ | channel: 9 | ||
+ | enabled: !Planck.getProperty("/ | ||
+ | output: ActionOutput { | ||
+ | behaviour: force.action | ||
+ | target: PropertyTarget { | ||
+ | path: "/ | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // GREEN PAD 3 | ||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selection" | ||
+ | note: 60 | ||
+ | channel: 9 | ||
+ | enabled: Planck.getProperty("/ | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pSelectionIndex: | ||
+ | function setValue(channel, | ||
+ | if(value > 0) { // turn counter clockwise, value normalized | ||
+ | pSelectionIndex.translator.unnormalized = 6 | ||
+ | console.log(" | ||
+ | device.sendFxColorbuttonD2(6) | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selecting" | ||
+ | note: 60 | ||
+ | channel: 9 | ||
+ | enabled: !Planck.getProperty("/ | ||
+ | output: ActionOutput { | ||
+ | behaviour: force.action | ||
+ | target: PropertyTarget { | ||
+ | path: "/ | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | // GREEN PAD 4 | ||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selection" | ||
+ | note: 61 | ||
+ | channel: 9 | ||
+ | enabled: Planck.getProperty("/ | ||
+ | output: QtObject { | ||
+ | readonly property QObjProperty pSelectionIndex: | ||
+ | function setValue(channel, | ||
+ | if(value > 0) { // turn counter clockwise, value normalized | ||
+ | pSelectionIndex.translator.unnormalized = 8 | ||
+ | console.log(" | ||
+ | device.sendFxColorbuttonD2(7) | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | ValueNoteAssignment { | ||
+ | objectName: "FX%1 Selecting" | ||
+ | note: 61 | ||
+ | channel: 9 | ||
+ | enabled: !Planck.getProperty("/ | ||
+ | output: ActionOutput { | ||
+ | behaviour: force.action | ||
+ | target: PropertyTarget { | ||
+ | path: "/ | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | //////////// | ||
+ | |||
+ | |||
+ | |||
+ | } //Closing Item | ||
+ | } // Closing Repeater | ||
+ | |||
+ | } // Closing assignment | ||
- | DJFxAssign { | ||
- | |||
- | notes: [94, 95] | ||
- | } | ||
- | |||
- | */ | ||
- | } | ||
</ | </ | ||
+ | |||
+ | |||
+ | Files for this project are available there : | ||
+ | |||
+ | [[http:// | ||
+ |
prime2.1700781848.txt.gz · Last modified: 2023/11/24 00:24 by ounsatn