gpiccolini Posted April 4, 2016 Share Posted April 4, 2016 Hello, I searched quite a bit and did not found an answer so I decided to ask here as I'm trying to do the opposite: turn Program Changes into notes (or CCs...if that's easier). Is that possible? I tried a little modifying scripts but no luck. (I don't know much about scripts) thanks in advance Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted April 4, 2016 Share Posted April 4, 2016 Hi, I created a new thread from your post. Here's a Program Changes to CC's script. Keep in mind that Program Changes on channel 1 are reserved for controlling channel strip performances, so they don't reach the scripter plug-in. Also, since Program Changes have a single data byte (for the program number) you should specify what you want the CC's second data byte (the CC "value") to be. // Convert incoming Program Changes to CC's. // MIDI Channel 1 Program Changes will be ignored as they are reserved // for invoking Channel Strip Performances. var mChannel = []; for (var i = 0; i < 16; i++) { mChannel[i] = String(i + 1); } var PluginParameters = [{ name:"Convert Program Changes to CC's", type: "text" }, { name: "MIDI Channel", type: "menu", valueStrings: mChannel, defaultValue: 1 }, { name: "Output CC Value", type: "lin", minValue: 1, maxValue: 127, numberOfSteps: 126, defaultValue: 80 }]; function HandleMIDI(e) { if (e instanceof ProgramChange) { var cc = new ControlChange(); cc.number = e.number; cc.value = GetParameter("Output CC Value"); cc.channel = GetParameter("MIDI Channel") + 1; cc.send(); cc.trace(); } else { e.trace(); e.send(); } } J. Quote Link to comment Share on other sites More sharing options...
Eric Cardenas Posted April 4, 2016 Share Posted April 4, 2016 I created another version for notes: //* var title = "Program Change to Note by EC"; var version = "v0.1"; //* var NOTES = MIDI._noteNames; function HandleMIDI(event) { var bN = GetParameter("Base Note"); var on = new NoteOn; if (event instanceof ProgramChange) { on.pitch = event.number + bN; on.send(); var off = new NoteOff(on); off.sendAfterMilliseconds(100); } else { event.send(); } } PluginParameters = [{ name: title + " (" + version + ")", type:"text" }, { name:"Base Note", valueStrings: NOTES, defaultValue:0, type:"menu" }]; Quote Link to comment Share on other sites More sharing options...
gpiccolini Posted April 4, 2016 Author Share Posted April 4, 2016 Hello Eric, thank You very much!!! I was trying again but fail all the time. You saved me loads of time! I owe you a beer if you go to Buenos Aires. Quote Link to comment Share on other sites More sharing options...
Eric Cardenas Posted April 4, 2016 Share Posted April 4, 2016 You're most welcome. ¿Cual es la mejor cerveza argentina? Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted April 4, 2016 Share Posted April 4, 2016 Espero que haya por lo menos un mate para mi J. Quote Link to comment Share on other sites More sharing options...
Eric Cardenas Posted April 4, 2016 Share Posted April 4, 2016 Now we're talking! Un mate con malicia para todos. Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted April 5, 2016 Share Posted April 5, 2016 mate con malicia Didn't know that one, sounds like a killer! J. Quote Link to comment Share on other sites More sharing options...
gpiccolini Posted April 6, 2016 Author Share Posted April 6, 2016 well, we can drink a Patagonia beer (I'm writing in english because that's the forum language, but it seems there's room for a spanish one!) or mate if you prefer... at home, without sugar, as with it is traditionally for ladies and children both at the same time will mess your stomach! but my offer is firm Quote Link to comment Share on other sites More sharing options...
Eric Cardenas Posted April 6, 2016 Share Posted April 6, 2016 The Patagonia sounds like a lovely treat. Cheers! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.