A technical support community for Apple Logic Pro users.
bpford wrote:Hey Dewdman,
Thanks for turning me onto Bidule. I got it stuck in my head after I discovered it's capabilities, that it would be better if I could do this process with just one midi plugin (bidule), instead of 2 (bidule, my script). So this is what I built in Bidule and it seems to work like it should.
I haven't bought the full version of Bidule yet, so I'm not 100% positive it would work within Logic, but I can't see why it wouldn't.
Dewdman42 wrote:Very interesting way to avoid Scripter and it goes to show that Bidule in general is capable of doing some interesting midi transforms. Myself I find it easier to read and understand Javascript, but this is cool and since it gives you some sliders and stuff might be easier to tweak for each channel as you go... I can't think of any reason it wouldn't work in logic either.
/*Script that transforms control change 119 into a program change
with user definable channel number and program change number and filter all other midi events
*/
var PluginParameters = [
{ name: "Channel",
type: "valueStrings",
defaultValue: 1,
minValue: 1,
maxValue: 16,
numberOfSteps: 15},
{ name: "Program #",
type: "valueStrings",
defaultValue: 0,
minValue: 0,
maxValue: 127,
numberOfSteps: 127
}];
function HandleMIDI(recall) {
if (recall instanceof ControlChange && recall.number == 119) {
var p = new ProgramChange; //generates program change message and saves as "p"
var prog = GetParameter("Program #") //retrieves program number from user input and saves to "prog"
var chan = GetParameter("Channel") //retrieves channel number from user input and saves to "chan"
p.channel = chan //sets program change to "prog"
p.number = prog //sets program change channel to "chan"
recall.trace(); //filters out all other midi messages
p.send(); //sends out only channel and program change #
}
else {
recall.send();
}
}
else {
recall.send();
}