MainStage: changing expression pedal control based on button state

Hello! I'm wondering if there is a way to alter what the Expression Pedal in the Workspace controls, based on the state of a button that I've added to the Workspace. For example, when the button is off the Expression Pedal will control Expression (MIDI 11), but when the button is on it will control Volume (MIDI 7). Thanks!

iPhone SE, iOS 18

Posted on May 8, 2025 08:05 AM

Reply
Question marked as Top-ranking reply

Posted on May 8, 2025 02:14 PM

There's not enough here to give a complete answer and I do not know how much you know about MainStage or your setup. You could consider using the Scripter on 2 channel strips at concert level. Both would have the pedal mapped to their input. On one, simply use a scripter that doesn't output. On the other, make the scripter output 7 when given 11. Map the bypass on the scripters to the button but invert one of the bypasses. I hope this sets you off on a path that achieves what you want. Good luck.

Similar questions

8 replies
Question marked as Top-ranking reply

May 8, 2025 02:14 PM in response to mahuntington1980

There's not enough here to give a complete answer and I do not know how much you know about MainStage or your setup. You could consider using the Scripter on 2 channel strips at concert level. Both would have the pedal mapped to their input. On one, simply use a scripter that doesn't output. On the other, make the scripter output 7 when given 11. Map the bypass on the scripters to the button but invert one of the bypasses. I hope this sets you off on a path that achieves what you want. Good luck.

May 8, 2025 04:46 PM in response to tfromtroon

Awesome! Thanks so much for the quick reply. Yeah, I kinda ended up with a simplistic version of what you describe. Basically, it was one Scripter on the instrument's channel strip that goes like this:


buttonPressed = false
function HandleMIDI(event)
{
	if(event.number === 21 && event.value === 127){
		buttonPressed = true
	} else if (event.number === 21 && event.value === 0){
		buttonPressed = false
	} else if (event.number === 11 && buttonPressed === true) {
		var newEvent = new ControlChange
        newEvent.channel = event.channel
        newEvent.number = 10
        newEvent.value = event.value
        newEvent.send()
        return
	} else if (event.number === 11 && buttonPressed === false) {
		var newEvent = new ControlChange
        newEvent.channel = event.channel
        newEvent.number = 1
        newEvent.value = event.value
        newEvent.send()
        return
	} else {
		event.send()
	}
}


It works okay, although it's a bit slow. That might just be JavaScript being JavaScript, though. I was hoping there was a way to do it without scripting, but maybe not. ChatGPT said there was something called Modifiers, but I don't think that's a real thing as far as I can tell.


Anyway, the end goal is that I have this AirTurn BT500S-6 Analog Controller and an expression pedal. I was hoping to get it so that the expression pedal would affect a different aspect of MainStage (Modulation, Volume, Pan, Expression, etc) depending on what foot switch I'd recently pressed. Right now I'm just mocking that up in the Workspace. Like I said the script works, but it'd be cool if there was a way to do that without having to write custom JS. It feels like the kind of thing that would be supported, but I'm still pretty new to this, so I could be wrong. Thanks again!

May 9, 2025 07:23 PM in response to tfromtroon

Follow-up question: I have a modifier set up in an instrument's channel strip that re-assigns Expression to Mod Wheel. I have a button set up in Workspace that adjusts the modifier's bypass so when the button is inactive, the modifier is bypassed. When the button is active, so is the modifier. Just like you described.


Now I'm thinking about having four modifiers total that do the following:


- re-assign expression to mod wheel

- re-assign expression to pitch bend

- re-assign expression to volume

- re-assign expression to breath



How do I add a second button so that:


- When neither button is active, the first modifier is active

- When only the first button is active, the second modifier is active

- When only the second button is active, the third modifier is active

- When both buttons are active, the fourth modifier is active


If you know how binary works, the buttons act like 00 = modifier 0, 01 = modifier 1, 10 = modifier 2, 11 = modifier 3

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

MainStage: changing expression pedal control based on button state

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.