Midi cc via tabs

Hello friends! I am migrating my layout from TouchOsc to Open Stage Control (and I am very excited). All of my project works through Clyphx Pro scripts, specific to Ableton Live.

In this project, I capture some aspects of Live via LOM (live object model) such as the name of the current scene, in / out routing list, etc … I convert this information through clyphx pro variables that are generated when I activate certain tabs. For example: in the old layout, when I click on the “Main” tab, my script send a midi cc containing an Osc string (text) message that displays the project’s BPM in a text display. This specific part of my project aims to get better visual feedback from Ableton on my Ipad screen.

In O-S-C I am not able to send midi cc when I click on my Main tab. I’m trying as follows:

osc

The debug result looks like this: (DEBUG, OSC) Out: {address: ‘/ panel_2’, args: [{type: ‘f’, value: 1}]} To: xxx.xxx.xxx.8:8000

Where can I be wrong?

It’s the tab’s parent you should configure, its value will indicate its selected tab’s index.

2 Likes

Thanks Jean! It Worked.

I need to work a little harder to find out how to make this OSC message change the text widget. The script I use to send the message via the “Main” tab is as follows:

CC, 12, 58, 0, 127, osc flt / dsp% BPM%

*% BPM% is a Clyphx Pro variable that is configured to capture the BPM value of Ableton.

I created a text widget and put the address as / dsp. However, when I click the tab, the text with the BPM value does not appear. I am still adapting to the new terminologies. Would you have any guidance to give me in this regard?

In this work of migrating my old layout to O-S-C I will practically just have to redesign the layout and reconfigure small details. The script is already ready. Right after the conclusion, I will make a complete video showing all the features and presenting the O-S-C on my networks. Very excited = D

I'm not sure to understand, did you write this somewhere in the widget's config ?

1 Like

No … This is written in my script folder clyphx pro … When midi cc is sent via the Main tab, this script acts as an interpreter, executing the action. In sequence, I am trying to get him to return the message “osc flt / dsp% BPM%” to O-S-C stamping the BPM value in the text widget with the address / dsp.

Thanks for your attention in the answers.

Please excuse me to show a print of my old layout and how it was set up, just to illustrate what I am trying to achieve in O-S-C. I don’t speak English (use online translator) … the image can help my communication :slight_smile:

I think the issue here is to make the tab send exactly what you want. As I said the tab parent's value is the index of the selected tab it contains (0, 1, 2, etc). To convert this information into the appropriate message you can use the panel's script property:

if (value === 0) {
  // first tab selected
  send('midi:my_port', '/control', 12, 58, 127)
}

https://openstagecontrol.ammd.net/docs/widgets/scripting/

1 Like

Very good! Thanks Jean for your cooperation and patience!

Following your previous guidance I was already able to send the midi cc correctly through the tab. Also very good this alternative that you showed through the script. I performed a test by creating a button for the same submission, and it works too.

What I am not able to do is that the text widget prints the value of the BPM. Maybe I’m losing a little bit in terms of terminology to achieve this desired behavior…

Excuse me again to send a short video with my old layout where I show what I’m looking for visually. In the video, I first use the “MST” tab to change the BPM values. Visual feedback is instantaneous … When I return to the “MAIN” tab, the BPM value is maintained / updated. The text widget used to stamp the BPM has the address /dsp.

(1) 2021 01 19 11 43 26 - YouTube

Note: the small delay in updating the BPM in the video was due to the processing with the programs open (obs studio capturing the screen of ableton and my device)

The text widget will display whatever is received by O-S-C on its address (note that if any preArgs are set for this widget, the message must match them too other the widget won’t be affected ). Do the server logs print the midi cc sent by O-S-C and the expected osc feedback from ableton ?

I feel that I am close to the solution =D. I am sure it is very simple. The error is occurring because I am still familiarizing myself with the new (and revolutionary) environment of the O-S-C.

Below I send you the print of a button that I created sending 70 BPM along with the print of how I configured the text widget and what the debug shows. At Ableton, BPM changes perfectly. Only the text widget remains “inanimate”

screenshot-2021-01-19-19:27:47

This shows that your control change is sent back to Open Stage Control directly, thus indicating that the midi connection is not correct.

1 Like

Hummm … I’ll check. I’ll be back soon. My birthday is today. One of the gifts was his initiative to help =D Thank you!

I tried to send midi CC with using this thread
So I set the root's script with it, but I'm not able to send any information. Unless I put information in the OSC section.

RECEIVE    | ENDPOINT(midi_out) TYPE(CONTROLCHANGE) CHANNEL(1) DATA1(1) DATA2(0)
RECEIVE    | ENDPOINT(midi_out) TYPE(CONTROLCHANGE) CHANNEL(1) DATA1(1) DATA2(1)
RECEIVE    | ENDPOINT(midi_out) TYPE(CONTROLCHANGE) CHANNEL(1) DATA1(1) DATA2(2)

You should see an error in the server's console : there should be only 3 arguments instead of 4 as per the documentation, my post contained a typo, now fixed.

1 Like

No error !!! there was no error :slight_smile: (for real)
But make sense, and I don't know where is coming this 0 as I did copy paste of the code !?

There was a mistake in my previous post, I edited it earlier today.

1 Like