Midi endless knobs
Title
Midi endless knobs
What do you expect to happen when you run the script/macro?
I have a Behringer x touch mini, I want mi first rotary encoder to control the selected clip gain up and down when it turns left or right.
The macro gets the clip gain up regardless the way the knob is turning.
I know my controller output is CC 65 for Left Turning and 1 for Right Turning.
Are you seeing an error?
What happens when you run this script?
When I turn my knob to either side, the macro keeps being triggered.
How were you running this script?
Other
How important is this issue to you?
5
Details
{ "inputExpected": "I have a Behringer x touch mini, I want mi first rotary encoder to control the selected clip gain up and down when it turns left or right. \n\nThe macro gets the clip gain up regardless the way the knob is turning. \n\nI know my controller output is CC 65 for Left Turning and 1 for Right Turning.", "inputIsError": false, "inputWhatHappens": "When I turn my knob to either side, the macro keeps being triggered. ", "inputHowRun": { "key": "-MpfwoFyZNOpBC3X5xGI", "title": "Other" }, "inputImportance": 5, "inputTitle": "Midi endless knobs" }
Source
//Macro converted to script
sf.keyboard.press({
keys: "ctrl+shift+up",
});
Links
User UID: YvOAPcWhKdMlubnZzLLMpdvwhM23
Feedback Key: sffeedback:YvOAPcWhKdMlubnZzLLMpdvwhM23:-Nw_11iksqNb1tGJ1hIj
Feedback ZIP: IDN6uC0t3wyekpg9XLp/0bnDqYQuRcCfEIZWTQI02qw9UHftVX9+fcFDJGfzzA7YLj1xK90qnPCCz/GqMg9o046DF6v5u9E3oa3hkg5snoWNCKkEVaZCcc846iftdyBTiYyWEYiz1yEkK1ztFRBVh6P4D61yQW21cv5PdJ1rCgFkUafgL0z6tHztGCrHiDS7l/ebEvWKkBwhCyltMAh7GTkhPlbdhhiTjo0eWNN1wxR9ewHepBZBfuFiXp3sEAEwt5ds4fJpbikaw+cQxUpWGw1VGgg6Vl7BCN9LcmU5XvIwEMKuQ4iqJscbW7YXbiUUWqrEaKMNP00/KnFznFaPxVBtThTU635on8T6wgdB/U4=
- Chris Shaw @Chris_Shaw2024-05-01 16:47:34.297Z
You need to be reading the value of the CC in order to change the nudge direction.
Right now, the script presses"ctrl+shift+up"
whenever it receives any value.
This script reads the value of the CC and uses the value (less or greater than 64) to determine the nudge directions. If the clip gain is being nudged in the wrong direction read the comments to reverse it:const midiByte = event.trigger.midiBytes; const ccValue = midiByte[2] // Change ">" to "<" below to reverse nudge direction const nudgeDirection = ccValue < 64 ? "up" : "down" sf.keyboard.press({ keys: `ctrl+shift+${nudgeDirection}`, fast: true });
- JIn reply toJuan_Santillan⬆:Juan Santillan @Juan_Santillan
That didi it! Thank you very much