Need help with a script

Hi all,

I have a midi command that I want to use to trigger both a parameter in a rackspace, and also the Tuner. I’ve got both working separately, the tuner is working with a script. However, I cant assign the same midi command (using learn) to both the global and the rackspace at the same time. When I do, it stops the global script from running, so the tuner wont turn on and off.

Is there a way to modify my global script so that I can trigger a midi event on a specific plugin in a rackspace, or is it possible to link both widgets together (global and rackspace) so that when I trigger the midi event it sends to both global(tuner) and rackspace (plugin)?

Hope someone can help me here.
Cheers

Here is my script for the tuner:

Var
    TunerButton : Widget // Reference the button widget
    TunerState : Boolean // Track the tuner's state

// Initialization block
Initialization
    TunerState = InTunerView() // Initialize with the current state
End

// Handle value change for the TunerButton widget
On WidgetValueChanged(newValue : double) from TunerButton
    // If the button is pressed and the tuner is off, turn it on
    If newValue == 1.0 And TunerState Then
        ToggleTunerVisible()
        TunerState = InTunerView() // Update state
    End

    // If the button is released and the tuner is on, turn it off
    If newValue == 0.0 And !TunerState Then
        ToggleTunerVisible()
        TunerState = InTunerView() // Update state
    End
End

Are you trying to send MIDI messages directly to a plugin or to a widget that is mapped to a plugin parameter?

it would be great to be able to send it directly to the plugin but i couldn’t get that to work from a script so i just created a widget to do the same thing and triggered it via midi. Then I was able to access the widget from the script and send midi commands… But in this case, I cant do that because I cant link the global script with the plugin that is not in the global rackspace.

I simply want to be able to add to this global script so that it triggers a rackspace widget, or even directly toa rackspace plugin.

Meh - that’s generally a bad idea — if you ever have to use a different MIDI controller, you’d have to start reprogramming it to make sure it sent the right message. (I realize that may not apply specifically to your situation but it’s considered to NOT be a “best practice”)

Have you tried using the BindExternalWidget system function?