Simple request for help with script

I use a button on Open Stage Control to activate “play” of the Streaming Audio File Player in my Global rackspace. OSC address = /GlobalRackspace/G_play/SetValue

That works. No problem.

At the same time, I want to start the playing of an audio file in Foobar (It plays my back tracks).

What is the script required to accomplish the following? …

At the tap of the button (value = 1?) I need to send CC=21 at value 127 on midi channel 15 via midi port called “from OSC”

I tried … if (value == 1) { send (‘oscMIDI’,15,27,127) } etc

Thanks in advance.

That is not GP Script. Since you clearly know programming (c-style anyhow), perhaps refer to the GP Script language manual to see how to accomplish what you need in GP Script

1 Like

:joy: So you think I know something about programming … that’s funny because I actually don’t. I only know a bit about midi and then asked Gemini, which is where I got that piece of “code” from.

But thank you for replying and pointing me to the GP Script Manual @dhj. Let me dive right in and get to know something about programming.

Are you talking about a widget in GP? If so, you shouldn’t need a script.
In the global rackspace, add a Midi Out block for your port. Within this plugin window you can set it to send on channel 15. Then add a pad widget and map it to the Midi Out Block and the parameter for CC 21.

Funny. I assumed that since you essentially wrote C-style code (with parentheses around the test) and curly braces around the statement, that you had a programming background.
We try to help people who know nothing about programming but those who do have some background in the black arts, we refer them to the GP Script manual so they can just see the syntactic differences.

What is Gemini? An AI tool? I do know that ChatGPT knows about GP Script though it doesn’t always get it right

It appears to be the former ‘Bard’ of Google, so yes: an AI tool. Explains the confusion in the script.

1 Like