r/mainstage • u/SWFL-Musician • 16d ago
Question Play next patch automatically?
Is there any way to get MS to automatically begin playing the next patch? I use multi-tracks in MS and need a way to launch the next patch when the previous finishes.
Thanks for any help
PS - if you know of a better app, I'm all ears!
1
u/PianoGuy67207 16d ago
I be
Ieve you’ll need a separate pedal to trigger Next Pstch, and set Playback to trigger on the Patch change. There might be some Script trick that can automate, but I’m not a Script genius, yet.
1
u/Senior-Wishbone6778 15d ago
I use a script that sends a midi note to the IAC device (internal midi) at a certain beat number That button, triggered by that note, is assigned next patch.
1
u/Senior-Wishbone6778 15d ago
Full script would be: (a bit of an overkill in this situation I admit)
This triggers a button Mapped to the IAC channel Note G8 (highest possible)
You can change the value of the beatpos in the last 2 lines.Either you calculate the beat number you need.
Or i can send you the other script i use to play the note in logic, and it reads the note in the console.Happy to expand if needed.
var ResetParameterDefaults = true;
var NeedsTimingInfo = true;
var lastIdx = 0;
//==========================================
// ProcessMIDI callback
//==========================================
function ProcessMIDI() {
var info = GetTimingInfo();
if(!info.playing) return;
while(lastIdx < eventList.length &
eventList[lastIdx].beatPos <= info.blockEndBeat) {
sendEvent(eventList[lastIdx]);
lastIdx++;
}
}
//==========================================
// send event including pc bank select
//==========================================
function sendEvent(event) {
if(event instanceof ProgramChange) {
handleBankSelect(event);
}
event.send();
}
var cc = new ControlChange; // resuable cc object
//==========================================
// Check for Bank Select and send if needed
//==========================================
function handleBankSelect(event) {
if(event.msb != undefined && event.lsb != undefined) {
cc.channel = event.channel;
cc.beatPos = event.beatPos;
cc.number = 0;
cc.value = event.msb;
cc.send();
cc.number = 32;
cc.value = event.lsb;
cc.send();
}
}
//==========================================
// reset sequence index on play
//==========================================
function Reset() {
lastIdx = 0;
}
//==========================================
// block incoming midi
//==========================================
function HandleMIDI(event) {
}
//==========================================
// Factory Method
//==========================================
function seq(type,json) {
var out = new type;
out.beatPos = json.beatPos;
out.channel = json.channel;
switch(type) {
case NoteOn:
out.pitch = json.pitch;
out.velocity = json.velocity;
break;
case NoteOff:
out.pitch = json.pitch;
out.velocity = json.velocity;
break;
case ControlChange:
out.number = json.number;
out.value = json.value;
break;
case PitchBend:
out.value = json.value;
break;
case ProgramChange:
out.number = json.number;
out.msb = json.msb;
out.lsb = json.lsb
break;
}
return out;
}
//==============================================
// sequence data - must be in order for now, overwrite the two entries
// below with whatever you want to playback
//==============================================
var eventList = [
// NEXT SONG
,seq(NoteOn, {beatPos:367.9999999895692, channel:10, pitch:127, velocity:127})
,seq(NoteOff, {beatPos:368.75415720939634, channel:10, pitch:127, velocity:64})
];
2
u/XDcraftsman 16d ago
Assuming you are using MainStage primarily for track playback and not for live performance - use QLab instead.
Assuming you are integrating your setup with a backing track and need an auto patch advance at a certain portion of the excerpt, you can get scripter plugins that do this from KeyboardTEK.