Espressit Posted June 22, 2022 Share Posted June 22, 2022 Hi all, I've started creating a Scripter script to control my CP73 from Logic and MainStage. Sharing it here for any other CP owners who would like to do the same. At the moment it just turns on/off sections and allows you to select voices for each section. I plan to add more functionality in near future, so will post an update with newer versions 🙂 /* * Control CP73 from Logic/Mainstage Scripter * Author: Andrew Gibson andrew@nlytx.io * Version: 0.1 - 2022-06-22 */ var cp73parameters = { "config": { "version": "1.5.0" }, "PIANO": { "section_control": { "on/off": {"kind":"toggle","cc": 102,"values": [0,127]} }, "voice_bank": [ {"name": "Grand Piano", "voices": [ {"name": "CFX","cc": 12,"value": 1}, {"name": "Imperial","cc": 12,"value": 2}, {"name": "S700","cc": 12,"value": 3}, {"name": "Digi Piano","cc": 12,"value": 4}, {"name": "C7","cc": 12,"value": 58}, {"name": "CF3","cc": 12,"value": 92}, {"name": "Nashville","cc": 12,"value": 95}, {"name": "Live CF3","cc": 12,"value": 96}, {"name": "Hamburg Grand","cc": 12,"value": 107}, ]}, {"name": "Upright Piano", "voices": [ {"name": "U1","cc": 12,"value": 5}, {"name": "SU7","cc": 12,"value": 6}, {"name": "Felt Piano","cc": 12,"value": 108}, ]}, {"name": "CP", "voices": [ {"name": "CP80 1","cc": 12,"value": 7}, {"name": "CP80 2","cc": 12,"value": 8}, ]}, {"name": "Layered Piano", "voices": [ {"name": "Piano Strings","cc": 12,"value": 9}, {"name": "Piano Synth","cc": 12,"value": 10}, ]} ] }, "EPIANO": { "section_control": { "on/off": {"kind":"toggle","cc": 106,"values": [0,127]} }, "voice_bank": [ {"name": "Rhodes", "voices": [ {"name": "78Rd","cc": 18,"value": 11}, {"name": "75Rd Funky","cc": 18,"value": 12}, {"name": "73Rd","cc": 18,"value": 13}, {"name": "67Rd Dark","cc": 18,"value": 59}, {"name": "67Rd Bright","cc": 18,"value": 60}, {"name": "73Rd Studio","cc": 18,"value": 93}, {"name": "74Rd Stage","cc": 18,"value": 94}, ]}, {"name": "Wurlie", "voices": [ {"name": "Wr Warm","cc": 18,"value": 14}, {"name": "Wr Bright","cc": 18,"value": 15}, {"name": "Wr Wide","cc": 18,"value": 61}, ]}, {"name": "Clav", "voices": [ {"name": "Clavi B","cc": 18,"value": 16}, {"name": "Clavi S","cc": 18,"value": 17}, {"name": "Harpsichord","cc": 18,"value": 18}, ]}, {"name": "DX", "voices": [ {"name": "DX Legend","cc": 18,"value": 19}, {"name": "DX Woody","cc": 18,"value": 20}, {"name": "DX FTine","cc": 18,"value": 21}, {"name": "DX7 II","cc": 18,"value": 22}, {"name": "DX Mellow","cc": 18,"value": 23}, {"name": "DX Crisp","cc": 18,"value": 24}, ]}, ] }, "SUB": { "section_control": { "on/off": {"kind":"toggle","cc": 111,"values": [0,127]} }, "voice_bank": [ {"name": "Pad/Strings", "voices": [ {"name": "Mellow Pad","cc": 29,"value": 25}, {"name": "Spectrum","cc": 29,"value": 26}, {"name": "Back Pad","cc": 29,"value": 27}, {"name": "Air Choir","cc": 29,"value": 28}, {"name": "Natural Str","cc": 29,"value": 29}, {"name": "Warm Strings","cc": 29,"value": 30}, {"name": "OB Strings","cc": 29,"value": 31}, {"name": "Section Str","cc": 29,"value": 32}, {"name": "Fat Saw Pad","cc": 29,"value": 62}, {"name": "Noble Pad","cc": 29,"value": 63}, {"name": "Pop Pad","cc": 29,"value": 64}, {"name": "Analog Pad","cc": 29,"value": 65}, {"name": "Itopia","cc": 29,"value": 66}, {"name": "Marcato Str","cc": 29,"value": 67}, {"name": "Slow Str","cc": 29,"value": 68}, {"name": "Tape Str","cc": 29,"value": 69}, {"name": "Oct Syn Str","cc": 29,"value": 70}, {"name": "Angel Pad","cc": 29,"value": 97}, {"name": "Mystic Pad","cc": 29,"value": 98}, {"name": "JP Strings","cc": 29,"value": 99}, {"name": "Pop Syn Str","cc": 29,"value": 100}, {"name": "Fast Strings","cc": 29,"value": 101}, {"name": "Pizzicato","cc": 29,"value": 102}, {"name": "Dark Light","cc": 29,"value": 109}, {"name": "Digi Pad","cc": 29,"value": 110}, {"name": "Lite Strings","cc": 29,"value": 111}, {"name": "Unison Str","cc": 29,"value": 112}, {"name": "Violin","cc": 29,"value": 113}, {"name": "Cello","cc": 29,"value": 114}, ]}, {"name": "Organ", "voices": [ {"name": "Bright Bars","cc": 29,"value": 33}, {"name": "Click Organ","cc": 29,"value": 34}, {"name": "Draw Organ 1","cc": 29,"value": 35}, {"name": "All Bars Out","cc": 29,"value": 36}, {"name": "Draw Organ 2","cc": 29,"value": 37}, {"name": "60s Combo","cc": 29,"value": 38}, {"name": "Compact","cc": 29,"value": 39}, {"name": "Panther","cc": 29,"value": 40}, {"name": "Pipe Organ 1","cc": 29,"value": 41}, {"name": "Pipe Organ 2","cc": 29,"value": 42}, {"name": "Accordion","cc": 29,"value": 103}, {"name": "Musette","cc": 29,"value": 115}, ]}, {"name": "Chromatic Perc.", "voices": [ {"name": "Glocken","cc": 29,"value": 43}, {"name": "Vibraphone","cc": 29,"value": 44}, {"name": "Xylophone","cc": 29,"value": 45}, {"name": "Marimba","cc": 29,"value": 46}, {"name": "Brightness","cc": 29,"value": 47}, {"name": "Nice Bell","cc": 29,"value": 48}, {"name": "Stack Bell","cc": 29,"value": 49}, {"name": "Jazz Vibes","cc": 29,"value": 71}, {"name": "Marimba 2","cc": 29,"value": 72}, {"name": "Kalimba","cc": 29,"value": 73}, {"name": "Heaven Bell","cc": 29,"value": 74}, ]}, {"name": "Others", "voices": [ {"name": "Syn Lead 1","cc": 29,"value": 50}, {"name": "Syn Lead 2","cc": 29,"value": 51}, {"name": "Syn Brass","cc": 29,"value": 52}, {"name": "E.Bass","cc": 29,"value": 53}, {"name": "A.Bass","cc": 29,"value": 54}, {"name": "Steel Gt","cc": 29,"value": 55}, {"name": "Clean Gt","cc": 29,"value": 56}, {"name": "Syn Brass","cc": 29,"value": 57}, {"name": "Sine Lead","cc": 29,"value": 75}, {"name": "Sync Saw","cc": 29,"value": 76}, {"name": "Dirty Hook","cc": 29,"value": 77}, {"name": "Classic Mini","cc": 29,"value": 78}, {"name": "Funky Mini","cc": 29,"value": 79}, {"name": "Nu Mini","cc": 29,"value": 80}, {"name": "80s Pop Bass","cc": 29,"value": 81}, {"name": "Sub Bass","cc": 29,"value": 82}, {"name": "Unison Bass","cc": 29,"value": 83}, {"name": "Finger Bass","cc": 29,"value": 84}, {"name": "Brass","cc": 29,"value": 85}, {"name": "Syn Brass 2","cc": 29,"value": 86}, {"name": "OB Brass 1","cc": 29,"value": 87}, {"name": "OB Brass 2","cc": 29,"value": 88}, {"name": "Jazz Flute","cc": 29,"value": 89}, {"name": "Tape Flute","cc": 29,"value": 90}, {"name": "Harmonica","cc": 29,"value": 91}, {"name": "Classic Gt","cc": 29,"value": 104}, {"name": "Steel Gt 2","cc": 29,"value": 105}, {"name": "Sf. Brass","cc": 29,"value": 106}, {"name": "12Strings Gt","cc": 29,"value": 116}, {"name": "Clean Gt 2","cc": 29,"value": 117}, {"name": "Syn Brass 3","cc": 29,"value": 118}, {"name": "Horn","cc": 29,"value": 119}, {"name": "Sax Section","cc": 29,"value": 120}, {"name": "Soprano Sax","cc": 29,"value": 121}, {"name": "Alto Sax","cc": 29,"value": 122}, {"name": "Tenor Sax","cc": 29,"value": 123}, {"name": "Baritone Sax","cc": 29,"value": 124}, {"name": "Soft Square","cc": 29,"value": 125}, {"name": "Calliope Lead","cc": 29,"value": 126}, {"name": "1o1 Bass","cc": 29,"value": 127}, ]}, ] } }; // Scripter variable for UI var PluginParameters = []; // Corresponding MIDI send values var controlValues = []; //Build sections var sections = [{"name":"PIANO","voices_label":"Piano voice"}, {"name":"EPIANO","voices_label":"EPiano voice"}, {"name":"SUB","voices_label":"Sub voice"}]; sections.forEach(section => { var section_voices = []; var section_controls = []; cp73parameters[section.name]["voice_bank"].forEach(bank => { bank["voices"].forEach(voice => { section_voices.push(voice["name"]); section_controls.push(voice); }) }); // For the plugin UI PluginParameters.push({name: section.name, type:"checkbox", defaultValue:1}); PluginParameters. push({name: section.voices_label, type:"menu", valueStrings: section_voices, defaultValue:0}); // For the MIDI send controlValues.push(cp73parameters[section.name]["section_control"]["on/off"]); controlValues.push(section_controls); }); // On parameter change, send midi to CP73 function ParameterChanged(param_num, value) { var selected_param = controlValues[param_num]; var cc = new ControlChange; switch(selected_param.kind) { case "toggle": cc.value = selected_param.values[value]; //probably 127 cc.number = selected_param.cc; break; default: // voices don't have a 'kind' cc.value = selected_param[value].value; cc.number = selected_param[value].cc; } cc.send(); Trace(cc.toString()); } 2 Quote Link to comment Share on other sites More sharing options...
Atlas007 Posted June 22, 2022 Share Posted June 22, 2022 Hey Espressit! Thanx for sharing! 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.