Skip to content

Commit c862e80

Browse files
committed
Merge branch 'beta'
2 parents b7579ad + 38175e2 commit c862e80

File tree

2 files changed

+52
-21
lines changed

2 files changed

+52
-21
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Implementation of the deep integration mode found on Native Instruments' Komplet
44

55
This script aims to support all the features of this mode, offering the same features found on supported DAWs like Ableton Live or Logic Pro X.
66

7-
For installation know-how and info on how to use the script, go to the wiki of the repository.
7+
For installation know-how and info on how to use the script, go to the [wiki](https://github.com/hobyst/flmidi-kompletekontrol/wiki) of the repository.
88

99
## Main features
1010

@@ -36,25 +36,21 @@ As of today, this script hasn't been tested on Maschine devices. However, some m
3636

3737
- [ ] Maschine MK1
3838

39-
- [ ] Maschine Mikro MK3 (supposed to work as A-Series, not tested)
39+
- [ ] ~~Maschine Mikro MK3~~ (doesn't have DAW integration mode)
4040

4141
- [ ] Maschine Mikro MK2
4242

4343
- [ ] Maschine Mikro MK1
4444

4545
## Known issues
4646

47-
- **4D Encoder's built-in D-pad axis might be inverted:** A-Series and S-Series have their encoder axis inverted and by default, the script maps encoder events as if you were using a S-Series device. Since there's no way to get the name of the MIDI device the script is running on, you have to specify this by yourself going to the script folder and inside the `device_Komplete Kontrol.py` file, set `DEVICE_SERIES` to the kind of the device you are using. If you have more than one NI device and don't want to make multiple files for that, you can set it on runtime by going to View > Script output, selecting the name of the MIDI device that isn't acting as expected and run the following line:
48-
49-
```python
50-
DEVICE_SERIES = "<series of your device>"
51-
```
47+
- [**Performance issues on FL Studio 20.7.2 and up (Windows):**](https://github.com/hobyst/flmidi-kompletekontrol/issues/8) On FL Studio 20.7.2 and upwards, a bug was discovered that makes the script not to work sometimes and causes a performance drawback due to the constant error printing on the Script output. The only workaround for this is to reload the script if you notice any kind of performance issue. Go to `View > Script output > "the tab with the DAW device name on it"` and click on the `Reload script` button until the cascade stops and no errors seem to happen.
5248

53-
- **Automatic Komplete Kontrol instance switching:** It is already implemented in the compatibility layer, but the info that is needed from FL Studio to do so can't be gotten with the current API scope. Waiting for Image-Line to add plugin parameter read/write capabilities to the API for this.
49+
- [**Automatic Komplete Kontrol instance switching:**](https://github.com/hobyst/flmidi-kompletekontrol/issues/3) It is already implemented in the compatibility layer, but the info that is needed from FL Studio to do so can't be gotten with the current API scope. Waiting for Image-Line to add plugin parameter read/write capabilities to the API for this.
5450

55-
- **Manual Komplete Kontrol instance switching:** In S-Series devices, DAW integration seems to disable the option to switch instances manually using the keyboard, relying on the host DAW to tell the device which instance to control. Due to the automatic instance switching not being compatible with FL Studio at the moment, it might be that the only way to change instances for S-Series users once the DAW integration has ben initiated is to do it manually with a mouse.
51+
- [**Manual Komplete Kontrol instance switching:**](https://github.com/hobyst/flmidi-kompletekontrol/issues/4) In S-Series devices, DAW integration seems to disable the option to switch instances manually using the keyboard, relying on the host DAW to tell the device which instance to control. Due to the automatic instance switching not being compatible with FL Studio at the moment, it might be that the only way to change instances for S-Series users once the DAW integration has ben initiated is to do it manually with a mouse.
5652

57-
- **QUANTIZE and AUTO buttons don't work as expected:** Quantize and toggling automation recording on/off isn't supported yet on the actual MIDI API scope. There's a workaround to get to the quantize buttons by getting into the menus and emulating key pressings but it's slow and buggy. Instead, they switch between windows (browser isn't included on this) and trigger full-screen plugin browser respectively.
53+
- [**QUANTIZE and AUTO buttons don't work as expected:**](https://github.com/hobyst/flmidi-kompletekontrol/issues/5) Quantize and toggling automation recording on/off isn't supported yet on the actual MIDI API scope. There's a workaround to get to the quantize buttons by getting into the menus and emulating key pressings but it's slow and buggy. Instead, they switch between windows (browser isn't included on this) and trigger full-screen plugin browser respectively.
5854

5955
## Special thanks
6056

device_Komplete Kontrol.py

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
print("macOS detected. Imported _dummy_thread module.")
3535
import lib._dummy_thread as _thread
3636

37+
3738
######################################################################################################################
3839
# User-editable constants for script customization
3940
# Edit this ones to make the script act as you wish
@@ -84,15 +85,14 @@ def updateMixerTracks(dataType: str, selectedTrack: int):
8485
# If the selected track belongs to the 16th group, it will declare the last two tracks as non existant
8586
# Otherwise, it will declare all as existant
8687
if trackGroup == 15:
87-
for x in range(trackFirst, trackFirst + 8):
88-
nihia.mixerSendInfo("EXIST", 0, value=1)
89-
nihia.mixerSendInfo("EXIST", 1, value=1)
90-
nihia.mixerSendInfo("EXIST", 2, value=1)
91-
nihia.mixerSendInfo("EXIST", 3, value=1)
92-
nihia.mixerSendInfo("EXIST", 4, value=1)
93-
nihia.mixerSendInfo("EXIST", 5, value=1)
94-
nihia.mixerSendInfo("EXIST", 6, value=0)
95-
nihia.mixerSendInfo("EXIST", 7, value=0)
88+
nihia.mixerSendInfo("EXIST", 0, value=1)
89+
nihia.mixerSendInfo("EXIST", 1, value=1)
90+
nihia.mixerSendInfo("EXIST", 2, value=1)
91+
nihia.mixerSendInfo("EXIST", 3, value=1)
92+
nihia.mixerSendInfo("EXIST", 4, value=1)
93+
nihia.mixerSendInfo("EXIST", 5, value=1)
94+
nihia.mixerSendInfo("EXIST", 6, value=0)
95+
nihia.mixerSendInfo("EXIST", 7, value=0)
9696

9797
else:
9898
for x in range(trackFirst, trackFirst + 8):
@@ -158,8 +158,8 @@ def updateMixerTracks(dataType: str, selectedTrack: int):
158158

159159
# Checks the track group once more to clean up the last two tracks
160160
if trackGroup == 15:
161-
162161
if dataType == "NAME":
162+
nihia.mixerSendInfo("NAME", 6, info="")
163163
nihia.mixerSendInfo("NAME", 7, info="")
164164

165165
# Track 7 --> Current
@@ -324,6 +324,39 @@ def updatePeak(selectedTrack: int):
324324
nihia.mixerSendInfo("PEAK", 0, peakValues = peakList)
325325

326326

327+
def detectDevice():
328+
""" Gets the MIDI device name from FL Studio and sets `DEVICE_SERIES` to the right value in order for the script to work properly. """
329+
330+
# Imports DEVICE_SERIES from the global scope
331+
global DEVICE_SERIES
332+
333+
# Retrieves the device name from FL Studio
334+
deviceName = device.getName()
335+
336+
# Saves the 22th character of the device name for the S-Series check to isolate the extraction and avoid errors stopping the execution of the script
337+
char21 = None
338+
try:
339+
char21 = deviceName[21]
340+
except:
341+
char21 = None
342+
343+
# Sets DEVICE_NAME depending on the retrieved name
344+
if deviceName == "Komplete Kontrol A DAW":
345+
DEVICE_SERIES = "A_SERIES"
346+
print("Detected device: Komplete Kontrol A-Series")
347+
348+
elif deviceName == "Komplete Kontrol M DAW":
349+
DEVICE_SERIES = "M_SERIES"
350+
print("Detected device: Komplete Kontrol M-Series")
351+
352+
elif char21 == "-": # Gets the 18th char on the name to see if it matches the "Komplete Kontrol DAW - X" naming scheme S-Series devices follow
353+
DEVICE_SERIES = "S_SERIES"
354+
print("Detected device: Komplete Kontrol S-Series")
355+
356+
else:
357+
print("Device detection failed. Going with the manually specified device on the script:", DEVICE_SERIES)
358+
359+
327360
######################################################################################################################
328361
# Button to action definitions
329362
######################################################################################################################
@@ -753,7 +786,9 @@ def OnMidiIn(event):
753786
######################################################################################################################
754787

755788
def OnInit():
756-
789+
# Detects the device the script is running on
790+
detectDevice()
791+
757792
# Tells to FL Studio the device has peak meters
758793
device.setHasMeters()
759794

0 commit comments

Comments
 (0)