Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for the iCON QCon Pro G2 #7

Merged
merged 16 commits into from
Jul 4, 2023
Merged

Conversation

bjoluc
Copy link
Owner

@bjoluc bjoluc commented Jun 2, 2023

No description provided.

@bjoluc
Copy link
Owner Author

bjoluc commented Jun 2, 2023

Hey @bluesound7,
thanks for coming over to GitHub for this! This is still in a draft state, but I already finished the surface layout. Here's an incomplete list of things that are yet to be done:

  • Use only 6 display chars per channel, so there's some padding between the channels
  • Investigate the encoder assign button order – does it match the default Cubase MCU order?
  • Conditionally disable the color manager
  • Update the auto detection port names

I have attached the build output from commit 0fdf5e9 in this zip file. The folder structure needs to be icon/qcon-pro-g2/icon_qcon-pro-g2.js then...

With all the buttons properly aligned for your device, it might be easier for you to judge what's working and what isn't. Can you compile a list of things that don't work as expected? I'm running out of time for today, so I might ask you some more questions in the next couple of days when I get to this again 🙂

@bluesound7
Copy link

@bjoluc that works great!
I'm wrapping up for the day and have a couple gigs this weekend and will be able to get to things in between also so that works great

So the next steps, download the zip file, load up and test, report whats working/not working - is there anything I'm missing?

Also, where are the instructions again on how to properly load the script? I just finished moving 2 weeks ago and the timing is perfect for collaborating on this project again, but I need to refresh my memory on loading script and other basics now that the main parts of the move have settled down :)

@bjoluc
Copy link
Owner Author

bjoluc commented Jun 2, 2023

So the next steps, download the zip file, load up and test, report whats working/not working - is there anything I'm missing?

At the moment, I think that's it – except that I only need to know what's not working 😜

Also, where are the instructions again on how to properly load the script?

I think the readme of this repository has the gist of it, though the directory names and file name need to be icon/qcon-pro-g2/icon_qcon-pro-g2.js for this version of the script now. Given that you managed to try out the original script some while ago, I'm confident you'll find what you need – proper (setup) documentation for various script flavors is another point on the list...

Cheers and have some fun gigs!

@bluesound7
Copy link

bluesound7 commented Jun 4, 2023

So I was able to plug this up and get some notes started :)
(attached is the image of the cubase overlay that comes with the qcon)
https://europe1.discourse-cdn.com/steinberg/original/3X/f/d/fde989807f89594b79b426ba0528c217de13842f.jpeg

NOTES:

-flip button: what is this supposed to do? (all faders go to zero when pressed)

-name/value doesn't do anything

-master fader: adjusts the control room red fader instead of the master fade
-I would like to control the master fader, however the

-vst button: it seems to reset the volume when pressed on a regular track (seems to make other tracks update on occasion when I press a second time)

-master button: seems to select the master fader on mixconsole 1

-write button: doesn't do anything

-left and right don't seem to work on anything

-solo button: seems to nudge the play head forward

-F1-F8 are these customizable and if so, how and are there any recommendations for uses of these? (f8 opens channel settings)

-LAYER 1: F8 opens the midi remote mapping assistant

-LAYER 2: F8 opens the channel settings (I would prefer this to be without a modifier button for faster workflow if possible/alternate the other f8, perhaps the focus quick controls on the layer 2)

-is there a way that the cubase mixer can scroll the right when using the track fader control to the right?

-lastly, extra credit:
this is a crazy question, I have an xr-18 and use the x air edit software, is it possible that a midi device could be created to control the software with the icon, i have mapped some simple steps with a loupedeck but its not user friendly enough to find myself actually using it.

-additionally: is there any other functionality that can be added on different pages that can customize the experience after the standard mcu items are implemented? seems the midi devices have options for more flexibility of uses

@bjoluc
Copy link
Owner Author

bjoluc commented Jun 4, 2023

attached is the image of the cubase overlay that comes with the qcon

I'm a bit confused by the overlay: According to the product images (based on which I created the script surface), the only button that's labeled differently on the overlay is the Shift button ("Write", although there's another write button one row above). Am I missing anything?

-flip button: what is this supposed to do? (all faders go to zero when pressed)

Like in the default MCU mapping, it assigns the faders to the encoder parameters.

-name/value doesn't do anything

Does the corresponding button on the device surface in Cubase light up when you press the Name/Value button, i.e. is the MIDI mapping correct?

-master fader: adjusts the control room red fader instead of the master fade -I would like to control the master fader, however the

Working as intended as per the Readme (last point under "Miscellaneous"). Feel free to change it in the config.

-vst button: it seems to reset the volume when pressed on a regular track (seems to make other tracks update on occasion when I press a second time)

-master button: seems to select the master fader on mixconsole 1

VST and Master are mapped to MixConsole undo & redo like the Readme says.

-write button: doesn't do anything

Are we talking about the Write button next to VST and Master? I suspect it's mapped to the MCU "Shift" button. Do any other (shiftable) buttons light up while you press it?

-left and right don't seem to work on anything

Do they work in the default Cubase MCU setup?

-solo button: seems to nudge the play head forward

Whoops, seems I forgot to map the button. Still curious why it would do anything else instead?

-F1-F8 are these customizable and if so, how and are there any recommendations for uses of these? (f8 opens channel settings)

-LAYER 1: F8 opens the midi remote mapping assistant

-LAYER 2: F8 opens the channel settings (I would prefer this to be without a modifier button for faster workflow if possible/alternate the other f8, perhaps the focus quick controls on the layer 2)

You can customize/override all the F button mappings, as well as almost all other button mappings in the MIDI Remote Mapping Assistant – that's one of the great MR benefits: The device is yours to map! You can consider the script a mapping suggestion striving to be as close to the default as useful.

-is there a way that the cubase mixer can scroll the right when using the track fader control to the right?

Interesting idea. Is there a key command to do so? I might look into this as an optional (configurable) feature.

-lastly, extra credit: this is a crazy question, I have an xr-18 and use the x air edit software, is it possible that a midi device could be created to control the software with the icon, i have mapped some simple steps with a loupedeck but its not user friendly enough to find myself actually using it.

I'm not sure if I get the question: It's not related to this script, is it?

-additionally: is there any other functionality that can be added on different pages that can customize the experience after the standard mcu items are implemented? seems the midi devices have options for more flexibility of uses

Most certainly. There might be a lot to enhance with all MCU devices. The intention here is to use the same mapping across all MCU devices but make that mapping as useful as possible while staying as close to the default MCU mapping as reasonable. So if you have general MCU mapping ideas, feel free to voice them – ideally in a separate GitHub discussion or issue 🙂

@bjoluc
Copy link
Owner Author

bjoluc commented Jun 4, 2023

Hi @perivar,
I just noticed you created a fork a while ago dedicated to the QCon Pro G2! Seems that you put a lot of effort into that already, so I hope this PR doesn't render that void 🤦‍♂️ My goal with this project is to rename it to cubase-mcu-midiremote and support more devices in the long term. Guessing that you own a QCon Pro G2, would you like to test this and contribute here? No probs if you prefer to work on your fork instead, that's how OS works 🙂
Cheers!

@perivar
Copy link

perivar commented Jun 6, 2023 via email

@perivar
Copy link

perivar commented Jun 7, 2023

UPDATED:
Hi. have now just tested the new build on the QCon G2.
I turns out that the problem is that I am using a Windows machine and the regex in tsup.config.ts does not work due to different newlines. The fix was to change the regex in tsup.config.ts to support both \n and \r, i.e.
/BEGIN JS[\n\r]([\s\S]+)/

Overall its amazing you have developed this. Some really smart mappings I like (Quick controls etc.).

The issues I noted were:

  1. I could not make the build work on windows due to some issues with the regex code in tsup.config.ts
    The fix was to change the regex in tsup.config.ts to
    /BEGIN JS[\n\r]([\s\S]+)/

This made npm run build work, but the script did get detected automatically in Cubase. (I could add it manually, but since you already make it fit the QCon I suggest replacing the expectName as well, and use *Contains to support different firmware versions).

  1. The script is looking for the wrong ports, to fix it I replaced
    .expectInputNameEquals("X-Touch").expectOutputNameEquals("X-Touch");

with

.expectInputNameContains('iCON QCON Pro G2')
.expectOutputNameContains('iCON QCON Pro G2')

in order to support the fact that the firmware version number is often added to the port name.

After these changes the script started working.
However after around 10 minutes the script crashed and the remote device became unresponsive.
The only way to make it work again, was to restart Cubase.
Nothing in Cubase, except the connection to the QCon failed.
This does not happen when using the "standard MCU" connection, so it has something to do with the script.
Possibly the problem is that there will be a crash if the midi remote manager debug window is open?!
I will test further.

Thanks again - great work.

@perivar
Copy link

perivar commented Jun 7, 2023

UPDATE:
In addition to the comments below found that since the LCD scripts only use 6 characters, it does not seem to ever clean all the 7 characters for the channels. So when I first opened and closed FL studio it showed a long sentence across the LCD. When I opened up Cubase only the 6 first characters for every channel got updated, and the 7th character was kept from the FL Studio session, making it look a bit weird with something that looks like random characters at every 7th character.

Another comment based on the comments from bluesound.
All buttons does in fact seem to work correctly, this includes Name/Value, Beats etc.
However, there does not seem to be any mapping for the buttons you can reach using Layer 2 on the QCon - only the EDIT button, which is reached using Layer2+F8.
So Layer2 and F1-F7 does not seem to exist in your code.
I believe these are called VIEW_* in the standard MCU mapping. I.e. Note 62 to 68. (69 is not used I believe, rather 51 which is EDIT)

Another weird thing, which I originally thought was your code, was that when clicking SHIFT only the LEFT button lights up, and no one else. It does seem this is a firmware issue, and I have contacted ICON support.

When I was checking this clicking all the buttons, the device got unresponsive again and crashed.
Still don't know what does that - could it be the timer?

@toto-polo

This comment was marked as off-topic.

@bjoluc
Copy link
Owner Author

bjoluc commented Jun 9, 2023

Just a question: I tried to modify your code to avoid having so many polyfills added since I thought it might affect the performance, as well as making the final file so hard to read. Have you thought about this yourself?

I definitely have, yes. Initially, I started without any polyfills, just plain ES5. During that process, I got reminded how crazy dumb ES5 is 😂 I became defiant very quickly and started using Babel, later switching to SWC via tsup. There are enough limitations in the current MIDI Remote API already, so at least I didn't want to cope with language limitations. The same thing holds for polyfills – I was just too annoyed by reinventing the wheel and I didn't care too much about script size. Luckily, I couldn't detect any speed differences with SWC and polyfills vs without them.

Re readability: I didn't expect anyone to read / work on the build output other than changing port names or some button mappings, which I think is pretty doable right now. Well, not pretty, but definitely doable 😅

I have not verified the code I submitted into my fork just now, but will be testing if the rollup build process still works. If so it avoids most of the core-js polytfills.

If you manage to get your plain ES5 build to work without wasting too much time, I would be keen to know if there are notable performance differences between both versions. Otherwise, don't bother – life's short 😅

Also, thanks for the feedback! I hope I'll be able to reply in a timely manner 🙃

@bjoluc
Copy link
Owner Author

bjoluc commented Jun 11, 2023

Hey @perivar,
I just fixed (1) and (2), thanks for these!

However after around 10 minutes the script crashed and the remote device became unresponsive.
The only way to make it work again, was to restart Cubase.

I've heard that some times, yet could never reproduce it 😬 I've also seen other script authors complain about this in the Steinberg forum, so I tend to blame it on Cubase. If only we knew some reliable repro steps. Then again, we currently don't get any response even on simple, easily reproducible issues raised on the forum 😕

In addition to the comments below found that since the LCD scripts only use 6 characters, it does not seem to ever clean all the 7 characters for the channels.

Good one, how could I not think about this 🤦‍♂️ 😅

So Layer2 and F1-F7 does not seem to exist in your code.
I believe these are called VIEW_* in the standard MCU mapping. I.e. Note 62 to 68. (69 is not used I believe, rather 51 which is EDIT)

Oh, I didn't know Layer2 actually works with F1-F7, so I didn't create surface elements for the "virtual buttons". Thanks!

Another weird thing, which I originally thought was your code, was that when clicking SHIFT only the LEFT button lights up, and no one else. It does seem this is a firmware issue, and I have contacted ICON support.

When I was checking this clicking all the buttons, the device got unresponsive again and crashed.
Still don't know what does that - could it be the timer?

Oh no. No idea why this might happen, but would you mind commenting out all the buttons that should light up when pressing shift and uncomment them one at a time to see if receiving any or a combination of these midi notes causes the crash?

@bjoluc
Copy link
Owner Author

bjoluc commented Jun 11, 2023

I think I addressed everything I could so far. Also, no need to build this yourself: The build GitHub action uploads the built scripts as an artifact for each commit, from where you can download them as a zip file (when you're logged in). For instance, here are the scripts for commit afbe9fd 👍

@perivar
Copy link

perivar commented Jun 16, 2023

I have tested the Icon script and it seems to work fine!
Since it already support the stuff I planned to do, I am discarding the script I started working on, as well as trying to avoid polyfills.

When it comes to the Shiftable buttons, I have confirmed that it is not your code, but the Icon firmware. I am using version 1.13.
Check out this test code:
https://github.com/perivar/CubaseRemote_Icon_QConProG2/blob/master/example/iconsimpletest/icon_qcon_pro_g2.js

If I press Shift only left, pan and sends light up - the rest of the buttons remain dark.

Thanks for an excellent script.
/Per Ivar

@bjoluc
Copy link
Owner Author

bjoluc commented Jun 21, 2023

Thanks for testing @perivar! I'm glad it works for you. Also, thanks for providing the repro test script for the shiftable button lights issue.

Just to make sure, does this

When I was checking this clicking all the buttons, the device got unresponsive again and crashed.

still happen – with either your test script or the real thing?

I noticed the Edit button can only be reached via Layer2, so maybe it's expected behavior that it doesn't light up? For the other buttons you list, I cannot think of any reason why they wouldn't light up. Let's hope this will be fixed in a firmware update.

My task list still has

Investigate the encoder assign button order – does it match the default Cubase MCU order?

I think the labels refer to a legacy Cubase MCU mapping and the Readme doesn't fit for them currently. But if you compare them to the original MCU (or X-Touch for what it's worth) encoder assign button names, do they appear to be ordered correctly? It's a bit annoying that the EQ button is labeled "Pan" on the surface and "Send" is labeled "Inserts", etc. but that's also a problem with the default Cubase MCU mapping, right? Not sure how to best handle this.

@bjoluc bjoluc marked this pull request as ready for review July 3, 2023 16:40
@perivar
Copy link

perivar commented Jul 3, 2023

When I was checking this clicking all the buttons, the device got unresponsive again and crashed.

Did not experience this over many hours so I hope it’s fixed!

I noticed the Edit button can only be reached via Layer2, so maybe it's expected behavior that it doesn't light up? For the other buttons you list, I cannot think of any reason why they wouldn't light up. Let's hope this will be fixed in a firmware update.

I’m confident this is a firmware issue.

Investigate the encoder assign button order – does it match the default Cubase MCU order?

As far as I can see the mapping works the same and works fine.

Well done !

@bjoluc
Copy link
Owner Author

bjoluc commented Jul 4, 2023

Thanks @perivar! I'm going to merge this now so we can get a release out soon 🚀

@bluesound7 If you have some time to try this out, feel free to respond here anyway or open discussions / issues for individual problems. Cheers!

@bjoluc bjoluc merged commit ee4a800 into develop Jul 4, 2023
6 checks passed
@bjoluc bjoluc deleted the support-other-devices branch July 4, 2023 09:38
github-actions bot pushed a commit that referenced this pull request Jul 5, 2023
## [1.6.0](v1.5.0...v1.6.0) (2023-07-05)

### Features

* Add low-cut and high-cut filter pages to the "Track" encoder assign button ([6551319](6551319))
* Add support for the iCON QCon Pro G2 ([#7](#7)) ([ee4a800](ee4a800))
* Add Track Quick Controls page to "Track" encoder assignment ([a0a697c](a0a697c))
* **X-Touch:** Extend port detection by ports named "X-Touch INT" ([d25b2ff](d25b2ff))

### Bug Fixes

* Fix an issue where turning multiple devices' encoders at once would leave channel strip displays showing values instead of returning to the respective parameter names ([832a052](832a052))
* Use VST Quick Controls in "Inst" encoder assignment instead of Track Quick Controls ([129cf46](129cf46))
* Work around the regressions introduced in Cubase 12.0.60 ([fd3a69b](fd3a69b)), closes [#6](#6) [#5](#5)
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

🎉 This PR is included in version 1.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants