Behringer X-Touch One Remote

Hi Martin,

That is ok for me.

So in my script the following items are open:

  • the fader LEDs
  • the knob LEDs
  • getting the values the AI knob is focused on to display them in the display
  • getting and sending the bars and beats Information to the displays (far ad I understand the api is currently not supporting that)

So every idea to make this happen are welcome.

Cheers

Maik

Just wanted to say Thank You for this!

1 Like

Hi,

What do you want to show on the LEDs? Do you want to use it as the meters?

What do you want to show there? Do you want to show the position of the panner?

This is possible.

If I’m not mistaken, this is possible since C12.0.50.

Code for much of this is available in the icon platform m+ midi remote.

Feel free to copy/paste for the X-Touch One. Both are MCU based so should play nicely for the most part. At a minimum will provide pointers.

2 Likes

Thanks for the hint unfortunately I have not found how to get the TransportTime stuff in the other scripts.

I found the “TransportTimeDisplay” object / method in the API documentation…
When I am trying to define the object and getting the mPrimary it is not working (object not found / now value / variable nor defined…).

So can somebody tell me how to get this values?

The Bars / Beats / Sub Division / Ticks LCD sysex commands are waiting to be filled with data :slight_smile:

Apologize for the question but javascript and this API is new for me.

Thanks for your support and hints.

Maik

Here’s the XTouch Universal Native version.

//DISPLAY
var currentLedCodes={}
var segMapping=[0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67]
var tp=page.mHostAccess.mTransport.mTimeDisplay.mPrimary.mTransportLocator.mOnChange=function (/** @type {MR_ActiveDevice} */context,
                                                                                                 /** @type {MR_ActiveMapping} */activeMapping,
                                                                                                 /** @type {string} */time,
                                                                                                    /** @type {string} */format) {
    //console.log(format)
    var text='0000000000'      //- sysex (hex) F0 00 20 32 41 37 s1 .. s12 d1 d2 F7
     // - s1..s12: segment data (bit 0: segment a, .. bit 6: segment g)
      //- d1: dots for displays 1..7 (bit 0: display 1, .. bit 6: display 7)
      //- d2: dots for displays 8..12 (bit 0: display 8, .. bit 4: display 12)
    if(format==='Bars+Beats')
    {
        var fields = time.split('.');
        while(fields[0].length<3)
        {
            fields[0]=' '.concat(fields[0])
        }
        text='  '.concat(fields[0],fields[1],fields[2],fields[3])
    }
    if(format==='Seconds')
    {
        var fields = time.split(/[:.]/);
        while(fields[0].length<3)
        {
            fields[0]=' '.concat(fields[0])
        }
        text='  '.concat(fields[0],fields[1],fields[2],fields[3])
    }
    if(format==='Timecode')
    {
        var fields = time.split(':');
        while(fields[0].length<3)
        {
            fields[0]=' '.concat(fields[0])
        }
        text='  '.concat(fields[0],fields[1],fields[2],fields[3],' ')
    }
    if(format==='Samples')
    {
        text=time;
        while(text.length<10)
        {
            text=' '.concat(text)
        }
        text='  '.concat(text)
    }

    //console.log(text)
    for(var i=0;i<12;i++)
    {
        var c=text.charCodeAt(i);
        if(c<32)
            c=32
        if(c>57)
            c=32

        if(c==32)
        {
            currentLedCodes[i]=0;
        }
        else
        {
            currentLedCodes[i]=segMapping[c-48];
        }
    }

    midiOutput.sendMidi(context, [
            0xf0,00,0x20,0x32,          //HEADER
            0x14,0x37,          //Device ID, CMD=4c
            currentLedCodes[0],currentLedCodes[1],
            currentLedCodes[2],currentLedCodes[3],currentLedCodes[4],
            currentLedCodes[5],currentLedCodes[6],
            currentLedCodes[7],currentLedCodes[8],
            currentLedCodes[9],currentLedCodes[10],currentLedCodes[11],
           0x00,0x00,
            0xf7])
    //console.log(time)

}
2 Likes

Thank you very much!
Your script helped to finalize the configuration of the X Touch One for me :slight_smile:

Behringer_XTouchOne.midiremote (7.3 KB)

Attached you will find my last script that includes the V-Pot LED ring and the time display.

Now it is time to do some music!

Cheers

Maik

Hi Mike! I tried to test your latest version of the script. Yes, there really was a display on the displays. When scrolling the panorama wheel checked everything is displayed correctly. But here is the display that displays the time, it always stands at the same place 000.00.00 even when playback is going on. Is this how it should be? :blush:

Hi,

I tested the the display with all time formats accept “60 fps (user)” because I am not using it.
Do you use Cubase in English or another language because the function depends on the selected language in Cubase.

Hope we are do not misunderstand each other?

CubaseTimeformat

If you use Cubase in a different language please provide a similar screenshot.
Otherwise please tell me step by step what you did so that I am able to reproduce the issue.

Thanks

Maik

Снимок экрана 2023-01-21 194850
strong text
Yes, I use the Russian interface language. The names look like in my picture.

That would explain why it is not working.

Be honest my Russian skills are more or less zero :frowning:

So it would be great if you would provide the text in plain text.
Type it into notepad or other text editor and share the file with me.
Than I can use copy paste and add it to the script.

Cheers

Maik

Hi Mike! I added the text in the same sequence as in your and my picture. I would be very grateful to the script in which the main display will work
Russian Language (Русский).zip (252 Bytes)

Thanks for sharing the text in Russian.
The script is showing all time formats on the displays now running Cubase in English, German or Russian.

Keep in mind that this script is running the X Touch One in MCU default mode.

Cheers

Maik

Behringer_XTouchOne.midiremote (7.6 KB)

Hi Maik, thanks a lot for the script. I downloaded and installed it, it is working fine. But the Channel LED meter is not working. Have I done anything wrong? I am running X-Touch One in MCU mode.
And another questions,
How the ‘Master’ and ‘Channel (right)’ buttons are functioning?
‘Select’ and 'Channel (left) both are assigned to ‘Disable/Enable track’, are they some how linked?
Sorry for those stupid question.
Regards,
Kaushik

Hi Kaushik,

You did nothing wrong. I have not implemented the volume meter yet because I do not need it.

The channel buttons changing their functionality and I have currently no idea how to fix it.

I am currently busy. Will check it next week.

Cheers

Maik

Okay Maik, take your time. Looking forward for a infallible script from you. it would really a great help to us who have no idea about java scripting.

Regards,
Kaushik

Do these scripts fix the fader not being calibrated to zero in Cubase? We certainly appreciate your efforts on this device. Looking forward to trying it on the weekend.

Hey all. I know I’m late to the party, but I’ve had a fair bit of luck adapting bjoluc’s X-Touch script, just by altering the MIDI Device driver so that it works with the XT1. I’ve got nearly all the functionality I want on there, with a few minor issues (and the midi remote display in Cubase is obviously wrong as it shows an X-touch layout instead of an XT1). I’m hoping to find the time to update it so that it will ‘just work’ with an XT1, and indeed make some changes to that it will reflect the XT1 layout on-screen and fix a couple of minor niggles with it.

Thread is here - X-Touch (+Extender) MIDI Remote Script (MCU mode)

You can just download the current release and alter line 4083 of the .js file to read:

driver2.makeDetectionUnit().detectPortPair(this.mainPorts.input, this.mainPorts.output).expectInputNameEquals("X-Touch One").expectOutputNameEquals("X-Touch One");

… and then you should be good to go. It’s made the XT1 the thing I wanted it to be (but never was in the default MCU mode).

1 Like

Hi all,

I am getting a step forward. The master button now switches and controls the volume fader of the Control Room.

Still open:
- The vuMeter. I have no idea what I’m doing wrong but getting not the value of the vuMeter:
I am doing the following steps:
var hostSelectedTrackChannel = page.mHostAccess.mTrackSelection.mMixerChannel;
hostSelectedTrackChannel.mValue.mVUMeter.mOnProcessValueChange = function ( context, newValue){
// calculating the value and do the midi send
}
So it looks like that the newValue is always 0.
The function is also only used when I change the track. So looks like that the value is not changing.

So any ideas how to implement the vuMeter correctly are welcome.

- The left and right channel buttons changing (stepping through the 8 tracks of a bank) the MIDI value every time one of the buttons is used.
Also here any ideas to handle this MCU behavior are welcome.

Thanks in advanced.

Maik

Hi,

I forgot why, but when I was implementing VUMeter, I used the customVariable.

// VU Meter
var customVuMeter = surface.makeCustomValueVariable('customVuMeter')
page.makeValueBinding (customVuMeter, selectedTrackChannel.mValue.mVUMeter)
customVuMeter.mOnProcessValueChange = function(context, newValue) {
	...
}
1 Like