nevermore2k Posted July 18, 2013 Share Posted July 18, 2013 Just a short Test. U need to use the automation to record these Program Changes. var PluginParameters = [{name:"ProgramChange", defaultValue:3, minValue:0, maxValue:5, numberOfSteps:5, unit:"octaves", type:"lin"}]; function HandleMIDI(event) { event.trace(); event.send(); } function ParameterChanged(param, value) { if(param == 0){ var program =GetParameter("ProgramChange"); var pc = new ProgramChange; pc.number = program; pc.send(); pc.trace(); } } Quote Link to comment Share on other sites More sharing options...
David Nahmani Posted July 18, 2013 Share Posted July 18, 2013 I'm sorry... what is this and how do you use it? Quote Link to comment Share on other sites More sharing options...
nevermore2k Posted July 18, 2013 Author Share Posted July 18, 2013 Okay, For example Load a Instance of Kontakt, Insert an Instrument Bank, and load instruments into this. For examples Legato Strings, Staccati Strings and so on. Then insert the Scripter Plugin and paste the Code into it. Then Assign the Intelligent Automation Controls ("b") to the Scriptor Fader. now u can change the Artikulations via the the new Automation Controll Tool. sorry for my bad english Quote Link to comment Share on other sites More sharing options...
Chris Rickwood Posted July 20, 2013 Share Posted July 20, 2013 Yes, for custom keyswitches in in Kontakt. Because drawing in program changes in hyperdraw is super tedious. Also, instrument tracks don't transmit program changes from an external controller to Kontakt for some reason. You would always have to use an external MIDI track hooked up in the environment. Not sure why. This is a nice solution for that too. Quote Link to comment Share on other sites More sharing options...
nevermore2k Posted July 20, 2013 Author Share Posted July 20, 2013 maybe you have an idea of how to make this script better i did not find a solution for writing the data direct into the midi file. may u have an idea how to do that Quote Link to comment Share on other sites More sharing options...
Chris Rickwood Posted July 20, 2013 Share Posted July 20, 2013 Unfortunately, no. I tried to do the same thing but you can only record it as automation. Quote Link to comment Share on other sites More sharing options...
nevermore2k Posted July 20, 2013 Author Share Posted July 20, 2013 good to know that someone else try the same thing Quote Link to comment Share on other sites More sharing options...
FredBegin Posted July 22, 2013 Share Posted July 22, 2013 Just a short Test. U need to use the automation to record these Program Changes. Hi, Your script as been really usefull for me. I have absolutly no coding experience. I have adapt your script for my use with Vienna instruments Pro. Instead of a fader it's a menu and it sends cc12 instead of progchange. var PluginParameters = [{name:"Keyswitch", type: "menu", defaultValue:1, minValue:0, maxValue:127, numberOfSteps:12, valueStrings:["Staccato", "Sustain", "fp","Legato", "Protamento", "pTrill", "rep", "FastRep,", "9", "10", "11", "Pizz"]}]; function HandleMIDI(event) { event.trace(); event.send(); } function ParameterChanged(param, value) { if(param == 0){ var KS =GetParameter("Keyswitch"); var x = new ControlChange; x.number = 12; x.value = KS*11; x.send(); x.trace(); } } 2 two things I can't figure out: 1-How to send midi to more than one midi channel at a time in case I want to use multi instruments such VE Pro? I only know the function x.channel = (number), but it work only on one channel. 2-How to send more than one event, in this case midi cc? I wish I could select ''staccato'' in the menu and send a specific CC12 and CC13 value. In fact I'm trying to create an Expression Map à la Cubase but I'm not enough familiar with midi javascript at the moment. And here's another script to be able to write midi controller data in the automation track. You can change the cc number as you wish: var PluginParameters = [{name:"VXF", type: "lin", defaultValue:1, minValue:0, maxValue:127, numberOfSteps:127}]; function HandleMIDI(event) { event.trace(); event.send(); } function ParameterChanged(param, value) { if(param == 0){ var VXF =GetParameter("VXF"); var cc = new ControlChange; cc.number = 1; cc.value = VXF; cc.send(); cc.trace(); } } Here again, I wish i know how to create a second slider with a different CC. Thanks for any help! Fred Quote Link to comment Share on other sites More sharing options...
nevermore2k Posted July 23, 2013 Author Share Posted July 23, 2013 Thanks for Sharing your Code I use VSL Stuff here by myself. I Modified your code. If u didnt post your code fragment i didnt get the idea to do this Hope that will help you. By the Way would be cool if you share any changes.. // Global Definition for controller X Y for switching in the artikulation row. Feel free to change the number. var x = new ControlChange; var y = new ControlChange; x.number = 12; y.number = 1; // standart Event Handling function HandleMIDI(event) { event.trace(); event.send(); } // For Switching the Articulation (Expression) Every Name in the Plugin Parameter does have an own number // the First is 0, Second 1 , Third 2 and so on. function parameterSwitch(){ if (expression == 0) { x.value = 0; y.value = 0; } if (expression == 1) { x.value = 19; y.value = 0; } if (expression == 2) { x.value = 37; y.value = 0; } if (expression == 3) { x.value = 73; y.value = 0; } if (expression == 10) { x.value = 0; y.value = 127; } if (expression == 11) { x.value = 40; y.value = 127; } if (expression == 12) { x.value = 60; y.value = 127; } } //----------------------------------------- // Define the Names as u Wish. var PluginParameters = [{name:"Keyswitch", type: "menu", valueStrings:["Staccato", "Sustain", "fp", "Legato", "Protamento", "pTrill", "rep", "FastRep,", "Pizz", "SecRow1", "SecRow2", "SecRow3"]}]; var expression = 0; // Now these happens when i change something // First i say the Var expression should get the Value of PluginParameters // then the function parameterSwitch(); should be called. And then send x and y. function ParameterChanged(param, value) { expression = value; parameterSwitch(); x.send(); y.send(); x.trace(); y.trace(); } Quote Link to comment Share on other sites More sharing options...
FredBegin Posted July 24, 2013 Share Posted July 24, 2013 Thank you so much for upgrading the code!. I will check try it out when I come back from vacation. Do you know a simple good way to learn javascript programming? Quote Link to comment Share on other sites More sharing options...
nevermore2k Posted July 24, 2013 Author Share Posted July 24, 2013 You are welcome. i learned C and Objective C. never learned javascript. its the first time for me. java script seems very similar to C. Maybe check out a book store or some Javascript for Dummys (They are realy great books ! ) you just need to get the fundamentals of programming, like how to use "If and else" , variable decloration and so on, how does a function work. They are allmost the same in every programming language... but they have allways an other slang. Sometimes u need some () instead of [] or sometimes u are able to use dots sometimes not. But i think C would be a good start, or a Javascript for Dummy book. if you are into it, and take a look at the different languages, it will be like the difference between American english and UK English. Quote Link to comment Share on other sites More sharing options...
Chris Rickwood Posted July 25, 2013 Share Posted July 25, 2013 http://www.codecademy.com/ is a pretty good way to learn the basics. Quote Link to comment Share on other sites More sharing options...
nevermore2k Posted July 26, 2013 Author Share Posted July 26, 2013 thats nice ! Quote Link to comment Share on other sites More sharing options...
anp27 Posted September 1, 2013 Share Posted September 1, 2013 And here's another script to be able to write midi controller data in the automation track. You can change the cc number as you wish: var PluginParameters = [{name:"VXF", type: "lin", defaultValue:1, minValue:0, maxValue:127, numberOfSteps:127}]; function HandleMIDI(event) { event.trace(); event.send(); } function ParameterChanged(param, value) { if(param == 0){ var VXF =GetParameter("VXF"); var cc = new ControlChange; cc.number = 1; cc.value = VXF; cc.send(); cc.trace(); } } Here again, I wish i know how to create a second slider with a different CC. Thanks for any help! Fred Can you please elaborate? Which "automation track" are you referring to? Quote Link to comment Share on other sites More sharing options...
FredBegin Posted September 4, 2013 Share Posted September 4, 2013 And here's another script to be able to write midi controller data in the automation track. You can change the cc number as you wish: var PluginParameters = [{name:"VXF", type: "lin", defaultValue:1, minValue:0, maxValue:127, numberOfSteps:127}]; function HandleMIDI(event) { event.trace(); event.send(); } function ParameterChanged(param, value) { if(param == 0){ var VXF =GetParameter("VXF"); var cc = new ControlChange; cc.number = 1; cc.value = VXF; cc.send(); cc.trace(); } } Here again, I wish i know how to create a second slider with a different CC. Thanks for any help! Fred Can you please elaborate? Which "automation track" are you referring to? Yes. It's the instrument track on wich you put the scripter plugin. simply put the track in touch, latch or write mode and move the slider. Fred Quote Link to comment Share on other sites More sharing options...
anp27 Posted September 7, 2013 Share Posted September 7, 2013 Yes. It's the instrument track on wich you put the scripter plugin. simply put the track in touch, latch or write mode and move the slider. Fred Got it, thanks. Also, I think this post should be moved to the Midi Scripter section instead of this one. Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted September 7, 2013 Share Posted September 7, 2013 I think this post should be moved to the Midi Scripter section instead of this one. Me, too J. Quote Link to comment Share on other sites More sharing options...
anp27 Posted September 7, 2013 Share Posted September 7, 2013 Thank you to the person who moved this post! Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted September 7, 2013 Share Posted September 7, 2013 Thank you to the person who moved this post! I think I used the wrong smiley....this is the correct one: J. Quote Link to comment Share on other sites More sharing options...
anp27 Posted September 7, 2013 Share Posted September 7, 2013 Nooooooooooooowwwwww I get it... thanks Jordi! Quote Link to comment Share on other sites More sharing options...
Jordi Torres Posted September 7, 2013 Share Posted September 7, 2013 Heh heh J. 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.