├── Big Bob ├── Math Library │ ├── V215 │ │ ├── K2PanTest_KS.txt │ │ ├── KSPMathTechGuide_V215.pdf │ │ ├── KSPMathUserGuide_V215.pdf │ │ ├── KSPMathV215_KSM.txt │ │ ├── Readme.txt │ │ ├── XFadeDemo#1.nki │ │ ├── XFadeDemo#1_KS.txt │ │ ├── XFadeDemo#2.nki │ │ └── XFadeDemo#2_KS.txt │ ├── V451 │ │ ├── Demo-Instruments │ │ │ ├── Data │ │ │ │ ├── FExp.nka │ │ │ │ ├── FLog.nka │ │ │ │ └── FSin.nka │ │ │ ├── NKA_Writer.nki │ │ │ ├── NKA_Writer.nkr │ │ │ └── XFadeDemo.nki │ │ ├── Docs │ │ │ └── KSPMathUserGuide_V451.pdf │ │ └── KSE Scripts │ │ │ ├── KSPMathV451.txt │ │ │ └── NKA_Utility.txt │ ├── V610 │ │ ├── Demo-Instruments │ │ │ ├── DB-Demo.nki │ │ │ └── XFadeDemo.nki │ │ ├── Docs │ │ │ ├── KSPMathUserGuide_V610.pdf │ │ │ └── Readme_V610.txt │ │ └── KSE Scripts │ │ │ ├── Demo Scripts │ │ │ ├── DB-Demo.ksp │ │ │ ├── KSPMathV610.ksp │ │ │ └── XFadeDemo.ksp │ │ │ └── KSPMathV610.ksp │ ├── V701 │ │ ├── Demo-Instruments │ │ │ ├── DB-Demo.nki │ │ │ └── XFadeDemo.nki │ │ ├── Docs │ │ │ ├── KSPMathUserGuide_V701.pdf │ │ │ └── Readme_V701.txt │ │ └── KSE Scripts │ │ │ ├── Demo Scripts │ │ │ ├── DB-Demo.ksp │ │ │ ├── KSPMathV701.ksp │ │ │ └── XFadeDemo.ksp │ │ │ └── KSPMathV701.ksp │ └── V702 │ │ ├── Demo-Instruments │ │ ├── DB-Demo.nki │ │ └── XFadeDemo.nki │ │ ├── Docs │ │ ├── KSPMathUserGuide_V702.pdf │ │ └── Readme_V702.txt │ │ └── KSE Scripts │ │ ├── Demo Scripts │ │ ├── DB-Demo.ksp │ │ ├── KSPMathV702.ksp │ │ └── XFadeDemo.ksp │ │ └── KSPMathV702.ksp ├── SIPS │ ├── Documentation │ │ ├── Readme_V2.txt │ │ ├── SIPS-User'sGuide_V151.pdf │ │ └── SIPS-User'sGuide_V205.pdf │ ├── SIPS Scripts │ │ ├── KR-Source │ │ │ ├── SIPS-Articulation-V205_KR.txt │ │ │ ├── SIPS-Legato-V205_KR.ksp │ │ │ ├── SIPS-Legato-V2U_KR.txt │ │ │ ├── SIPS-Starter-V205_KR.txt │ │ │ ├── SIPS-SuperBender-V100_KR.txt │ │ │ ├── SIPS-Vibrato-V205_KR.txt │ │ │ └── SIPS-Vibrato-V2U_KR.txt │ │ ├── KS-Source │ │ │ ├── SIPS Modules │ │ │ │ ├── SXM-GSR-V205_KSM.txt │ │ │ │ ├── SXM-SAS-V205_KSM.txt │ │ │ │ ├── SXM-SLS-V205_KSM.txt │ │ │ │ ├── SXM-SVS-V205_KSM.txt │ │ │ │ ├── SXM-UIC-V205_KSM.txt │ │ │ │ └── SXM-UPS-V205_KSM.txt │ │ │ ├── SIPS-Articulation-V205_KS.txt │ │ │ ├── SIPS-Legato-V205_KS.txt │ │ │ ├── SIPS-Starter-V205_KS.txt │ │ │ ├── SIPS-Vibrato-V205_KS.txt │ │ │ ├── SuperBender-V100_KS.txt │ │ │ └── Support Modules │ │ │ │ ├── ISCS-V215_KSM.txt │ │ │ │ └── KSPMathV205_KSM.txt │ │ └── Precompiled │ │ │ ├── No MultiScript.nkm │ │ │ ├── SIPS-Articulation-V205.nkp │ │ │ ├── SIPS-Legato-V205.nkp │ │ │ ├── SIPS-Starter-V205.nkp │ │ │ ├── SIPS-Vibrato-V205.nkp │ │ │ ├── SIPS_KSP+.nkm │ │ │ └── SuperBender-V100.nkp │ └── Wallpaper │ │ └── SIPS2 .tga ├── TCM-UserGuide.pdf └── WIPS │ ├── Docs │ ├── AETGuidePart1.pdf │ ├── AETGuidePart2.pdf │ ├── Readme.doc │ ├── Readme.pdf │ ├── TCM-UserGuide.pdf │ ├── VirtualWindIntruments.pdf │ ├── WIPS-UserGuide.pdf │ └── WIPS-UserGuideV104.pdf │ ├── WIPS Example │ ├── Instruments │ │ └── Wips Example.nki │ ├── Samples │ │ ├── trumpet-a#3.ncw │ │ ├── trumpet-a#4.ncw │ │ ├── trumpet-a#5.ncw │ │ ├── trumpet-c#4.ncw │ │ ├── trumpet-c#5.ncw │ │ ├── trumpet-c#6.ncw │ │ ├── trumpet-e3.ncw │ │ ├── trumpet-e4.ncw │ │ ├── trumpet-e5.ncw │ │ ├── trumpet-e6.ncw │ │ ├── trumpet-g3.ncw │ │ ├── trumpet-g4.ncw │ │ └── trumpet-g5.ncw │ ├── WIPSV104.nkc │ └── WIPSV104.nkr │ └── WIPS V103 Editable │ ├── NKP Files │ ├── PCMapper.nkp │ ├── WIPSV103-Art.nkp │ ├── WIPSV103-Leg.nkp │ └── WIPSV103-Vib.nkp │ ├── Scripts │ ├── WIPS_articulation.ksp │ ├── WIPS_legato.ksp │ └── WIPS_vibrato.ksp │ └── WIPS_Resources │ ├── Data │ └── FSin.nka │ ├── Resources │ └── pictures │ │ ├── rdvBG24.png │ │ ├── rdvBG24.txt │ │ ├── rdvBlk_Skin.png │ │ ├── rdvBlk_Skin.txt │ │ ├── rdvCheckBox_Blk.png │ │ ├── rdvCheckBox_Blk.txt │ │ ├── rdvCheckBox_Wht.png │ │ ├── rdvCheckBox_Wht.txt │ │ ├── rdvClr_Skin.png │ │ ├── rdvClr_Skin.txt │ │ ├── rdvCurves_ExpDn.png │ │ ├── rdvCurves_ExpDn.txt │ │ ├── rdvCurves_ExpUp.png │ │ ├── rdvCurves_ExpUp.txt │ │ ├── rdvCurves_SDn.png │ │ ├── rdvCurves_SDn.txt │ │ ├── rdvCurves_SUp.png │ │ ├── rdvCurves_SUp.txt │ │ ├── rdvFloat_Caption.png │ │ ├── rdvFloat_Caption.txt │ │ ├── rdvGrayedDelay.png │ │ ├── rdvGrayedDelay.txt │ │ ├── rdvLIstBox_ScrollDn.txt │ │ ├── rdvListBox_ClearBtn.png │ │ ├── rdvListBox_ClearBtn.txt │ │ ├── rdvListBox_Left.png │ │ ├── rdvListBox_Left.txt │ │ ├── rdvListBox_Right.png │ │ ├── rdvListBox_Right.txt │ │ ├── rdvListBox_ScrollDn.png │ │ ├── rdvListBox_ScrollUp.png │ │ ├── rdvListBox_ScrollUp.txt │ │ ├── rdvListBox_Select.png │ │ ├── rdvListBox_Select.txt │ │ ├── rdvLogo_Leg.png │ │ ├── rdvLogo_Leg.txt │ │ ├── rdvLogo_Play.png │ │ ├── rdvLogo_Play.txt │ │ ├── rdvLogo_Setup.png │ │ ├── rdvLogo_Setup.txt │ │ ├── rdvLogo_Vib.png │ │ ├── rdvLogo_Vib.txt │ │ ├── rdvRedBlu_Dots.png │ │ ├── rdvRedBlu_Dots.txt │ │ ├── rdvRedBlu_Ring.png │ │ ├── rdvRedBlu_Ring.txt │ │ ├── rdvRedBtn.png │ │ ├── rdvRedBtn.txt │ │ ├── rdvSliderB1.png │ │ ├── rdvSliderB1.txt │ │ ├── rdvSliderB2.png │ │ ├── rdvSliderB2.txt │ │ ├── rdvSliderScale.png │ │ ├── rdvSliderScale.txt │ │ ├── rdvSliderU2.png │ │ └── rdvSliderU2.txt │ ├── WIPSV103.nkc │ └── WIPSV103.nkr ├── Kontakt Font Reference.jpg ├── LICENSE ├── README.md ├── libraries ├── arrays.ksp ├── helpers.ksp ├── rr.ksp ├── ui.ksp └── units.ksp └── modules ├── Coarse and fine tuning.ksp ├── Multi Channel Instrument Thing.ksp ├── Retriggerer.ksp ├── keyboard colour changer k4.ksp ├── keyboard colour changer k5.ksp └── x y pad.ksp /Big Bob/Math Library/V215/K2PanTest_KS.txt: -------------------------------------------------------------------------------- 1 | { Test Script for K2's change_pan() function } 2 | 3 | on init 4 | declare ui_button PanTest 5 | set_text(PanTest,'KSP Panning Test') 6 | declare PanX { Pan control variable, -1000 to +1000 } 7 | declare id 8 | message('') 9 | end on 10 | 11 | on ui_control (PanTest) 12 | note_off(ALL_EVENTS) { Terminate any leftover test notes } 13 | if (PanTest = 1) 14 | id := play_note(64,1,0,0) { Start center-panned Trombone sample } 15 | end if 16 | end on { PanTest button } 17 | 18 | on controller 19 | if (CC_NUM = 128) { If PW has changed } 20 | PanX := 1000*CC[128]/8191 { Map PW to -1005, 0, +1005 } 21 | change_pan(id,PanX,0) { Set Pan position per PanX } 22 | message('PanX = ' & PanX) 23 | end if 24 | end on 25 | 26 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V215/KSPMathTechGuide_V215.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V215/KSPMathTechGuide_V215.pdf -------------------------------------------------------------------------------- /Big Bob/Math Library/V215/KSPMathUserGuide_V215.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V215/KSPMathUserGuide_V215.pdf -------------------------------------------------------------------------------- /Big Bob/Math Library/V215/Readme.txt: -------------------------------------------------------------------------------- 1 | Readme File, for KSP Math Library 2 | V215 March 2009 3 | 4 | This release adds a number of useful format-conversion routines, bringing the total to 18 (not counting the legacy Get_db and the CVHex utility). VR_to_mdb was altered to use the fast Log10 routine instead of the extended XLog10 routine. With this release, the Get_db routine is now provided for backward compatibility only. New scripts should always use VR_to_mdb because it will execute faster and has a greater operating range. 5 | 6 | In V210, some of the format-conversion routines included code to 'clamp' the input or output to the operating range for the routine. For V215, all such limit clamping code was removed to make the routines leaner and meaner for the majority of situations. Thus it is assumed that your script will not attempt to use these routines outside of their usual operating range. If you need to use one of these format-conversion routines in a context where the valid input range might be exceeded (and you want to prevent this), your script will need to provide any needed limit testing and clamping. None of the routines will do anything crazy if you exceed their normal input range, but, the results returned may or may not be correct (depending on the routine and how far out of range you are). Please refer to the header comments of the individual routines for more information. 7 | 8 | In addition, minor changes have been made to some of the format-conversion routines to improve their arithmetic accuracy slightly. So, in some cases, you may notice a small difference in the output for a given input (usually toward more accuracy) for these routines compared with their V210 counterparts. 9 | 10 | The main library header comments have been revised and information on Input/Output parameter passing has been added. Please read this carefully to avoid any problems with using the library routines. Minor updates and corrections were made to the User's Guide to bring it current. The Technical Guide has been extensively revised and expanded. It now includes a new section 6.0 which discusses the details of how the format-conversion routines are coded. 11 | 12 | Prior Version Summary 13 | 14 | V210 January 2009 15 | The cube root routine, Root3, and the Pitch_to_ep format-conversion routine was added. The documentation was revised and updated. Execution time benchmarks were added to the Technical Guide. A test utility routine was also added to enable easy display of numbers in hexadecimal. 16 | 17 | V200..205 April 2008 18 | V200 with some minor revisions through V205, added several new basic functions including the extended-precision Log and the Exponential routines. In addition, four more format-conversion routines were added. 19 | 20 | The User's Guide and Technical Guides were revised and expanded. A second EPXF Tutorial was added to the User's Guide to demonstrate how to perform EPXF via engine parameter control of groups. 21 | 22 | V105 December 2006 23 | This was the first 'official' release of the KSP Math Library Package. It contained the trig and fast log functions, ATFade and one format-conversion routine, Get_db. 24 | 25 | Documentation included the User's Guide (with the first Equal-Power Crossfade Tutorial) and the Technical Guide for the included functions. -------------------------------------------------------------------------------- /Big Bob/Math Library/V215/XFadeDemo#1.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V215/XFadeDemo#1.nki -------------------------------------------------------------------------------- /Big Bob/Math Library/V215/XFadeDemo#1_KS.txt: -------------------------------------------------------------------------------- 1 | { --------------------------------------------------------------------- 2 | Title: Equal-Power Crossfade Demo#1 Script 3 | Uses: "KSPMath_V200.txt" 4 | Author: R.D.Villwock aka 'Big Bob' 5 | First Written: March 13, 2006 6 | Current Version: 1.02 7 | Last Modified: March 6, 2009 8 | ---------------------------------------------------------------------- 9 | This Script illustrates how to use the KSP Math Library functions to 10 | effect equal-power crossfades. This script should be used in conjunction 11 | with the provided instrument file named XFadeDemo#1.nki. The instrument 12 | uses only a few very short looped samples and therefore the entire 13 | instrument with the samples and the script is provided in monolith 14 | format with a file of less than 10K bytes. 15 | 16 | The instrument has a sustained trombone tone (with a pitch of F3) assigned 17 | to 3 keys and a sustained clarinet tone (F3) assigned to one key. The 18 | trombone on C3 is panned hard left and the trombone on C4 is panned hard 19 | right. The trombone on E3 is panned center as is the clarinet on G3. 20 | 21 | This demo script has two operating modes that trigger these notes in pairs. 22 | Demo Mode #1, the 'Panning Demo' triggers C3 and C4 together while Demo 23 | Mode #2, the 'Morphing Demo', triggers E3 and G3 together. The change_vol() 24 | function is employed to crossfade between these note pairs to illustrate 25 | how you can use the KSP Math Library functions to implement equal-power 26 | crossfading, EPXF, of note pairs. 27 | 28 | Demo Mode #1 illustrates the use of EPXF to effect equal-volume panorama 29 | placement while Demo Mode #2 illustrates the use of EPXF to effect 'morphing' 30 | of two different timbres as might be used in velocity crossfading or 31 | formant-corrected pitch bending. } 32 | 33 | import "KSPMathV215_KSM.txt" 34 | 35 | on init 36 | { MIDI CCs and Notes } 37 | declare const Bender := 128 38 | declare const BoneNote := 64 39 | declare const ClarNote := 67 40 | declare const LeftNote := 60 41 | declare const ModWheel := 1 42 | declare const RightNote := 72 43 | { Pseudo-Call Action Routines. NOTE: Assign these to powers of two } 44 | declare const StartDemo := 1 { 2^0 } 45 | declare const UpdateVolume := 2 { 2^1 } 46 | { Display Captions } 47 | declare @XVcap 48 | XVCap := ' XFade Variable' 49 | declare @X0cap 50 | X0cap := ' Note[0] Level' 51 | declare @X1cap 52 | X1cap := ' Note[1] Level' 53 | declare @XMVcap 54 | XMVcap := ' Master Fader' 55 | { Control Panel Components } 56 | declare ui_button PanDemo 57 | set_text(PanDemo,' Panning Demo') 58 | move_control(PanDemo,1,1) 59 | declare ui_button VelDemo 60 | set_text(VelDemo,'Vel XFade Demo') 61 | move_control(VelDemo,1,2) 62 | declare ui_label XV (1,2) 63 | move_control(XV,2,1) 64 | set_text(XV,XVcap) 65 | declare ui_label X0 (1,2) 66 | move_control(X0,3,1) 67 | set_text(X0,X0cap) 68 | declare ui_label X1 (1,2) 69 | move_control(X1,4,1) 70 | set_text(X1,X1cap) 71 | declare ui_label XMV (1,2) 72 | move_control(XMV,5,1) 73 | set_text(XMV,XMVcap) 74 | declare ui_knob Range (0,100,1) 75 | set_text(Range,'VolRange') 76 | set_knob_unit(Range,KNOB_UNIT_PERCENT) 77 | move_control(Range,6,1) 78 | Range := 75 79 | { Simple Variables } 80 | declare Actions { List of actions to be performed at pseudo-call handler } 81 | declare CallActv { Semaphore to allow only one pseudo call at a time } 82 | declare Call_id { Event id for pseudo-call note } 83 | declare MWV { ModWheel value } 84 | declare PWV { Pitch Wheel value } 85 | declare XFV { XFade control variable } 86 | { Binary Arrays for note-pair parameters } 87 | declare 0db[2] { Amount of mdb to restore change_vol back to 0db reference } 88 | declare Xnote[2] { MIDI note numbers to be crossfaded } 89 | declare xid[2] { IDs for Note 0 and Note 1 } 90 | { Remember These Settings } 91 | make_persistent(Range) 92 | make_persistent(MWV) 93 | make_persistent(PWV) 94 | { Clear K2 Status Line } 95 | message('') 96 | end on { init } 97 | 98 | on note 99 | ignore_event(EVENT_ID) { No keyboard notes used } 100 | end on { note } 101 | 102 | on release 103 | XEQ_Call { If this is a pseudo-call, execute action routine(s) } 104 | end on { release } 105 | 106 | on controller 107 | if ((CC_NUM = Bender) or (CC_NUM = ModWheel)) 108 | MWV := %CC[ModWheel] { Update Mod Wheel Value } 109 | PWV := %CC[Bender] { Update Pitch Wheel Value } 110 | Call(UpdateVolume) { Execute a Volume Update } 111 | end if 112 | end on { controller } 113 | 114 | on ui_control (PanDemo) { Mono Signal Panning Demo } 115 | note_off(ALL_EVENTS) { Abort any prior demo notes in process } 116 | if PanDemo = 1 117 | VelDemo := 0 { Cancel Velocity Demo if active } 118 | Call(StartDemo+UpdateVolume) { Start the Panning Demo } 119 | else 120 | PanDemo := 0 { So off-button legend is more visible } 121 | end if 122 | end on { PanDemo Button } 123 | 124 | on ui_control (VelDemo) { Velocity Crossfade Demo } 125 | note_off(ALL_EVENTS) { Abort any prior demo notes in process } 126 | if VelDemo = 1 127 | PanDemo := 0 { Cancel Panning Demo if active } 128 | Call(StartDemo+UpdateVolume) { Start the Velocity Demo } 129 | else 130 | VelDemo := 0 { So off-button legend is more visible } 131 | end if 132 | end on { VelDemo Button } 133 | 134 | on ui_control (Range) { Change 'hot zone' range of Master Fader } 135 | Call(UpdateVolume) { Force an update of volume accordingly } 136 | end on { Fader Range Knob } 137 | 138 | {--------------------- Pseudo-Call and Handler Functions ------------------} 139 | 140 | function Call(cmd) { Pseudo-Call process } 141 | if CallActv = 0 { Only allow if currently inactive } 142 | CallActv := 1 { Lock out any more calls until completed } 143 | Actions := cmd { Action List for XEQ_Call } 144 | Call_id := play_note(0,1,0,1) { Play a very short MIDI Note 0 } 145 | end if { to force-trigger an RCB } 146 | end function { Call } 147 | 148 | function XEQ_Call { Execute Calls when Call_id occurs } 149 | if EVENT_ID = Call_id { Do nothing unless RCB invoked by Call_id event } 150 | if (Actions .and. StartDemo # 0) 151 | NewDemo { Start a new demo per state of Demo Buttons } 152 | end if 153 | if (Actions .and. UpdateVolume # 0) 154 | NewVolume { Update Volume per control settings } 155 | end if 156 | CallActv := 0 { Ready for another pseudo Call } 157 | end if 158 | end function { XEQ_Call } 159 | 160 | {------------- Action Routines for the Pseudo-Call Handler ---------------} 161 | 162 | function NewDemo { Starts a new demo } 163 | if PanDemo = 1 { Play left and right panned notes as notes 0 and 1 } 164 | XNote[0] := LeftNote 165 | XNote[1] := RightNote 166 | else { Play Clarinet and Trombone notes as notes 0 and 1 } 167 | XNote[0] := ClarNote 168 | XNote[1] := BoneNote 169 | end if 170 | xid[0] := play_note(XNote[0],1,0,0) { Start the pair of notes to be } 171 | xid[1] := play_note(XNote[1],1,0,0) { crossfaded per XFV control } 172 | 0db[0] := 0 { Reset change_vol accumulators } 173 | 0db[1] := 0 174 | end function { NewDemo } 175 | 176 | function NewVolume { Updates volume of note 0 and note 1 } 177 | declare n { For-Loop index } 178 | declare Atn[2] { Attenuation from 0 db reference for notes 0 and 1 } 179 | declare Vol[2] { Volume levels for Notes 0 and 1 } 180 | declare MVol { Master Volume level per MWV and Range } 181 | 182 | if PanDemo = 1 { Panning Demo is Active } 183 | XFV := Ang90*(PWV + 8192)/16383 { Map Pitch Wheel to XFV = 0..1000 } 184 | else { Velocity Demo } 185 | XFV := Ang90*MWV/127 { Map Mod Wheel to XFV = 0..1000 } 186 | end if 187 | ATFade(MWV,Range,MVol) { Control master volume with Mod Wheel } 188 | SinCos(XFV,Vol[1],Vol[0]) { Get XFade volume levels per XFV } 189 | for n := 0 to 1 190 | VR_to_mdb(Vol[n],Atn[n]) { Convert XFade volume levels to mdb } 191 | Vol[n] := Atn[n] + MVol { Add Master Volume to both notes } 192 | change_vol(xid[n],0db[n]+Vol[n],1) { Set new volume of note[n] } 193 | 0db[n] := -Vol[n] { Update db accums to get back to 0 db } 194 | end for 195 | ShowData(Atn,MVol) { Display control values } 196 | end function { NewVolume } 197 | 198 | function ShowData(gain,mvol) { Display control values } 199 | set_text(XV,XVcap) { XFade variable 0..1000 } 200 | add_text_line(XV,' ' & XFV) 201 | ShowAtn(gain[0],X0,X0Cap) 202 | ShowAtn(gain[1],X1,X1Cap) 203 | ShowAtn(mvol,XMV,XMVCap) 204 | end function { ShowData } 205 | 206 | function ShowAtn(atn,win,cap) 207 | set_text(win,cap) 208 | if atn = Muted 209 | add_text_line(win,' Muted') 210 | else 211 | add_text_line(win,' ' & atn & ' mdb') 212 | end if 213 | end function { ShowAtn } 214 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V215/XFadeDemo#2.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V215/XFadeDemo#2.nki -------------------------------------------------------------------------------- /Big Bob/Math Library/V215/XFadeDemo#2_KS.txt: -------------------------------------------------------------------------------- 1 | { --------------------------------------------------------------------- 2 | Title: Equal-Power Crossfade Demo#2 Script 3 | Uses: "KSPMath_V200.txt" 4 | Author: R.D.Villwock aka 'Big Bob' 5 | First Written: March 13, 2006 6 | Current Version: 1.02 7 | Last Modified: March 6, 2009 8 | ---------------------------------------------------------------------- 9 | This Script illustrates how to use the KSP Math Library functions to 10 | effect equal-power crossfading of two groups. This script should be used 11 | in conjunction with the provided instrument file named XFadeDemo#2.nki. 12 | The instrument uses only two, very short looped samples and therefore the 13 | entire instrument with the samples and the script is provided in 14 | monolith format with a file size of less than 10K bytes. 15 | 16 | The instrument has a sustained Clarinet tone (with a pitch of F3) assigned 17 | to the F3 key in Group 0 (named 'Lo Vel - Clarinet'). The instrument also has 18 | a sustained Trombone tone (F3) assigned to the F3 key of Group 1 (named 19 | 'Hi Vel - Trombone'). Both samples are panned to the center. 20 | 21 | To play the demo, click on the 'GroupXFade' button and move the Mod Wheel. 22 | See the User's Guide for a full discussion of what this script does. } 23 | 24 | import "KSPMathV215_KSM.txt" 25 | 26 | on init 27 | { MIDI CCs and Notes } 28 | declare const Bender := 128 29 | declare const CommonNote := 65 { Trombone and Clarinet Note } 30 | declare const ModWheel := 1 31 | { Pseudo-Call Action Routines. NOTE: Assign these to powers of two } 32 | declare const StartDemo := 1 { 2^0 } 33 | declare const UpdateVolume := 2 { 2^1 } 34 | { Display Captions } 35 | declare @XVcap 36 | XVCap := ' XFade Variable' 37 | declare @X0cap 38 | X0cap := ' Group[0] Level' 39 | declare @X1cap 40 | X1cap := ' Group[1] Level' 41 | declare @XMVcap 42 | XMVcap := ' Master Fader' 43 | { Control Panel Components } 44 | declare ui_button Demo 45 | set_text(Demo,'GroupXFade') 46 | move_control(Demo,1,1) 47 | declare ui_label XV (1,2) 48 | move_control(XV,2,1) 49 | set_text(XV,XVcap) 50 | declare ui_label X0 (1,2) 51 | move_control(X0,3,1) 52 | set_text(X0,X0cap) 53 | declare ui_label X1 (1,2) 54 | move_control(X1,4,1) 55 | set_text(X1,X1cap) 56 | declare ui_label XMV (1,2) 57 | move_control(XMV,5,1) 58 | set_text(XMV,XMVcap) 59 | declare ui_knob Range (0,100,1) 60 | set_text(Range,'VolRange') 61 | set_knob_unit(Range,KNOB_UNIT_PERCENT) 62 | move_control(Range,6,1) 63 | Range := 25 64 | { Simple Variables } 65 | declare Actions { List of actions to be performed at pseudo-call handler } 66 | declare CallActv { Semaphore to allow only one pseudo call at a time } 67 | declare Call_id { Event id for pseudo-call note } 68 | declare MWV { ModWheel value } 69 | declare XFV { XFade control variable } 70 | { Common Note parameters } 71 | declare 0db { Amount in mdb to restore reference level of test note } 72 | declare xid { ID for test note } 73 | { Remember These Settings } 74 | make_persistent(Range) 75 | make_persistent(MWV) 76 | { Clear K2 Status Line } 77 | message('') 78 | end on { init } 79 | 80 | on note 81 | ignore_event(EVENT_ID) { No keyboard notes used } 82 | end on { note } 83 | 84 | on release 85 | XEQ_Call { If this is a pseudo-call, execute action routine(s) } 86 | end on { release } 87 | 88 | on controller 89 | if (CC_NUM = ModWheel) 90 | MWV := %CC[ModWheel] { Update Mod Wheel Value } 91 | Call(UpdateVolume) { Execute a Volume Update } 92 | end if 93 | end on { controller } 94 | 95 | on ui_control (Demo) { Start Demo#2 } 96 | note_off(ALL_EVENTS) { Abort all demo notes in process } 97 | if Demo = 1 98 | 0db := 0 99 | Call(StartDemo+UpdateVolume) 100 | end if 101 | end on { StartTest Button } 102 | 103 | on ui_control (Range) { Change 'hot zone' range of Master Fader } 104 | Call(UpdateVolume) { Force an update of volume accordingly } 105 | end on { Fader Range Knob } 106 | 107 | {--------------------- Pseudo-Call and Handler Functions ------------------} 108 | 109 | function Call(cmd) { Pseudo-Call process } 110 | if CallActv = 0 { Only allow if currently inactive } 111 | CallActv := 1 { Lock out any more calls until completed } 112 | Actions := cmd { Action List for XEQ_Call } 113 | Call_id := play_note(0,1,0,1) { Play a very short MIDI Note 0 } 114 | end if { to force-trigger an RCB } 115 | end function { Call } 116 | 117 | function XEQ_Call { Execute Calls when Call_id occurs } 118 | if EVENT_ID = Call_id { Do nothing unless RCB invoked by Call_id event } 119 | if (Actions .and. StartDemo # 0) 120 | NewDemo { Start a new demo per state of Demo Buttons } 121 | end if 122 | if (Actions .and. UpdateVolume # 0) 123 | NewVolume { Update Volume per control settings } 124 | end if 125 | CallActv := 0 { Ready for another pseudo Call } 126 | end if 127 | end function { XEQ_Call } 128 | 129 | {------------- Action Routines for the Pseudo-Call Handler ---------------} 130 | 131 | function NewDemo { Starts a new demo } 132 | xid := play_note(CommonNote,1,0,0) 133 | end function { NewDemo } 134 | 135 | function NewVolume { Updates volume of Group 0 and Group 1 } 136 | declare n { For-Loop index } 137 | declare EPV { Engine Parameter for Group volume } 138 | declare VR[2] { VR Volume levels for groups } 139 | declare MVol { Master Volume level per MWV and Range } 140 | 141 | XFV := Ang90*MWV/127 { Map Mod Wheel to XFV = 0..1000 } 142 | ATFade(MWV,Range,MVol) { Control master volume of common note with Mod Wheel } 143 | change_vol(xid,0db+MVol,1) 144 | 0db := -MVol 145 | SinCos(XFV,VR[1],VR[0]) { Get XFade volume levels per XFV } 146 | for n := 0 to 1 147 | VR_to_ep(VR[n],EPV) { Convert VR% to ep } 148 | _set_engine_par(ENGINE_PAR_VOLUME,EPV,n,-1,-1) 149 | end for 150 | ShowData(MVol) { Display control values } 151 | end function { NewVolume } 152 | 153 | function ShowData(mvol) { Display control values } 154 | set_text(XV,XVcap) { XFade variable 0..1000 } 155 | add_text_line(XV,' ' & XFV) 156 | ShowGroupAtn(0,X0,X0Cap) { Group 0 Volume } 157 | ShowGroupAtn(1,X1,X1Cap) { Group 1 Volume } 158 | ShowAtn(mvol,XMV,XMVCap) { Master Fader Volume } 159 | end function { ShowData } 160 | 161 | function ShowGroupAtn(group,win,cap) 162 | set_text(win,cap) 163 | add_text_line(win,' Volume = ' & _get_engine_par_disp(ENGINE_PAR_VOLUME,group,-1,-1)) 164 | end function { ShowGroupAtn } 165 | 166 | function ShowAtn(atn,win,cap) 167 | set_text(win,cap) 168 | if atn = Muted 169 | add_text_line(win,' Muted') 170 | else 171 | add_text_line(win,' ' & atn & ' mdb') 172 | end if 173 | end function { ShowAtn } 174 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V451/Demo-Instruments/Data/FSin.nka: -------------------------------------------------------------------------------- 1 | %FSin 2 | 0 3 | 16 4 | 32 5 | 47 6 | 63 7 | 79 8 | 94 9 | 110 10 | 126 11 | 141 12 | 157 13 | 173 14 | 188 15 | 204 16 | 220 17 | 236 18 | 251 19 | 267 20 | 283 21 | 299 22 | 314 23 | 330 24 | 346 25 | 362 26 | 377 27 | 393 28 | 408 29 | 424 30 | 440 31 | 455 32 | 471 33 | 486 34 | 502 35 | 518 36 | 534 37 | 549 38 | 565 39 | 581 40 | 597 41 | 612 42 | 628 43 | 644 44 | 660 45 | 675 46 | 691 47 | 706 48 | 722 49 | 737 50 | 753 51 | 769 52 | 785 53 | 800 54 | 816 55 | 832 56 | 847 57 | 863 58 | 879 59 | 894 60 | 910 61 | 925 62 | 941 63 | 957 64 | 972 65 | 988 66 | 1004 67 | 1020 68 | 1035 69 | 1050 70 | 1066 71 | 1082 72 | 1097 73 | 1113 74 | 1129 75 | 1144 76 | 1160 77 | 1175 78 | 1191 79 | 1206 80 | 1222 81 | 1238 82 | 1254 83 | 1269 84 | 1284 85 | 1300 86 | 1316 87 | 1331 88 | 1347 89 | 1362 90 | 1378 91 | 1394 92 | 1409 93 | 1425 94 | 1440 95 | 1455 96 | 1471 97 | 1487 98 | 1502 99 | 1518 100 | 1533 101 | 1549 102 | 1565 103 | 1580 104 | 1595 105 | 1611 106 | 1627 107 | 1642 108 | 1657 109 | 1673 110 | 1689 111 | 1704 112 | 1719 113 | 1735 114 | 1751 115 | 1766 116 | 1781 117 | 1797 118 | 1812 119 | 1827 120 | 1843 121 | 1859 122 | 1874 123 | 1889 124 | 1905 125 | 1920 126 | 1935 127 | 1951 128 | 1966 129 | 1982 130 | 1997 131 | 2012 132 | 2028 133 | 2043 134 | 2059 135 | 2074 136 | 2089 137 | 2105 138 | 2120 139 | 2135 140 | 2151 141 | 2166 142 | 2181 143 | 2197 144 | 2212 145 | 2228 146 | 2242 147 | 2258 148 | 2273 149 | 2289 150 | 2304 151 | 2319 152 | 2335 153 | 2350 154 | 2365 155 | 2380 156 | 2396 157 | 2410 158 | 2426 159 | 2441 160 | 2457 161 | 2471 162 | 2487 163 | 2502 164 | 2518 165 | 2532 166 | 2548 167 | 2563 168 | 2578 169 | 2593 170 | 2608 171 | 2624 172 | 2639 173 | 2654 174 | 2669 175 | 2684 176 | 2699 177 | 2714 178 | 2729 179 | 2745 180 | 2760 181 | 2775 182 | 2790 183 | 2805 184 | 2820 185 | 2835 186 | 2850 187 | 2865 188 | 2881 189 | 2895 190 | 2910 191 | 2925 192 | 2941 193 | 2955 194 | 2970 195 | 2986 196 | 3001 197 | 3015 198 | 3030 199 | 3045 200 | 3060 201 | 3075 202 | 3090 203 | 3105 204 | 3120 205 | 3135 206 | 3150 207 | 3165 208 | 3180 209 | 3194 210 | 3209 211 | 3224 212 | 3239 213 | 3254 214 | 3269 215 | 3284 216 | 3299 217 | 3313 218 | 3328 219 | 3343 220 | 3358 221 | 3372 222 | 3387 223 | 3402 224 | 3417 225 | 3432 226 | 3446 227 | 3461 228 | 3476 229 | 3491 230 | 3505 231 | 3520 232 | 3535 233 | 3549 234 | 3564 235 | 3579 236 | 3593 237 | 3608 238 | 3623 239 | 3638 240 | 3652 241 | 3667 242 | 3681 243 | 3696 244 | 3711 245 | 3725 246 | 3740 247 | 3754 248 | 3768 249 | 3783 250 | 3798 251 | 3812 252 | 3827 253 | 3841 254 | 3856 255 | 3871 256 | 3885 257 | 3899 258 | 3914 259 | 3928 260 | 3942 261 | 3957 262 | 3972 263 | 3986 264 | 4000 265 | 4015 266 | 4029 267 | 4044 268 | 4058 269 | 4072 270 | 4087 271 | 4101 272 | 4115 273 | 4129 274 | 4144 275 | 4158 276 | 4172 277 | 4187 278 | 4201 279 | 4215 280 | 4229 281 | 4244 282 | 4258 283 | 4272 284 | 4286 285 | 4300 286 | 4315 287 | 4329 288 | 4343 289 | 4357 290 | 4371 291 | 4385 292 | 4399 293 | 4414 294 | 4428 295 | 4441 296 | 4456 297 | 4470 298 | 4484 299 | 4498 300 | 4512 301 | 4526 302 | 4540 303 | 4554 304 | 4568 305 | 4582 306 | 4596 307 | 4610 308 | 4624 309 | 4638 310 | 4651 311 | 4665 312 | 4679 313 | 4693 314 | 4707 315 | 4721 316 | 4735 317 | 4749 318 | 4762 319 | 4776 320 | 4790 321 | 4804 322 | 4817 323 | 4831 324 | 4845 325 | 4859 326 | 4873 327 | 4886 328 | 4900 329 | 4914 330 | 4927 331 | 4941 332 | 4955 333 | 4968 334 | 4982 335 | 4995 336 | 5009 337 | 5023 338 | 5036 339 | 5050 340 | 5063 341 | 5077 342 | 5090 343 | 5104 344 | 5118 345 | 5131 346 | 5144 347 | 5158 348 | 5171 349 | 5185 350 | 5198 351 | 5212 352 | 5225 353 | 5238 354 | 5252 355 | 5265 356 | 5279 357 | 5292 358 | 5305 359 | 5318 360 | 5332 361 | 5345 362 | 5358 363 | 5372 364 | 5385 365 | 5398 366 | 5411 367 | 5424 368 | 5438 369 | 5451 370 | 5464 371 | 5477 372 | 5490 373 | 5503 374 | 5516 375 | 5530 376 | 5542 377 | 5556 378 | 5569 379 | 5582 380 | 5595 381 | 5608 382 | 5621 383 | 5634 384 | 5647 385 | 5660 386 | 5673 387 | 5686 388 | 5698 389 | 5711 390 | 5724 391 | 5737 392 | 5750 393 | 5763 394 | 5776 395 | 5789 396 | 5801 397 | 5814 398 | 5827 399 | 5839 400 | 5852 401 | 5865 402 | 5878 403 | 5891 404 | 5903 405 | 5916 406 | 5929 407 | 5941 408 | 5954 409 | 5966 410 | 5979 411 | 5992 412 | 6004 413 | 6017 414 | 6029 415 | 6042 416 | 6054 417 | 6067 418 | 6079 419 | 6092 420 | 6104 421 | 6117 422 | 6129 423 | 6141 424 | 6154 425 | 6166 426 | 6179 427 | 6191 428 | 6203 429 | 6216 430 | 6228 431 | 6240 432 | 6252 433 | 6265 434 | 6277 435 | 6289 436 | 6301 437 | 6314 438 | 6326 439 | 6338 440 | 6350 441 | 6362 442 | 6374 443 | 6386 444 | 6398 445 | 6411 446 | 6423 447 | 6434 448 | 6447 449 | 6459 450 | 6471 451 | 6482 452 | 6494 453 | 6506 454 | 6519 455 | 6530 456 | 6542 457 | 6554 458 | 6566 459 | 6578 460 | 6590 461 | 6601 462 | 6613 463 | 6625 464 | 6637 465 | 6649 466 | 6660 467 | 6672 468 | 6684 469 | 6695 470 | 6707 471 | 6718 472 | 6730 473 | 6742 474 | 6753 475 | 6765 476 | 6777 477 | 6788 478 | 6799 479 | 6811 480 | 6823 481 | 6834 482 | 6845 483 | 6857 484 | 6868 485 | 6880 486 | 6891 487 | 6902 488 | 6914 489 | 6925 490 | 6936 491 | 6948 492 | 6959 493 | 6971 494 | 6982 495 | 6993 496 | 7004 497 | 7016 498 | 7026 499 | 7038 500 | 7049 501 | 7060 502 | 7071 503 | 7082 504 | 7093 505 | 7104 506 | 7115 507 | 7126 508 | 7137 509 | 7148 510 | 7160 511 | 7170 512 | 7181 513 | 7192 514 | 7203 515 | 7214 516 | 7225 517 | 7236 518 | 7247 519 | 7257 520 | 7268 521 | 7279 522 | 7290 523 | 7301 524 | 7311 525 | 7322 526 | 7333 527 | 7343 528 | 7354 529 | 7365 530 | 7375 531 | 7386 532 | 7396 533 | 7407 534 | 7418 535 | 7428 536 | 7438 537 | 7449 538 | 7460 539 | 7470 540 | 7480 541 | 7491 542 | 7501 543 | 7511 544 | 7522 545 | 7532 546 | 7542 547 | 7553 548 | 7563 549 | 7573 550 | 7583 551 | 7594 552 | 7604 553 | 7614 554 | 7624 555 | 7635 556 | 7645 557 | 7655 558 | 7665 559 | 7675 560 | 7685 561 | 7695 562 | 7705 563 | 7715 564 | 7725 565 | 7735 566 | 7745 567 | 7755 568 | 7765 569 | 7775 570 | 7784 571 | 7794 572 | 7804 573 | 7814 574 | 7824 575 | 7834 576 | 7843 577 | 7853 578 | 7863 579 | 7873 580 | 7882 581 | 7892 582 | 7901 583 | 7911 584 | 7921 585 | 7931 586 | 7940 587 | 7949 588 | 7959 589 | 7968 590 | 7978 591 | 7987 592 | 7997 593 | 8006 594 | 8016 595 | 8025 596 | 8035 597 | 8044 598 | 8053 599 | 8062 600 | 8072 601 | 8081 602 | 8090 603 | 8099 604 | 8109 605 | 8118 606 | 8127 607 | 8136 608 | 8145 609 | 8154 610 | 8163 611 | 8172 612 | 8182 613 | 8190 614 | 8199 615 | 8209 616 | 8218 617 | 8226 618 | 8235 619 | 8244 620 | 8253 621 | 8262 622 | 8271 623 | 8280 624 | 8289 625 | 8297 626 | 8306 627 | 8315 628 | 8324 629 | 8332 630 | 8341 631 | 8350 632 | 8358 633 | 8367 634 | 8375 635 | 8384 636 | 8392 637 | 8401 638 | 8409 639 | 8418 640 | 8426 641 | 8435 642 | 8443 643 | 8452 644 | 8460 645 | 8468 646 | 8477 647 | 8485 648 | 8493 649 | 8502 650 | 8510 651 | 8518 652 | 8526 653 | 8535 654 | 8543 655 | 8551 656 | 8559 657 | 8567 658 | 8575 659 | 8583 660 | 8591 661 | 8599 662 | 8608 663 | 8615 664 | 8623 665 | 8631 666 | 8639 667 | 8647 668 | 8655 669 | 8663 670 | 8671 671 | 8678 672 | 8686 673 | 8694 674 | 8702 675 | 8709 676 | 8717 677 | 8725 678 | 8732 679 | 8740 680 | 8748 681 | 8756 682 | 8763 683 | 8771 684 | 8778 685 | 8786 686 | 8793 687 | 8801 688 | 8808 689 | 8816 690 | 8823 691 | 8830 692 | 8838 693 | 8845 694 | 8852 695 | 8860 696 | 8867 697 | 8874 698 | 8881 699 | 8889 700 | 8896 701 | 8903 702 | 8910 703 | 8917 704 | 8924 705 | 8931 706 | 8938 707 | 8945 708 | 8952 709 | 8960 710 | 8966 711 | 8973 712 | 8980 713 | 8987 714 | 8994 715 | 9001 716 | 9008 717 | 9014 718 | 9021 719 | 9028 720 | 9035 721 | 9042 722 | 9048 723 | 9055 724 | 9062 725 | 9068 726 | 9075 727 | 9081 728 | 9088 729 | 9095 730 | 9101 731 | 9108 732 | 9114 733 | 9121 734 | 9127 735 | 9133 736 | 9140 737 | 9146 738 | 9152 739 | 9159 740 | 9165 741 | 9171 742 | 9177 743 | 9184 744 | 9190 745 | 9196 746 | 9202 747 | 9208 748 | 9215 749 | 9221 750 | 9227 751 | 9233 752 | 9239 753 | 9245 754 | 9251 755 | 9257 756 | 9263 757 | 9269 758 | 9274 759 | 9280 760 | 9286 761 | 9292 762 | 9298 763 | 9304 764 | 9309 765 | 9315 766 | 9321 767 | 9326 768 | 9332 769 | 9338 770 | 9343 771 | 9349 772 | 9355 773 | 9360 774 | 9365 775 | 9371 776 | 9377 777 | 9382 778 | 9387 779 | 9393 780 | 9398 781 | 9403 782 | 9409 783 | 9414 784 | 9419 785 | 9425 786 | 9430 787 | 9435 788 | 9440 789 | 9445 790 | 9451 791 | 9456 792 | 9461 793 | 9466 794 | 9471 795 | 9476 796 | 9481 797 | 9486 798 | 9491 799 | 9496 800 | 9501 801 | 9506 802 | 9511 803 | 9515 804 | 9520 805 | 9525 806 | 9530 807 | 9535 808 | 9539 809 | 9544 810 | 9549 811 | 9553 812 | 9558 813 | 9563 814 | 9567 815 | 9572 816 | 9576 817 | 9581 818 | 9585 819 | 9590 820 | 9594 821 | 9599 822 | 9603 823 | 9607 824 | 9612 825 | 9616 826 | 9620 827 | 9625 828 | 9629 829 | 9633 830 | 9637 831 | 9641 832 | 9646 833 | 9650 834 | 9654 835 | 9658 836 | 9662 837 | 9666 838 | 9670 839 | 9674 840 | 9678 841 | 9682 842 | 9686 843 | 9690 844 | 9694 845 | 9697 846 | 9701 847 | 9705 848 | 9709 849 | 9713 850 | 9716 851 | 9720 852 | 9724 853 | 9727 854 | 9731 855 | 9735 856 | 9738 857 | 9742 858 | 9745 859 | 9749 860 | 9752 861 | 9756 862 | 9759 863 | 9763 864 | 9766 865 | 9769 866 | 9773 867 | 9776 868 | 9779 869 | 9783 870 | 9786 871 | 9789 872 | 9792 873 | 9795 874 | 9799 875 | 9802 876 | 9805 877 | 9808 878 | 9811 879 | 9814 880 | 9817 881 | 9820 882 | 9823 883 | 9826 884 | 9829 885 | 9832 886 | 9835 887 | 9837 888 | 9840 889 | 9843 890 | 9846 891 | 9848 892 | 9851 893 | 9854 894 | 9856 895 | 9859 896 | 9862 897 | 9864 898 | 9867 899 | 9869 900 | 9872 901 | 9874 902 | 9877 903 | 9879 904 | 9882 905 | 9884 906 | 9886 907 | 9889 908 | 9891 909 | 9894 910 | 9896 911 | 9898 912 | 9900 913 | 9902 914 | 9905 915 | 9907 916 | 9909 917 | 9911 918 | 9913 919 | 9915 920 | 9917 921 | 9919 922 | 9921 923 | 9923 924 | 9925 925 | 9927 926 | 9929 927 | 9931 928 | 9933 929 | 9934 930 | 9936 931 | 9938 932 | 9940 933 | 9941 934 | 9943 935 | 9945 936 | 9946 937 | 9948 938 | 9949 939 | 9951 940 | 9953 941 | 9954 942 | 9956 943 | 9957 944 | 9959 945 | 9960 946 | 9961 947 | 9963 948 | 9964 949 | 9965 950 | 9967 951 | 9968 952 | 9969 953 | 9970 954 | 9972 955 | 9973 956 | 9974 957 | 9975 958 | 9976 959 | 9977 960 | 9978 961 | 9979 962 | 9980 963 | 9981 964 | 9982 965 | 9983 966 | 9984 967 | 9985 968 | 9986 969 | 9987 970 | 9987 971 | 9988 972 | 9989 973 | 9990 974 | 9990 975 | 9991 976 | 9992 977 | 9992 978 | 9993 979 | 9993 980 | 9994 981 | 9995 982 | 9995 983 | 9996 984 | 9996 985 | 9996 986 | 9997 987 | 9997 988 | 9998 989 | 9998 990 | 9998 991 | 9999 992 | 9999 993 | 9999 994 | 9999 995 | 9999 996 | 10000 997 | 10000 998 | 10000 999 | 10000 1000 | 10000 1001 | 10000 1002 | 10000 1003 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V451/Demo-Instruments/NKA_Writer.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V451/Demo-Instruments/NKA_Writer.nki -------------------------------------------------------------------------------- /Big Bob/Math Library/V451/Demo-Instruments/NKA_Writer.nkr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V451/Demo-Instruments/NKA_Writer.nkr -------------------------------------------------------------------------------- /Big Bob/Math Library/V451/Demo-Instruments/XFadeDemo.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V451/Demo-Instruments/XFadeDemo.nki -------------------------------------------------------------------------------- /Big Bob/Math Library/V451/Docs/KSPMathUserGuide_V451.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V451/Docs/KSPMathUserGuide_V451.pdf -------------------------------------------------------------------------------- /Big Bob/Math Library/V451/KSE Scripts/NKA_Utility.txt: -------------------------------------------------------------------------------- 1 | { -------------------------------------------------------------------------------- 2 | Title: NKA Utility Script 3 | Author: R.D.Villwock aka 'Big Bob' 4 | First Written: April 20, 2011 5 | Current Version: 1.00 6 | Last Modified: June 6, 2013 7 | ---------------------------------------------------------------------------------- 8 | This script can be used to generate the .nka files needed to support the 9 | fast-mode versions of the Math Library functions. To use this script, you 10 | must first compile it using Nils Liberg's KScript Editor (KSE) V1.5.2 or 11 | higher (new compiler mode). Since this script imports the KSP Math Library, 12 | V451, you must have it positioned alongside this script (or edit the import 13 | path accordingly). 14 | 15 | Prior to running this script, make sure that the hosting instrument has 16 | been set up with a resource Data folder to receive the .nka files that 17 | will be written. Once the resource Data folder has been properly setup 18 | and the instrument is pointed to it, you can compile this script in the 19 | KSE and then paste the compiled script into the desired script slot of 20 | the instrument and hit Apply. To write any given .nka file to the resource 21 | Data folder, select the file type you want to write using the drop-down 22 | menu. When you click the menu selection, the corresponding .nka file will 23 | be written. Repeat this for each nka file you want to write. 24 | 25 | V450 of the Math Library uses features of the new KSE compiler to 26 | preserve the .nka file names whether or not you use the compact name 27 | option of the KSE. With this script as supplied, it will write the .nka 28 | files with the names FLog.nka, FExp.nka, or FSin.nka regardless of 29 | whether you use the compact name option. However, if your host script 30 | will import the Math Library 'as xxx', you will need to make the following 31 | edits to this 2-line script in order to write the nka file names properly. 32 | 33 | 1. Edit the import line by appending the 'as xxx'. 34 | 2. Edit the macro invokation line write_nka, changing it to xxx.write_nka 35 | 36 | For example, if your host script will import the Math Library 'as Math', you 37 | need to edit this script as follows: 38 | 39 | import "KSPMathV451.txt" as Math 40 | Math.write_nka 41 | 42 | With the above edits, this script will write the nka file names as: 43 | Math__FLog.nka, Math__FExp.nka, or Math__FSin.nka. These are the correct 44 | names required by an application that imports the library 'as Math'. 45 | 46 | If you follow the above instructions, the .nka files will be named properly 47 | for your host script to access them (via the Math Library). Remember, you 48 | cannot achieve the same thing by simply renaming the Standard .nka files 49 | because K4 embeds the original array name when it writes the file so it 50 | cannot be loaded later into an array with a different name. Please refer to 51 | the V450 User's Guide for more information on how to use this script. } 52 | 53 | import "KSPMathV451.txt" 54 | 55 | write_nka 56 | 57 | {---------------------------- End of NKA Utility Script ------------------------------} 58 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V610/Demo-Instruments/DB-Demo.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V610/Demo-Instruments/DB-Demo.nki -------------------------------------------------------------------------------- /Big Bob/Math Library/V610/Demo-Instruments/XFadeDemo.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V610/Demo-Instruments/XFadeDemo.nki -------------------------------------------------------------------------------- /Big Bob/Math Library/V610/Docs/KSPMathUserGuide_V610.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V610/Docs/KSPMathUserGuide_V610.pdf -------------------------------------------------------------------------------- /Big Bob/Math Library/V610/Docs/Readme_V610.txt: -------------------------------------------------------------------------------- 1 | ************************************************************************* 2 | KSP Math Library Version 6.10 1-22-14 3 | 4 | V610 of the library compiles with V1.5.2 of the KSE or the equivalent 5 | plugin for Sublime Text 3 . 6 | 7 | 8 | V610 9 | 1. Fixed an initialization issue that affected some computer systems. 10 | 11 | 2. Improved the internal _NLZ routine (Number of Leading Zeros) used 12 | by many of the library's normalization routines. New version runs 13 | about 10% faster and now covers the full range from 0 to 32 leading 14 | zeros. 15 | 16 | 3. Added a new conditional predicate Sign3. 17 | 18 | 4. Added XOR function. This is a one-line functions that returns the 19 | exclusive OR of two input integers (bit by bit). 20 | 21 | V600 22 | 1. V600 provides another major overhaul of the Fast Math mode. This 23 | implementation requires no NKA files at all (before, after, or during 24 | development).The lookup tables are now automatically initialized by the 25 | library itself during normal initialization. All that you need do to 26 | switch from Standard to Fast mode or vice versa is to change the 27 | corresponding compiler switch. Please see Section 4 of the User Guide. 28 | 29 | 2. The User's Guide has been significantly revised for V600. Please be 30 | sure to read at least sections 2 and 4 to familiarize yourself with the 31 | main differences from prior versions of the library. 32 | 33 | ************************************************************************* 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V610/KSE Scripts/Demo Scripts/DB-Demo.ksp: -------------------------------------------------------------------------------- 1 | { This script illustrates how you can use a value-edit, a knob, or a slider to control 2 | Kontakt's Volume by implementing all three at the same time. With this demo script, 3 | changing any of the 3 panel controls causes the remaining 2 panel controls as well 4 | as Kontakt's Amplifier Volume to assume the same value. Similarly, changing 5 | Kontakt's Amp Volume knob will cause all three panel controls to assume the same 6 | value. In this way, all 4 controls continuously track each other. 7 | 8 | This script uses three Math Library functions. epVolume is used to bi-directionally 9 | convert between mdb volume and its equivalent engine parameter value. RoundDiv is 10 | used to perform a rounded division of the mdb value to dB scaled by 10 and DFmtVal 11 | is used to format the scaled dB value to its text representation with one decimal 12 | digit for purposes of displaying the slider's value on a label. } 13 | 14 | import "KSPMathV610.ksp" { This makes library functions available to your script. If 15 | the library is not located alongside DB-Demo, you will 16 | need to include the correct path to it in the import 17 | statement. See KSE documentation. } 18 | on init 19 | message('') { Clear status line without covering up any error messages that might 20 | occur during execution of the ICB } 21 | SetMathMode(FL+FE) { The library requires that this directive be included near the top 22 | of your ICB. With the option_list shown, the fast-mode version of 23 | epVolume will be compiled. If you want to compile epVolume in 24 | Standard mode, just use zero for the option_list. } 25 | 26 | { The following declaratives simply define the various controls to be displayed on 27 | the script panel and also declare a variable named Vol that will be used to pass 28 | a volume parameter to several callable user functions. Vol always contains the desired 29 | volume in dB scaled by 10 so it can represent volume with 0.1 dB resolution. } 30 | 31 | { VolEdit, VolKnob, and VolSlide will display volume from Muted to +12.0 dB } 32 | declare ui_value_edit VolEdit (Muted/100,120,10) { with 0.1 dB resolution } 33 | set_text(VolEdit,'Vol dB') 34 | declare ui_knob VolKnob (Muted/100,120,10) 35 | set_knob_unit(VolKnob,KNOB_UNIT_DB) 36 | set_text(VolKnob,'Volume') 37 | declare ui_slider VolSlide (Muted/100,120) 38 | move_control(VolSlide,3,1) 39 | declare ui_label ShowSlide(1,1) { Sliders have no value display of their own so } 40 | { we use an adjacent label to display its } 41 | move_control(ShowSlide,3,2) { current value. } 42 | 43 | { The Vol variable is used to to hold the current volume setting in dB*10, 44 | so it can represent volume with 0.1 dB resolution. } 45 | declare Vol { volume in dB scaled by 10 } 46 | end on 47 | 48 | on_pgs_do_post { The library requires that you invoke do_post_init from the head of 49 | your pgs callback but since we don't need a pgs callback for this 50 | application, we just use on_pgs_do_post to both create the needed 51 | pgs callback handler and invoke do_post_init from it. 52 | See section 2.2 of the User Guide } 53 | 54 | function AppInit override 55 | call get_amp_vol { We want to invoke get_amp_vol during initialization so we } 56 | end function { call it from AppInit, see section 2.3 of the User Guide } 57 | 58 | on ui_update { This callback runs when the user changes the Amp volume knob, so we 59 | call get_amp_vol to set the panel knobs to the same value as the 60 | Amp Volume knob (just like when first starting the script during 61 | post-initialization) see AppInit } 62 | call get_amp_vol { See header comments of get_amp_vol for details of what it does } 63 | end on 64 | 65 | on ui_control (VolEdit) { Anytime the user changes the panel's edit box, its value 66 | which is the dB setting * 10 is passed (in the variable 67 | named Vol) to user functions named update_panel and 68 | update_amp_volume. See the header comments of these two 69 | routines for details of what they do } 70 | Vol := VolEdit 71 | call update_panel { Set all the panel controls to copy the VolEdit setting } 72 | call update_amp_volume { Set Kontakt's Amp volume to the same dB value } 73 | end on 74 | 75 | on ui_control (VolKnob) { Anytime the user changes the panel knob, its value 76 | which is the dB setting * 10 is passed (in the variable 77 | named Vol) to user functions named update_panel and 78 | update_amp_volume. See the header comments of these two 79 | routines for details of what they do } 80 | Vol := VolKnob 81 | call update_panel { Set all the panel controls to copy the VolKnob setting } 82 | call update_amp_volume { Set Kontakt's Amp volume to the same dB value } 83 | end on 84 | 85 | on ui_control (VolSlide) { Anytime the user changes the panel slider, its value 86 | which is the dB setting * 10 is passed (in the variable 87 | named Vol) to user functions named update_panel and 88 | update_amp_volume. See the header comments of these two 89 | routines for details of what they do } 90 | Vol := VolSlide 91 | call update_panel { Set all the panel controls to copy the VolKnob setting } 92 | call update_amp_volume { Set Kontakt's Amp volume to the same dB value } 93 | end on 94 | 95 | function get_amp_vol { This routine reads Kontakt's Amp Volume setting and sets all 96 | panel controls to display the same value. It does this by reading 97 | the ep for Amp Volume and then invoking the Math function named 98 | epVolume to convert that ep to its equivalent mdB value. Then, 99 | the mdB value is divided by 100 to express it in 0.1 dB units 100 | (dB scaled by 10) and this value is passed in the variable named 101 | Vol to the user function named update_panel. See the header 102 | comments of update_panel for details of what it does. } 103 | Vol := epVolume(E2V,get_engine_par(ENGINE_PAR_VOLUME,0,-1,-1)) 104 | Vol := RoundDiv(Vol,100) { Vol = ep/100 convert from mdb to dB * 10 } 105 | call update_panel { Set all panel controls to the dB value in Vol } 106 | end function 107 | 108 | function update_amp_volume { This routine uses the scaled volume (in the variable Vol) to 109 | set Kontakt's Amplifier Volume to the same dB value. It does 110 | this by invoking the Math routine named epVolume to convert 111 | Vol to its equivalent engine par in the local var named ep } 112 | declare ep 113 | ep := epVolume(V2E,Vol*100) { Multiply Vol by 100 first to convert it to mdb units, then 114 | invoke epVolume to convert the mdb value to its equivalent 115 | ep value. This ep value can then be sent to control the 116 | Amplifier volume knob } 117 | set_engine_par(ENGINE_PAR_VOLUME,ep,0,-1,-1) 118 | end function 119 | 120 | function update_panel { This routine displays the dB value (in the variable named Vol) on 121 | all three panel controls. (Remember the integer value in Vol is dB 122 | scaled by 10). The value edit and the knob will automatically 123 | format the dB display with 0.1dB resolution. However, for the 124 | slider, we must overtly format the value in Vol so it will display 125 | with 0.1dB resolution. This is done with the library routine named 126 | DFmtVal. } 127 | declare @DB { text form of Vol } 128 | VolEdit := Vol { copy Vol to all 3 panel controls } 129 | VolKnob := Vol 130 | VolSlide := Vol 131 | DB := DFmtVal(Vol,1) { format and display slider's value with its associated label } 132 | set_text(ShowSlide,'Vol: ' & DB & ' dB') 133 | end function 134 | 135 | 136 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V610/KSE Scripts/Demo Scripts/XFadeDemo.ksp: -------------------------------------------------------------------------------- 1 | { -------------------------------------------------------------------------------- 2 | Title: S-Curve Demo 3 | Author: R.D.Villwock aka 'Big Bob' 4 | First Written: May 17, 2011 5 | Current Version: 1.10 6 | Last Modified: January 22, 2014 7 | ---------------------------------------------------------------------------------- 8 | This script provides a demonstration of four XFade functions that have been 9 | added to the K4 Math Library. There are three variations of S-shaped curves 10 | and one equal-power function. All four of these functions provide for morphing 11 | control. } 12 | 13 | import "KSPMathV610.ksp" 14 | 15 | on init 16 | message('') 17 | set_script_title('XFade Demo') 18 | make_perfview 19 | set_ui_height(6) 20 | SetMathMode(0) 21 | declare ui_table Show[128] (3,6,10000) 22 | move_control_px(Show,66,2) 23 | Show -> height := 249 24 | Show -> width := 390 25 | declare ui_menu Curve 26 | add_menu_item(Curve,'Sin/Cos S-Curve',0) 27 | add_menu_item(Curve,'Log/Exp S-Curve',1) 28 | add_menu_item(Curve,'Exp/Exp S-Curve',2) 29 | add_menu_item(Curve,'Equal-Pwr Curve',3) 30 | move_control_px(Curve,475,86) 31 | Curve -> width := 125 32 | Curve -> text_alignment := 1 33 | Curve := 0 34 | make_persistent(Curve) 35 | declare ui_knob Morph (-1000,1000,10) 36 | move_control_px(Morph,493,40) 37 | set_knob_unit(Morph,KNOB_UNIT_PERCENT) 38 | set_knob_defval(Morph,0) 39 | set_text(Morph,' Morph') 40 | Morph := 0 41 | make_persistent(Morph) 42 | declare ui_knob X (0,1000,10) 43 | move_control_px(X,459,212) 44 | set_knob_unit(X,KNOB_UNIT_PERCENT) 45 | set_text(X,' XFade') 46 | X := 0 47 | make_persistent(X) 48 | declare ui_label Y1 (1,1) 49 | move_control_px(Y1,546,212) 50 | Y1 -> width := 72 51 | declare ui_label Y2 (1,1) 52 | move_control_px(Y2,546,233) 53 | Y2 -> width := 72 54 | declare v1 55 | declare v2 56 | declare xv 57 | end on 58 | 59 | on_pgs_do_post { Do this as soon as the ICB exits } 60 | 61 | function AppInit override 62 | call update_all 63 | end function 64 | 65 | on ui_control(X) 66 | call update_all 67 | end on 68 | 69 | on ui_control(Curve) 70 | call update_all 71 | end on 72 | 73 | on ui_control(Morph) 74 | call update_all 75 | end on 76 | 77 | function update_all 78 | call show_xfade 79 | call updateY 80 | call update_cursor 81 | end function 82 | 83 | function show_xfade 84 | declare n 85 | for n := 0 to 127 86 | xv := n*1000/127 87 | call ChooseCurve 88 | if n .and. 1 = 0 89 | if v1 < 0 90 | v1 := 0 91 | end if 92 | if v1 > 10000 93 | v1 := 10000 94 | end if 95 | Show[n] := v1 96 | else 97 | if v2 < 0 98 | v2 := 0 99 | end if 100 | if v2 > 10000 101 | v2 := 10000 102 | end if 103 | Show[n] := v2 104 | end if 105 | end for 106 | end function 107 | 108 | function update_cursor 109 | declare n 110 | n := (X*127+500)/1000 111 | if n = 0 112 | inc(n) 113 | end if 114 | Show[n-1] := 10000 115 | Show[n] := 10000 116 | end function 117 | 118 | function updateY 119 | declare @s1 120 | declare @s2 121 | xv := X 122 | call ChooseCurve 123 | s1 := DFmtVal(v1,4) 124 | s2 := DFmtVal(v2,4) 125 | set_text(Y1,'VR1 = ' & s1) 126 | set_text(Y2,'VR2 = ' & s2) 127 | end function 128 | 129 | function ChooseCurve 130 | select Curve 131 | case 0 132 | S1_XFade(xv,Morph,v1,v2) 133 | case 1 134 | S2_XFade(xv,Morph,v1,v2) 135 | case 2 136 | S3_XFade(xv,Morph,v1,v2) 137 | case 3 138 | EP_XFade(xv,Morph,v1,v2) 139 | end select 140 | end function 141 | 142 | 143 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V701/Demo-Instruments/DB-Demo.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V701/Demo-Instruments/DB-Demo.nki -------------------------------------------------------------------------------- /Big Bob/Math Library/V701/Demo-Instruments/XFadeDemo.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V701/Demo-Instruments/XFadeDemo.nki -------------------------------------------------------------------------------- /Big Bob/Math Library/V701/Docs/KSPMathUserGuide_V701.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V701/Docs/KSPMathUserGuide_V701.pdf -------------------------------------------------------------------------------- /Big Bob/Math Library/V701/Docs/Readme_V701.txt: -------------------------------------------------------------------------------- 1 | ************************************************************************* 2 | KSP Math Library Version 7.01 9-25-14 3 | 4 | V701 of the library compiles with V1.5.2 of the KSE or the equivalent 5 | plugin for Sublime Text 3. Be sureyou have 'Optimize compiled code' 6 | enabled. 7 | 8 | V701 9 | 10 | 1. Added epDlyTime converter 11 | 2. Added comparison predicates pEQ,pNEQ,pLT,pGT,pLTE,and pGTE 12 | 13 | 14 | V700 15 | 16 | 1. Added inverse trig functions ACos, ASin, and ATan. 17 | 18 | 2. Added R2P and P2R for rectanglular to polar and polar to 19 | rectangular coordinate conversions. 20 | 21 | 3. Added user selectable, angular unit choices: 22 | DG - deci-grads 1000 divisions per right angle, Ang90 23 | CG - centi-grads 10000 divisions per right angle, Ang90 24 | DD - deci-degrees 900 divisions per right angle, Ang90 25 | CD - centi-degrees 9000 divisions per right angle, Ang90 26 | 27 | 4. In addition to Ang90, V700 has constants for Ang180 and Ang360. 28 | These constants always have the correct value for whatever angular 29 | unit you specify in SetMathMode. For example, if you specify DD, 30 | Ang90=900, Ang180=1800, and Ang360=3600. If you specify DG, 31 | Ang90=1000, Ang180=2000, and Ang360=4000, etc. 32 | 33 | 5. The X versions of the trig functions have been retired becuase All 34 | trig functions now accept any input angle: MinInt < Ang < MaxInt. 35 | 36 | 6. The Library now automatically compiles the pgs callback handler 37 | needed to support its own initialization. For those applications 38 | that also need to use the pgs callback, on_pgs_changed is provided 39 | as a pseudo callback directive. 40 | 41 | 7. on_post_init (another pseudo callback directive) now makes it 42 | easier than ever to add application-specific code that needs to 43 | be executed in the post-initialization phase. 44 | 45 | 8. The internal support routine for DFmtVal has been recoded more 46 | efficiently. 47 | 48 | V610 49 | 1. Fixed an initialization issue that affected some computer systems. 50 | 51 | 2. Improved the internal _NLZ routine (Number of Leading Zeros) used 52 | by many of the library's normalization routines. New version runs 53 | about 10% faster and now covers the full range from 0 to 32 leading 54 | zeros. 55 | 56 | 3. Added a new conditional predicate Sign3. 57 | 58 | 4. Added XOR function. This is a one-line functions that returns the 59 | exclusive OR of two input integers (bit by bit). 60 | 61 | V600 62 | 1. V600 provides another major overhaul of the Fast Math mode. This 63 | implementation requires no NKA files at all (before, after, or during 64 | development).The lookup tables are now automatically initialized by the 65 | library itself during normal initialization. All that you need do to 66 | switch from Standard to Fast mode or vice versa is to change the 67 | corresponding compiler switch. Please see Section 4 of the User Guide. 68 | 69 | 2. The User's Guide has been significantly revised for V600. Please be 70 | sure to read at least sections 2 and 4 to familiarize yourself with the 71 | main differences from prior versions of the library. 72 | 73 | ************************************************************************* 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V701/KSE Scripts/Demo Scripts/DB-Demo.ksp: -------------------------------------------------------------------------------- 1 | { This script illustrates how you can use a value-edit, a knob, or a slider to control 2 | Kontakt's Volume by implementing all three at the same time. With this demo script, 3 | changing any of the 3 panel controls causes the remaining 2 panel controls as well 4 | as Kontakt's Amplifier Volume to assume the same value. Similarly, changing 5 | Kontakt's Amp Volume knob will cause all three panel controls to assume the same 6 | value. In this way, all 4 controls continuously track each other. 7 | 8 | This script uses three Math Library functions. epVolume is used to bi-directionally 9 | convert between mdb volume and its equivalent engine parameter value. RoundDiv is 10 | used to perform a rounded division of the mdb value to dB scaled by 10 and DFmtVal 11 | is used to format the scaled dB value to its text representation with one decimal 12 | digit for purposes of displaying the slider's value on a label. } 13 | 14 | import "KSPMathV701.ksp" { This makes library functions available to your script. If 15 | the library is not located alongside DB-Demo, you will 16 | need to include the correct path to it in the import 17 | statement. See KSE documentation. } 18 | on init 19 | message('') { Clear status line without covering up any error messages that might 20 | occur during execution of the ICB } 21 | set_script_title('DB-Demo') 22 | SetMathMode(FL+FE,DG) { The library requires that this directive be included near the top 23 | of your ICB. With the fast_options shown, the fast-mode versions 24 | of epVolume (both directions) will be compiled. If you want to run 25 | epVolume in Standard mode, just use zero for fast_opts list. 26 | DG specifies deci-grads for an angular unit but since this script 27 | doesn't use any trig functions, this setting is unimportant. } 28 | 29 | { The following declaratives simply define the various controls to be displayed on 30 | the script panel and also declare a variable named Vol that will be used to pass 31 | a volume parameter to several callable user functions. Vol always contains the desired 32 | volume in dB scaled by 10 so it can represent volume with 0.1 dB resolution. } 33 | 34 | { VolEdit, VolKnob, and VolSlide will display volume from Muted to +12.0 dB } 35 | declare ui_value_edit VolEdit (Muted/100,120,10) { with 0.1 dB resolution } 36 | set_text(VolEdit,'Vol dB') 37 | declare ui_knob VolKnob (Muted/100,120,10) 38 | set_knob_unit(VolKnob,KNOB_UNIT_DB) 39 | set_text(VolKnob,'Volume') 40 | declare ui_slider VolSlide (Muted/100,120) 41 | move_control(VolSlide,3,1) 42 | declare ui_label ShowSlide(1,1) { Sliders have no value display of their own so } 43 | { we use an adjacent label to display its } 44 | move_control(ShowSlide,3,2) { current value. } 45 | 46 | { The Vol variable is used to to hold the current volume setting in dB*10, 47 | so it can represent volume with 0.1 dB resolution. } 48 | declare Vol { volume in dB scaled by 10 } 49 | end on 50 | 51 | on_post_init { We need to invoke get_amp_vol during initialization but since we} 52 | call get_amp_vol { want to 'call it', we put do in the post_init callback instead } 53 | end_on { of in the ICB. See User Guide for info on post_initialization } 54 | 55 | on ui_update { This callback runs when the user changes the Amp volume knob, so we 56 | call get_amp_vol to set the panel knobs to the same value as the 57 | Amp Volume knob (just like when first starting the script during 58 | post-initialization) see AppInit } 59 | call get_amp_vol { See header comments of get_amp_vol for details of what it does } 60 | end on 61 | 62 | on ui_control (VolEdit) { Anytime the user changes the panel's edit box, its value 63 | which is the dB setting * 10 is passed (in the variable 64 | named Vol) to user functions named update_panel and 65 | update_amp_volume. See the header comments of these two 66 | routines for details of what they do } 67 | Vol := VolEdit 68 | call update_panel { Set all the panel controls to copy the VolEdit setting } 69 | call update_amp_volume { Set Kontakt's Amp volume to the same dB value } 70 | end on 71 | 72 | on ui_control (VolKnob) { Anytime the user changes the panel knob, its value 73 | which is the dB setting * 10 is passed (in the variable 74 | named Vol) to user functions named update_panel and 75 | update_amp_volume. See the header comments of these two 76 | routines for details of what they do } 77 | Vol := VolKnob 78 | call update_panel { Set all the panel controls to copy the VolKnob setting } 79 | call update_amp_volume { Set Kontakt's Amp volume to the same dB value } 80 | end on 81 | 82 | on ui_control (VolSlide) { Anytime the user changes the panel slider, its value 83 | which is the dB setting * 10 is passed (in the variable 84 | named Vol) to user functions named update_panel and 85 | update_amp_volume. See the header comments of these two 86 | routines for details of what they do } 87 | Vol := VolSlide 88 | call update_panel { Set all the panel controls to copy the VolKnob setting } 89 | call update_amp_volume { Set Kontakt's Amp volume to the same dB value } 90 | end on 91 | 92 | function get_amp_vol { This routine reads Kontakt's Amp Volume setting and sets all 93 | panel controls to display the same value. It does this by reading 94 | the ep for Amp Volume and then invoking the Math function named 95 | epVolume to convert that ep to its equivalent mdB value. Then, 96 | the mdB value is divided by 100 to express it in 0.1 dB units 97 | (dB scaled by 10) and this value is passed in the variable named 98 | Vol to the user function named update_panel. See the header 99 | comments of update_panel for details of what it does. } 100 | Vol := epVolume(E2V,get_engine_par(ENGINE_PAR_VOLUME,0,-1,-1)) 101 | Vol := RoundDiv(Vol,100) { Vol = ep/100 convert from mdb to dB * 10 } 102 | call update_panel { Set all panel controls to the dB value in Vol } 103 | end function 104 | 105 | function update_amp_volume { This routine uses the scaled volume (in the variable Vol) to 106 | set Kontakt's Amplifier Volume to the same dB value. It does 107 | this by invoking the Math routine named epVolume to convert 108 | Vol to its equivalent engine par in the local var named ep } 109 | declare ep 110 | ep := epVolume(V2E,Vol*100) { Multiply Vol by 100 first to convert it to mdb units, then 111 | invoke epVolume to convert the mdb value to its equivalent 112 | ep value. This ep value can then be sent to control the 113 | Amplifier volume knob } 114 | set_engine_par(ENGINE_PAR_VOLUME,ep,0,-1,-1) 115 | end function 116 | 117 | function update_panel { This routine displays the dB value (in the variable named Vol) on 118 | all three panel controls. (Remember the integer value in Vol is dB 119 | scaled by 10). The value edit and the knob will automatically 120 | format the dB display with 0.1dB resolution. However, for the 121 | slider, we must overtly format the value in Vol so it will display 122 | with 0.1dB resolution. This is done with the library routine named 123 | DFmtVal. } 124 | declare @DB { text form of Vol } 125 | VolEdit := Vol { copy Vol to all 3 panel controls } 126 | VolKnob := Vol 127 | VolSlide := Vol 128 | DB := DFmtVal(Vol,1) { format and display slider's value with its associated label } 129 | set_text(ShowSlide,'Vol: ' & DB & ' dB') 130 | end function 131 | 132 | 133 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V701/KSE Scripts/Demo Scripts/XFadeDemo.ksp: -------------------------------------------------------------------------------- 1 | { -------------------------------------------------------------------------------- 2 | Title: S-Curve Demo 3 | Author: R.D.Villwock aka 'Big Bob' 4 | First Written: May 17, 2011 5 | Current Version: 1.20 6 | Last Modified: September 25, 2014 7 | ---------------------------------------------------------------------------------- 8 | This script provides a demonstration of four XFade functions included in 9 | the KSP Math Library. There are three variations of S-shaped curves and 10 | one equal-power function. All four provide for morphing control. } 11 | 12 | import "KSPMathV701.ksp" 13 | 14 | on init 15 | message('') 16 | set_script_title('XFade Demo') 17 | make_perfview 18 | set_ui_height(6) 19 | SetMathMode(0,DG) 20 | declare ui_table Show[128] (3,6,10000) 21 | move_control_px(Show,66,2) 22 | Show -> height := 249 23 | Show -> width := 390 24 | declare ui_menu Curve 25 | add_menu_item(Curve,'Sin/Cos S-Curve',0) 26 | add_menu_item(Curve,'Log/Exp S-Curve',1) 27 | add_menu_item(Curve,'Exp/Exp S-Curve',2) 28 | add_menu_item(Curve,'Equal-Pwr Curve',3) 29 | move_control_px(Curve,475,86) 30 | Curve -> width := 125 31 | Curve -> text_alignment := 1 32 | Curve := 0 33 | make_persistent(Curve) 34 | declare ui_knob Morph (-1000,1000,10) 35 | move_control_px(Morph,493,40) 36 | set_knob_unit(Morph,KNOB_UNIT_PERCENT) 37 | set_knob_defval(Morph,0) 38 | set_text(Morph,' Morph') 39 | Morph := 0 40 | make_persistent(Morph) 41 | declare ui_knob X (0,1000,10) 42 | move_control_px(X,459,212) 43 | set_knob_unit(X,KNOB_UNIT_PERCENT) 44 | set_text(X,' XFade') 45 | X := 0 46 | make_persistent(X) 47 | declare ui_label Y1 (1,1) 48 | move_control_px(Y1,546,212) 49 | Y1 -> width := 72 50 | declare ui_label Y2 (1,1) 51 | move_control_px(Y2,546,233) 52 | Y2 -> width := 72 53 | declare v1 54 | declare v2 55 | declare xv 56 | end on 57 | 58 | on_post_init 59 | call update_all 60 | end_on 61 | 62 | on ui_control(X) 63 | call update_all 64 | end on 65 | 66 | on ui_control(Curve) 67 | call update_all 68 | end on 69 | 70 | on ui_control(Morph) 71 | call update_all 72 | end on 73 | 74 | function update_all 75 | call show_xfade 76 | call updateY 77 | call update_cursor 78 | end function 79 | 80 | function show_xfade 81 | declare n 82 | for n := 0 to 127 83 | xv := n*1000/127 84 | call ChooseCurve 85 | if n .and. 1 = 0 86 | if v1 < 0 87 | v1 := 0 88 | end if 89 | if v1 > 10000 90 | v1 := 10000 91 | end if 92 | Show[n] := v1 93 | else 94 | if v2 < 0 95 | v2 := 0 96 | end if 97 | if v2 > 10000 98 | v2 := 10000 99 | end if 100 | Show[n] := v2 101 | end if 102 | end for 103 | end function 104 | 105 | function update_cursor 106 | declare n 107 | n := (X*127+500)/1000 108 | if n = 0 109 | inc(n) 110 | end if 111 | Show[n-1] := 10000 112 | Show[n] := 10000 113 | end function 114 | 115 | function updateY 116 | declare @s1 117 | declare @s2 118 | xv := X 119 | call ChooseCurve 120 | s1 := DFmtVal(v1,4) 121 | s2 := DFmtVal(v2,4) 122 | set_text(Y1,'VR1 = ' & s1) 123 | set_text(Y2,'VR2 = ' & s2) 124 | end function 125 | 126 | function ChooseCurve 127 | select Curve 128 | case 0 129 | S1_XFade(xv,Morph,v1,v2) 130 | case 1 131 | S2_XFade(xv,Morph,v1,v2) 132 | case 2 133 | S3_XFade(xv,Morph,v1,v2) 134 | case 3 135 | EP_XFade(xv,Morph,v1,v2) 136 | end select 137 | end function 138 | 139 | 140 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V702/Demo-Instruments/DB-Demo.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V702/Demo-Instruments/DB-Demo.nki -------------------------------------------------------------------------------- /Big Bob/Math Library/V702/Demo-Instruments/XFadeDemo.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V702/Demo-Instruments/XFadeDemo.nki -------------------------------------------------------------------------------- /Big Bob/Math Library/V702/Docs/KSPMathUserGuide_V702.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/Math Library/V702/Docs/KSPMathUserGuide_V702.pdf -------------------------------------------------------------------------------- /Big Bob/Math Library/V702/Docs/Readme_V702.txt: -------------------------------------------------------------------------------- 1 | ************************************************************************* 2 | KSP Math Library Version 7.02 7-15-15 3 | 4 | V702 of the library compiles with V1.5.2 of the KSE or the equivalent 5 | plugin for Sublime Text 3. Be sureyou have 'Optimize compiled code' 6 | enabled (this also requires that you also have 'Extra syntax checks' enabled. 7 | 8 | v702 9 | 1. Added ExpeVS, Exp2VS, Exp10VS, LogeVS, Log2VS, and Log10VS 10 | 2. Added pRange and pRange0 11 | 3. Added Clamp, Clamp0, Max, and Min 12 | 4. Neg has been deprecated, please use pLT(X,0) in new code 13 | 14 | V701 15 | 16 | 1. Added epDlyTime converter 17 | 2. Added comparison predicates pEQ,pNEQ,pLT,pGT,pLTE,and pGTE 18 | 19 | 20 | V700 21 | 22 | 1. Added inverse trig functions ACos, ASin, and ATan. 23 | 24 | 2. Added R2P and P2R for rectanglular to polar and polar to 25 | rectangular coordinate conversions. 26 | 27 | 3. Added user selectable, angular unit choices: 28 | DG - deci-grads 1000 divisions per right angle, Ang90 29 | CG - centi-grads 10000 divisions per right angle, Ang90 30 | DD - deci-degrees 900 divisions per right angle, Ang90 31 | CD - centi-degrees 9000 divisions per right angle, Ang90 32 | 33 | 4. In addition to Ang90, V700 has constants for Ang180 and Ang360. 34 | These constants always have the correct value for whatever angular 35 | unit you specify in SetMathMode. For example, if you specify DD, 36 | Ang90=900, Ang180=1800, and Ang360=3600. If you specify DG, 37 | Ang90=1000, Ang180=2000, and Ang360=4000, etc. 38 | 39 | 5. The X versions of the trig functions have been retired becuase All 40 | trig functions now accept any input angle: MinInt < Ang < MaxInt. 41 | 42 | 6. The Library now automatically compiles the pgs callback handler 43 | needed to support its own initialization. For those applications 44 | that also need to use the pgs callback, on_pgs_changed is provided 45 | as a pseudo callback directive. 46 | 47 | 7. on_post_init (another pseudo callback directive) now makes it 48 | easier than ever to add application-specific code that needs to 49 | be executed in the post-initialization phase. 50 | 51 | 8. The internal support routine for DFmtVal has been recoded more 52 | efficiently. 53 | 54 | V610 55 | 1. Fixed an initialization issue that affected some computer systems. 56 | 57 | 2. Improved the internal _NLZ routine (Number of Leading Zeros) used 58 | by many of the library's normalization routines. New version runs 59 | about 10% faster and now covers the full range from 0 to 32 leading 60 | zeros. 61 | 62 | 3. Added a new conditional predicate Sign3. 63 | 64 | 4. Added XOR function. This is a one-line functions that returns the 65 | exclusive OR of two input integers (bit by bit). 66 | 67 | V600 68 | 1. V600 provides another major overhaul of the Fast Math mode. This 69 | implementation requires no NKA files at all (before, after, or during 70 | development).The lookup tables are now automatically initialized by the 71 | library itself during normal initialization. All that you need do to 72 | switch from Standard to Fast mode or vice versa is to change the 73 | corresponding compiler switch. Please see Section 4 of the User Guide. 74 | 75 | 2. The User's Guide has been significantly revised for V600. Please be 76 | sure to read at least sections 2 and 4 to familiarize yourself with the 77 | main differences from prior versions of the library. 78 | 79 | ************************************************************************* 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V702/KSE Scripts/Demo Scripts/DB-Demo.ksp: -------------------------------------------------------------------------------- 1 | { This script illustrates how you can use a value-edit, a knob, or a slider to control 2 | Kontakt's Volume by implementing all three at the same time. With this demo script, 3 | changing any of the 3 panel controls causes the remaining 2 panel controls as well 4 | as Kontakt's Amplifier Volume to assume the same value. Similarly, changing 5 | Kontakt's Amp Volume knob will cause all three panel controls to assume the same 6 | value. In this way, all 4 controls continuously track each other. 7 | 8 | This script uses three Math Library functions. epVolume is used to bi-directionally 9 | convert between mdb volume and its equivalent engine parameter value. RoundDiv is 10 | used to perform a rounded division of the mdb value to dB scaled by 10 and DFmtVal 11 | is used to format the scaled dB value to its text representation with one decimal 12 | digit for purposes of displaying the slider's value on a label. } 13 | 14 | import "KSPMathV702.ksp" { This makes library functions available to your script. If 15 | the library is not located alongside DB-Demo, you will 16 | need to include the correct path to it in the import 17 | statement. See KSE documentation. } 18 | on init 19 | message('') { Clear status line without covering up any error messages that might 20 | occur during execution of the ICB } 21 | set_script_title('DB-Demo') 22 | SetMathMode(FL+FE,DG) { The library requires that this directive be included near the top 23 | of your ICB. With the fast_options shown, the fast-mode versions 24 | of epVolume (both directions) will be compiled. If you want to run 25 | epVolume in Standard mode, just use zero for fast_opts list. 26 | DG specifies deci-grads for an angular unit but since this script 27 | doesn't use any trig functions, this setting is unimportant. } 28 | 29 | { The following declaratives simply define the various controls to be displayed on 30 | the script panel and also declare a variable named Vol that will be used to pass 31 | a volume parameter to several callable user functions. Vol always contains the desired 32 | volume in dB scaled by 10 so it can represent volume with 0.1 dB resolution. } 33 | 34 | { VolEdit, VolKnob, and VolSlide will display volume from Muted to +12.0 dB } 35 | declare ui_value_edit VolEdit (Muted/100,120,10) { with 0.1 dB resolution } 36 | set_text(VolEdit,'Vol dB') 37 | declare ui_knob VolKnob (Muted/100,120,10) 38 | set_knob_unit(VolKnob,KNOB_UNIT_DB) 39 | set_text(VolKnob,'Volume') 40 | declare ui_slider VolSlide (Muted/100,120) 41 | move_control(VolSlide,3,1) 42 | declare ui_label ShowSlide(1,1) { Sliders have no value display of their own so } 43 | { we use an adjacent label to display its } 44 | move_control(ShowSlide,3,2) { current value. } 45 | 46 | { The Vol variable is used to to hold the current volume setting in dB*10, 47 | so it can represent volume with 0.1 dB resolution. } 48 | declare Vol { volume in dB scaled by 10 } 49 | end on 50 | 51 | on_post_init { We need to invoke get_amp_vol during initialization but since we} 52 | call get_amp_vol { want to 'call it', we put do in the post_init callback instead } 53 | end_on { of in the ICB. See User Guide for info on post_initialization } 54 | 55 | on ui_update { This callback runs when the user changes the Amp volume knob, so we 56 | call get_amp_vol to set the panel knobs to the same value as the 57 | Amp Volume knob (just like when first starting the script during 58 | post-initialization) see AppInit } 59 | call get_amp_vol { See header comments of get_amp_vol for details of what it does } 60 | end on 61 | 62 | on ui_control (VolEdit) { Anytime the user changes the panel's edit box, its value 63 | which is the dB setting * 10 is passed (in the variable 64 | named Vol) to user functions named update_panel and 65 | update_amp_volume. See the header comments of these two 66 | routines for details of what they do } 67 | Vol := VolEdit 68 | call update_panel { Set all the panel controls to copy the VolEdit setting } 69 | call update_amp_volume { Set Kontakt's Amp volume to the same dB value } 70 | end on 71 | 72 | on ui_control (VolKnob) { Anytime the user changes the panel knob, its value 73 | which is the dB setting * 10 is passed (in the variable 74 | named Vol) to user functions named update_panel and 75 | update_amp_volume. See the header comments of these two 76 | routines for details of what they do } 77 | Vol := VolKnob 78 | call update_panel { Set all the panel controls to copy the VolKnob setting } 79 | call update_amp_volume { Set Kontakt's Amp volume to the same dB value } 80 | end on 81 | 82 | on ui_control (VolSlide) { Anytime the user changes the panel slider, its value 83 | which is the dB setting * 10 is passed (in the variable 84 | named Vol) to user functions named update_panel and 85 | update_amp_volume. See the header comments of these two 86 | routines for details of what they do } 87 | Vol := VolSlide 88 | call update_panel { Set all the panel controls to copy the VolKnob setting } 89 | call update_amp_volume { Set Kontakt's Amp volume to the same dB value } 90 | end on 91 | 92 | function get_amp_vol { This routine reads Kontakt's Amp Volume setting and sets all 93 | panel controls to display the same value. It does this by reading 94 | the ep for Amp Volume and then invoking the Math function named 95 | epVolume to convert that ep to its equivalent mdB value. Then, 96 | the mdB value is divided by 100 to express it in 0.1 dB units 97 | (dB scaled by 10) and this value is passed in the variable named 98 | Vol to the user function named update_panel. See the header 99 | comments of update_panel for details of what it does. } 100 | Vol := epVolume(E2V,get_engine_par(ENGINE_PAR_VOLUME,0,-1,-1)) 101 | Vol := RoundDiv(Vol,100) { Vol = ep/100 convert from mdb to dB * 10 } 102 | call update_panel { Set all panel controls to the dB value in Vol } 103 | end function 104 | 105 | function update_amp_volume { This routine uses the scaled volume (in the variable Vol) to 106 | set Kontakt's Amplifier Volume to the same dB value. It does 107 | this by invoking the Math routine named epVolume to convert 108 | Vol to its equivalent engine par in the local var named ep } 109 | declare ep 110 | ep := epVolume(V2E,Vol*100) { Multiply Vol by 100 first to convert it to mdb units, then 111 | invoke epVolume to convert the mdb value to its equivalent 112 | ep value. This ep value can then be sent to control the 113 | Amplifier volume knob } 114 | set_engine_par(ENGINE_PAR_VOLUME,ep,0,-1,-1) 115 | end function 116 | 117 | function update_panel { This routine displays the dB value (in the variable named Vol) on 118 | all three panel controls. (Remember the integer value in Vol is dB 119 | scaled by 10). The value edit and the knob will automatically 120 | format the dB display with 0.1dB resolution. However, for the 121 | slider, we must overtly format the value in Vol so it will display 122 | with 0.1dB resolution. This is done with the library routine named 123 | DFmtVal. } 124 | declare @DB { text form of Vol } 125 | VolEdit := Vol { copy Vol to all 3 panel controls } 126 | VolKnob := Vol 127 | VolSlide := Vol 128 | DB := DFmtVal(Vol,1) { format and display slider's value with its associated label } 129 | set_text(ShowSlide,'Vol: ' & DB & ' dB') 130 | end function 131 | 132 | 133 | -------------------------------------------------------------------------------- /Big Bob/Math Library/V702/KSE Scripts/Demo Scripts/XFadeDemo.ksp: -------------------------------------------------------------------------------- 1 | { -------------------------------------------------------------------------------- 2 | Title: S-Curve Demo 3 | Author: R.D.Villwock aka 'Big Bob' 4 | First Written: May 17, 2011 5 | Current Version: 1.20 6 | Last Modified: May 5, 2015 7 | ---------------------------------------------------------------------------------- 8 | This script provides a demonstration of four XFade functions included in 9 | the KSP Math Library. There are three variations of S-shaped curves and 10 | one equal-power function. All four provide for morphing control. } 11 | 12 | import "KSPMathV702.ksp" 13 | 14 | on init 15 | message('') 16 | set_script_title('XFade Demo') 17 | make_perfview 18 | set_ui_height(6) 19 | SetMathMode(0,DG) 20 | declare ui_table Show[128] (3,6,10000) 21 | move_control_px(Show,66,2) 22 | Show -> height := 249 23 | Show -> width := 390 24 | declare ui_menu Curve 25 | add_menu_item(Curve,'Sin/Cos S-Curve',0) 26 | add_menu_item(Curve,'Log/Exp S-Curve',1) 27 | add_menu_item(Curve,'Exp/Exp S-Curve',2) 28 | add_menu_item(Curve,'Equal-Pwr Curve',3) 29 | move_control_px(Curve,475,86) 30 | Curve -> width := 125 31 | Curve -> text_alignment := 1 32 | Curve := 0 33 | make_persistent(Curve) 34 | declare ui_knob Morph (-1000,1000,10) 35 | move_control_px(Morph,493,40) 36 | set_knob_unit(Morph,KNOB_UNIT_PERCENT) 37 | set_knob_defval(Morph,0) 38 | set_text(Morph,' Morph') 39 | Morph := 0 40 | make_persistent(Morph) 41 | declare ui_knob X (0,1000,10) 42 | move_control_px(X,459,212) 43 | set_knob_unit(X,KNOB_UNIT_PERCENT) 44 | set_text(X,' XFade') 45 | X := 0 46 | make_persistent(X) 47 | declare ui_label Y1 (1,1) 48 | move_control_px(Y1,546,212) 49 | Y1 -> width := 72 50 | declare ui_label Y2 (1,1) 51 | move_control_px(Y2,546,233) 52 | Y2 -> width := 72 53 | declare v1 54 | declare v2 55 | declare xv 56 | end on 57 | 58 | on_post_init 59 | call update_all 60 | end_on 61 | 62 | on ui_control(X) 63 | call update_all 64 | end on 65 | 66 | on ui_control(Curve) 67 | call update_all 68 | end on 69 | 70 | on ui_control(Morph) 71 | call update_all 72 | end on 73 | 74 | function update_all 75 | call show_xfade 76 | call updateY 77 | call update_cursor 78 | end function 79 | 80 | function show_xfade 81 | declare n 82 | for n := 0 to 127 83 | xv := n*1000/127 84 | call ChooseCurve 85 | if n .and. 1 = 0 86 | if v1 < 0 87 | v1 := 0 88 | end if 89 | if v1 > 10000 90 | v1 := 10000 91 | end if 92 | Show[n] := v1 93 | else 94 | if v2 < 0 95 | v2 := 0 96 | end if 97 | if v2 > 10000 98 | v2 := 10000 99 | end if 100 | Show[n] := v2 101 | end if 102 | end for 103 | end function 104 | 105 | function update_cursor 106 | declare n 107 | n := (X*127+500)/1000 108 | if n = 0 109 | inc(n) 110 | end if 111 | Show[n-1] := 10000 112 | Show[n] := 10000 113 | end function 114 | 115 | function updateY 116 | declare @s1 117 | declare @s2 118 | xv := X 119 | call ChooseCurve 120 | s1 := DFmtVal(v1,4) 121 | s2 := DFmtVal(v2,4) 122 | set_text(Y1,'VR1 = ' & s1) 123 | set_text(Y2,'VR2 = ' & s2) 124 | end function 125 | 126 | function ChooseCurve 127 | select Curve 128 | case 0 129 | S1_XFade(xv,Morph,v1,v2) 130 | case 1 131 | S2_XFade(xv,Morph,v1,v2) 132 | case 2 133 | S3_XFade(xv,Morph,v1,v2) 134 | case 3 135 | EP_XFade(xv,Morph,v1,v2) 136 | end select 137 | end function 138 | 139 | 140 | -------------------------------------------------------------------------------- /Big Bob/SIPS/Documentation/Readme_V2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/Documentation/Readme_V2.txt -------------------------------------------------------------------------------- /Big Bob/SIPS/Documentation/SIPS-User'sGuide_V151.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/Documentation/SIPS-User'sGuide_V151.pdf -------------------------------------------------------------------------------- /Big Bob/SIPS/Documentation/SIPS-User'sGuide_V205.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/Documentation/SIPS-User'sGuide_V205.pdf -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/KR-Source/SIPS-Starter-V205_KR.txt: -------------------------------------------------------------------------------- 1 | { SIPS-Starter, Version 205 7-17-08 } 2 | on init 3 | set_controller(122,0) 4 | message("") 5 | end on 6 | 7 | on ui_update 8 | set_controller(122,0) 9 | end on 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/KR-Source/SIPS-SuperBender-V100_KR.txt: -------------------------------------------------------------------------------- 1 | { SIPS-SuperBender, Version 100 7-17-08 } 2 | on init 3 | declare ui_menu $PWMode 4 | add_menu_item($PWMode,"Normal Bender",1) 5 | add_menu_item($PWMode,"Super Bender",2) 6 | add_menu_item($PWMode,"Controller Only",3) 7 | $PWMode := 1 8 | move_control($PWMode,1,2) 9 | make_persistent($PWMode) 10 | declare ui_value_edit $BendRange(1, 12, 1) 11 | set_text($BendRange,"Set Range") 12 | $BendRange := 1 13 | move_control($BendRange,2,2) 14 | make_persistent($BendRange) 15 | declare ui_label $SuperState(1, 1) 16 | declare ui_label $PWModeCap(2, 1) 17 | set_text($PWModeCap,"Pitch Wheel Mode - Range or Status") 18 | move_control($PWModeCap,1,1) 19 | declare $PortMode := 0 20 | declare $SwitchOK := 1 21 | set_controller(122,0) 22 | set_controller(124,0) 23 | _read_persistent_var($PWMode) 24 | declare $LastPWMode 25 | $LastPWMode := $PWMode 26 | select ($PWMode) 27 | case 1 28 | move_control($BendRange,2,2) 29 | move_control($SuperState,0,2) 30 | case 2 31 | move_control($BendRange,0,2) 32 | move_control($SuperState,2,2) 33 | if ($PortMode=1) 34 | set_text($SuperState,"Portamento Bend") 35 | else 36 | set_text($SuperState," Legato Bend") 37 | end if 38 | case 3 39 | move_control($BendRange,0,2) 40 | move_control($SuperState,0,2) 41 | end select 42 | declare $InstTune 43 | $InstTune := _get_engine_par($ENGINE_PAR_TUNE,-1,-1,-1) 44 | set_controller(21,96) 45 | set_controller(25,0) 46 | set_controller(23,0) 47 | message("") 48 | end on 49 | 50 | on ui_update 51 | set_controller(122,0) 52 | if (%CC[128]=0) 53 | $InstTune := _get_engine_par($ENGINE_PAR_TUNE,-1,-1,-1) 54 | end if 55 | end on 56 | 57 | on ui_control($PWMode) 58 | if (%CC[128] # 0 or ($PLAYED_VOICES_INST # 0)) 59 | $PWMode := $LastPWMode 60 | else 61 | $LastPWMode := $PWMode 62 | $SwitchOK := 1 63 | $PortMode := 0 64 | set_controller(21,96) 65 | select ($PWMode) 66 | case 1 67 | move_control($BendRange,2,2) 68 | move_control($SuperState,0,2) 69 | case 2 70 | move_control($BendRange,0,2) 71 | move_control($SuperState,2,2) 72 | if ($PortMode=1) 73 | set_text($SuperState,"Portamento Bend") 74 | else 75 | set_text($SuperState," Legato Bend") 76 | end if 77 | case 3 78 | move_control($BendRange,0,2) 79 | move_control($SuperState,0,2) 80 | end select 81 | end if 82 | end on 83 | 84 | on controller 85 | if ($CC_NUM=128 and ($PWMode # 3)) 86 | if ($PWMode=2) 87 | ignore_controller 88 | if (%CC[128]<0) 89 | if ($SwitchOK=1) 90 | if (%CC[21]<127) 91 | set_controller(21,127) 92 | $PortMode := 1 93 | else 94 | set_controller(21,96) 95 | $PortMode := 0 96 | end if 97 | $SwitchOK := 0 98 | select ($PWMode) 99 | case 1 100 | move_control($BendRange,2,2) 101 | move_control($SuperState,0,2) 102 | case 2 103 | move_control($BendRange,0,2) 104 | move_control($SuperState,2,2) 105 | if ($PortMode=1) 106 | set_text($SuperState,"Portamento Bend") 107 | else 108 | set_text($SuperState," Legato Bend") 109 | end if 110 | case 3 111 | move_control($BendRange,0,2) 112 | move_control($SuperState,0,2) 113 | end select 114 | end if 115 | if ($PortMode=1) 116 | set_controller(23,abs(%CC[128])*127/8191) 117 | end if 118 | else 119 | $SwitchOK := 1 120 | set_controller(25,abs(%CC[128])*127/8191) 121 | end if 122 | else 123 | _set_engine_par($ENGINE_PAR_TUNE,%CC[128]*13889*$BendRange/8191+$InstTune,-1,-1,-1) 124 | end if 125 | end if 126 | end on 127 | 128 | -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/KS-Source/SIPS Modules/SXM-GSR-V205_KSM.txt: -------------------------------------------------------------------------------- 1 | {************************** SIPS Module ************************** 2 | Module: General Support Routines V2, SXM-GSR 3 | Author: R.D.Villwock aka 'Big Bob' 4 | First Written: September 18, 2006 5 | Current Version: 2.05 6 | Last Modified: May 31, 2008 7 | ******************************************************************} 8 | { ---------------- Data Constructor Functions ---------------- } 9 | function on_init_BigLabel 10 | declare !MsgText[8] 11 | declare ui_label BigLabel (6,6) 12 | move_control(BigLabel,1,1) { Initially cover the whole panel } 13 | end function { on_init_BigLabel } 14 | 15 | function on_init_MCMenu { Construct MIDI Controller Assignment Menu } 16 | { Special Menu indices } 17 | declare const NoCC := -1 { Token CC# when deassigned } 18 | declare const UseLastCC := -2 { Replace with last moved CC# } 19 | declare const PreOpen := -3 { Display before opening Menu } 20 | declare ui_menu MCMenu { Define the MIDI Controller assignment Menu } 21 | move_control(MCMenu,0,0) { Hide until opened } 22 | declare local n 23 | 24 | add_menu_item(MCMenu,'- MIDI Controller Menu -',NoCC) 25 | add_menu_item(MCMenu,' ----------------------',NoCC) 26 | add_menu_item(MCMenu,' Deassign Controller',NoCC) 27 | add_menu_item(MCMenu,'Assign Last CC# Moved',UseLastCC) 28 | add_menu_item(MCMenu,' ----------------------',NoCC) 29 | add_menu_item(MCMenu,CC_Name[TopCC+2],Aftertouch) 30 | add_menu_item(MCMenu,CC_Name[TopCC+1],PitchWheel) 31 | add_menu_item(MCMenu,CC_Name[TopCC+3],VelCC) 32 | for n := 0 to TopCC 33 | add_menu_item(MCMenu,'CC ' & n & ' ' & CC_Name[n],n) 34 | end for 35 | add_menu_item(MCMenu,' - MC Menu -',PreOpen) { Pre-Open caption } 36 | end function { on_init_MCMenu } 37 | 38 | function on_init_ScaleTones 39 | { Allocate and initialize Tones array with Key Name prefixes } 40 | declare !Tones[12] { Allocate Scale Tones Array } 41 | Tones[0] := ' C' 42 | Tones[1] := 'C#' 43 | Tones[2] := ' D' 44 | Tones[3] := 'D#' 45 | Tones[4] := ' E' 46 | Tones[5] := ' F' 47 | Tones[6] := 'F#' 48 | Tones[7] := ' G' 49 | Tones[8] := 'G#' 50 | Tones[9] := ' A' 51 | Tones[10] := 'A#' 52 | Tones[11] := ' B' 53 | end function { on_init_ScaleTones } 54 | 55 | function on_init_VerIR { Determine version parms and sets default Inst Range } 56 | { Version Array offsets currently in use } 57 | declare const vSID := 0 { Version offset to SID, Script ID Code } 58 | declare const vPFC := 1 { Version offset to PFC, Preset Format Code } 59 | declare Version[6] { This array is persistent, never make it any smaller } 60 | { Version 1 series, simple persistent test variables } 61 | declare XTmRng { Only used by SLS prior to V150 } 62 | declare XTime.Range { Only used by SLS in V150/151 } 63 | declare PkDwell { PkDwell only used by SVS in V1 series } 64 | XTmRng := 1000 { Set to 'impossible' values } 65 | XTime.Range := 1000 66 | PkDwell := 1000 67 | _read_persistent_var(XTmRng) { If any of these exist in prior script, } 68 | _read_persistent_var(XTime.Range) { their value will be changed from 1000 } 69 | _read_persistent_var(PkDwell) 70 | if XTmRng # 1000 or XTime.Range # 1000 71 | Version[vSID] := SLS_ID { Prior version was SLS } 72 | Version[vPFC] := V2UP - 1 { From Version 1 series } 73 | else if PkDwell # 1000 74 | Version[vSID] := SVS_ID { Prior version was SVS } 75 | Version[vPFC] := V2UP - 1 { From Version 1 series } 76 | else { Prior script not from V1 series } 77 | Version[vSID] := SID { Default (self-value) of SID for 'Freah' install } 78 | Version[vPFC] := PFC { Default (self-value) of PFC for 'Fresh' install } 79 | end if 80 | _read_persistent_var(Version) { Override defaults if prior script is from V2 series } 81 | declare LowIR := MinNote { Default IR, exclude notes below MinNote } 82 | declare TopIR := MaxNote { Default IR, exclude notes above MaxNote } 83 | end function { on_init_VerIR } 84 | 85 | { ------------------- General Support Routines ------------------ } 86 | function AddSubPanel(pmap,smap,w,x,y) 87 | { pmap = Current, full cmap array[36] 88 | smap = Sub-Panel array[w*h] where w*h <= 36 89 | w = Width of equivalent smap[w,h] 90 | x,y = pmap anchor point (for upper-left corner of sub-panel) 91 | This routine modifies current pmap to contain smap as a popup } 92 | declare ap 93 | declare np 94 | declare ns 95 | ap := x + 6*y - 7 { Linear Anchor Point offset } 96 | ns := 0 { Start index of smap } 97 | np := ap { Start index of pmap anchor point } 98 | while np < 36 { smap[ns] lies within pmap } 99 | pmap[np] := smap[ns] { Copy UI Control Index } 100 | inc(ns) { Next smap position } 101 | if ns < num_elements(smap) { smap has more elements } 102 | { Now compute corresponding pmap index, np } 103 | np := ns/w*6 + ns mod w + ap 104 | else { smap exhausted } 105 | np := 36 { Force loop exit } 106 | end if 107 | end while 108 | end function { AddSubPanel } 109 | 110 | function CopyArray(a1,a2) 111 | declare i 112 | { Copy a1 elements of array a2 to array a1, a2 >= a1 } 113 | for i := 0 to num_elements(a1) - 1 114 | a1[i] := a2[i] 115 | end for 116 | end function { CopyArray } 117 | 118 | function NOP 119 | { Dummy action to avoid empty conditionals for the KSP } 120 | LowIR := LowIR 121 | end function { NOP } 122 | 123 | function Note2Key(midi_note,key_name) 124 | { Converts a MIDI note# to a Scale-tone/Octave format string } 125 | key_name := Tones[midi_note mod 12] & (midi_note/12 -2) 126 | end function { Note2Key } 127 | 128 | function OpenMenu_(bx,warn) { Open menu for MIDI MC button bx } 129 | warn := false 130 | MBtn.Actv := true { Until CC selection is made } 131 | ShowMenu(bx) { Replace button with menu } 132 | MCMenu := PreOpen { Display pre-opening header prior to drop-down } 133 | while MBtn.Actv = true 134 | SWait(1) { Wait for CC selection, or cancellation } 135 | end while 136 | HideMenu(bx) { Replace menu with button again } 137 | MBtn.CC[bx] := MCMenu { Read selected CC# } 138 | if MBtn.CC[bx] > 119 and MBtn.SCMenu[bx] = 0 { Normal CCs only for this parm } 139 | MBtn.CC[bx] := NoCC 140 | StatMsg := 'Only CCs can be assigned to control this function' 141 | warn := true 142 | end if 143 | if MBtn.CC[bx] < 0 or (MBtn.CC[bx] > 119 and MBtn.SCMenu[bx] = 0) { De-Assign or Invalid } 144 | MBtn.CC[bx] := NoCC { Use standard unassigned CC value } 145 | DeAssignCC(bx) { Do any special deassign action } 146 | else { CC[bx] has been assigned to a valid MC# } 147 | MBtn.CCV[bx] := 0 { Use zero as initial value until MC is moved } 148 | AssignCC(bx) { Do any special assignment action } 149 | end if 150 | UpdateBtn(bx) { Update button text to show assigned CC } 151 | end function { OpenMenu_ } 152 | 153 | function SetBtnXY(bx,x,y) 154 | { Set panel position xy for btn/menu, not affected by hiding } 155 | if x > 0 156 | MBtn.x[bx] := x 157 | MBtn.y[bx] := y 158 | end if 159 | end function { SetBtnXY } 160 | 161 | function SetCC(bx) 162 | declare warn 163 | 164 | MBtn.Actv := false { Cancel any active menu } 165 | wait(3000) { Give it enough time to exit OpenMenu } 166 | Call(OpenMenu,cp1(bx),rp1(warn)) { Open this menu for selection } 167 | if warn = true 168 | BlinkStatMsg(5) 169 | end if 170 | end function { SetCC } 171 | 172 | function SetMKnobs_(ccn,ccv) 173 | declare bx 174 | declare val 175 | { Update MIDI Btns/Knobs assigned to 'ccn' with value 'ccv' } 176 | for bx := 0 to mLast { Find all btns assigned to 'ccn' } 177 | if MBtn.CC[bx] = ccn 178 | MBtn.CCV[bx] := ccv { Update value } 179 | if MBtn.Knob[bx] # 0 { If this MC also controls an associated knob .. } 180 | val := MKnob.Kmin[bx] + (MKnob.Kmax[bx] - MKnob.Kmin[bx])*MBtn.CCV[bx]/127 181 | SetMKnob(bx,val) { Update the knob's value } 182 | end if 183 | end if 184 | end for 185 | end function { SetMKnobs_ } 186 | 187 | function SetMRange(bx,kv) { Set MIDI-controlled knob range } 188 | if MBtn.CCV[bx] = 0 189 | MKnob.Kmin[bx] := kv 190 | else if MBtn.CCV[bx] = 127 191 | MKnob.Kmax[bx] := kv 192 | end if 193 | end function { SetMRange(bx,kv) } 194 | 195 | function ShowIR 196 | { Updates display of IR and LowKey/TopKey from LowIR/TopIR } 197 | Note2Key(LowIR,LowKey) 198 | Note2Key(TopIR,TopKey) 199 | set_text(IR_Box,' Low Key: ' & LowKey) { Update display } 200 | add_text_line(IR_Box,' High Key: ' & TopKey) } 201 | end function { ShowIR } 202 | 203 | function ShowPanel(pmap) 204 | { Displays a full-sized (6x6) control panel as specified in a Panel Map. 'pmap' is 205 | a 36-element array that specifies the anchor positions of all controls by means of 206 | their 'handles' (as implictly associated with the controls in the SetXY function). 207 | All other controls not specified in pmap are hidden. Negative entries in the pmap 208 | indicate panel positions that have no Control 'anchored' there. Since SetXY is a 209 | lengthy function, ShowPanel is written to only inline it one time (even though it 210 | is looped-through twice at runtime). This is done to reduce the overall size of 211 | the compiled script. } 212 | declare i 213 | declare imax 214 | declare n 215 | declare phase 216 | declare x 217 | declare y 218 | 219 | MBtn.Actv := false { Cancel any in-process Button-Menu operation } 220 | wait(3000) { Allow time for button menu to close } 221 | phase := 1 { Use 1st inner-loop pass to hide all controls } 222 | x := 0 223 | y := 0 224 | imax := MaxControl 225 | while phase < 3 226 | for i := 0 to imax 227 | if phase = 1 or pmap[i] >= 0 { pmap < 0 means no control } 228 | if phase = 1 229 | n := i 230 | else 231 | n := pmap[i] { Get control 'handle' from map } 232 | x := (i mod 6) + 1 { Determine x,y position on panel } 233 | y := i/6 + 1 234 | end if 235 | SetXY(n,x,y) { Show/Hide control n } 236 | end if 237 | end for 238 | inc(phase) { Use 2nd inner-loop pass to display all } 239 | imax := 35 { the pmap-specified controls (0..35) } 240 | end while 241 | end function { ShowPanel } 242 | 243 | function UpdateBtn(bx) { Update button text to show assigned CC } 244 | if MBtn.CC[bx] = NoCC { De-assigning CC, label as 'off' } 245 | SetBtnText(bx,MBtn.Cap[bx] & 'MC=None') 246 | MBtn.State[bx] := 0 { Set button state = off } 247 | else { Assigning the CC, label with CC# } 248 | select MBtn.CC[bx] 249 | case PitchWheel 250 | SetBtnText(bx,MBtn.Cap[bx] & 'MC = PW') 251 | case Aftertouch 252 | SetBtnText(bx,MBtn.Cap[bx] & 'MC = AT') 253 | case VelCC 254 | SetBtnText(bx,MBtn.Cap[bx] & 'MC = Vel') 255 | case 0 to TopCC 256 | SetBtnText(bx,MBtn.Cap[bx] & 'CC# = ' & MBtn.CC[bx]) 257 | end select 258 | MBtn.State[bx] := 1 { Set button state = on } 259 | end if 260 | SetBtn(bx,MBtn.State[bx]) { Set dark/lit state of button per State } 261 | end function { UpdateBtn } 262 | 263 | function WriteMsg(ntabs) 264 | { Write MsgText[] array to 'ctl' with left margin at ntabs } 265 | declare n 266 | declare @slug 267 | declare @Tab 268 | Tab := ' ' { 4 Blanks } 269 | slug := '' 270 | for n := 1 to ntabs 271 | slug := slug & Tab 272 | end for 273 | for n := 0 to 7 274 | add_text_line(BigLabel,slug & MsgText[n]) 275 | end for 276 | end function { WriteMsg } 277 | 278 | function on_init_CCNames 279 | declare i 280 | { Populate CC_Name array with 'standard' MIDI CC assignments per MMA } 281 | for i := 3 to TopCC 282 | CC_Name[i] := 'Undefined' 283 | end for 284 | declare !CC_Name[TopCC+4] { 0..TopCC + PW + AT } 285 | CC_Name[0] := 'Bsnk Select' 286 | CC_Name[1] := 'Mod Wheel' 287 | CC_Name[2] := 'Breath Control' 288 | CC_Name[4] := 'Foot Controller' 289 | CC_Name[5] := 'Portamento Time' 290 | CC_Name[6] := 'Data Entry MSB' 291 | CC_Name[7] := 'Channel Volume' 292 | CC_Name[8] := 'Balance' 293 | CC_Name[10] := 'Pan' 294 | CC_Name[11] := 'Expression' 295 | CC_Name[12] := 'Efx Ctl 1' 296 | CC_Name[13] := 'Efx Ctl 2' 297 | CC_Name[16] := 'General Ctl #1' 298 | CC_Name[17] := 'General Ctl #2' 299 | CC_Name[18] := 'General Ctl #3' 300 | CC_Name[19] := 'General Ctl #4' 301 | CC_Name[32] := 'LSB for CC 0' 302 | CC_Name[33] := 'LSB for CC 1' 303 | CC_Name[34] := 'LSB for CC 2' 304 | CC_Name[35] := 'LSB for CC 3' 305 | CC_Name[36] := 'LSB for CC 4' 306 | CC_Name[37] := 'LSB for CC 5' 307 | CC_Name[38] := 'LSB for CC 6' 308 | CC_Name[39] := 'LSB for CC 7' 309 | CC_Name[40] := 'LSB for CC 8' 310 | CC_Name[41] := 'LSB for CC 9' 311 | CC_Name[42] := 'LSB for CC 10' 312 | CC_Name[43] := 'LSB for CC 11' 313 | CC_Name[44] := 'LSB for CC 12' 314 | CC_Name[45] := 'LSB for CC 13' 315 | CC_Name[46] := 'LSB for CC 14' 316 | CC_Name[47] := 'LSB for CC 15' 317 | CC_Name[48] := 'LSB for CC 16' 318 | CC_Name[49] := 'LSB for CC 17' 319 | CC_Name[50] := 'LSB for CC 18' 320 | CC_Name[51] := 'LSB for CC 19' 321 | CC_Name[52] := 'LSB for CC 20' 322 | CC_Name[53] := 'LSB for CC 21' 323 | CC_Name[54] := 'LSB for CC 22' 324 | CC_Name[55] := 'LSB for CC 23' 325 | CC_Name[56] := 'LSB for CC 24' 326 | CC_Name[57] := 'LSB for CC 25' 327 | CC_Name[58] := 'LSB for CC 26' 328 | CC_Name[59] := 'LSB for CC 27' 329 | CC_Name[60] := 'LSB for CC 28' 330 | CC_Name[61] := 'LSB for CC 29' 331 | CC_Name[62] := 'LSB for CC 30' 332 | CC_Name[63] := 'LSB for CC 31' 333 | CC_Name[64] := 'Sustain Pedal' 334 | CC_Name[65] := 'Portamento On/Off' 335 | CC_Name[66] := 'Sustenuto On/Off' 336 | CC_Name[67] := 'Soft Pedal On/Off' 337 | CC_Name[68] := 'Legato Footswitch' 338 | CC_Name[69] := 'Hold 2' 339 | CC_Name[70] := 'Sound Ctl 1' 340 | CC_Name[71] := 'Sound Ctl 2' 341 | CC_Name[72] := 'Sound Ctl 3' 342 | CC_Name[73] := 'Sound Ctl 4' 343 | CC_Name[74] := 'Sound Ctl 5' 344 | CC_Name[75] := 'Sound Ctl 6' 345 | CC_Name[76] := 'Sound Ctl 7' 346 | CC_Name[77] := 'Sound Ctl 8' 347 | CC_Name[78] := 'Sound Ctl 9' 348 | CC_Name[79] := 'Sound Ctl 10' 349 | CC_Name[80] := 'General Ctl #5' 350 | CC_Name[81] := 'General Ctl #6' 351 | CC_Name[82] := 'General Ctl #7' 352 | CC_Name[83] := 'General Ctl #8' 353 | CC_Name[84] := 'Portamento Ctl' 354 | CC_Name[91] := 'Efx 1 Depth' 355 | CC_Name[92] := 'Efx 2 Depth' 356 | CC_Name[93] := 'Efx 3 Depth' 357 | CC_Name[94] := 'Efx 4 Depth' 358 | CC_Name[95] := 'Efx 5 Depth' 359 | CC_Name[96] := 'Data Inc' 360 | CC_Name[97] := 'Data Dec' 361 | CC_Name[98] := 'NRPN LSB' 362 | CC_Name[99] := 'NRPN MSB' 363 | CC_Name[100] := 'RPN LSB' 364 | CC_Name[101] := 'RPN MSB' 365 | CC_Name[TopCC+1] := ' - Pitch Wheel -' 366 | CC_Name[TopCC+2] := ' - Aftertouch -' 367 | CC_Name[TopCC+3] := ' - Velocity -' 368 | end function { on_init_CC } 369 | 370 | 371 | -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/KS-Source/SIPS Modules/SXM-UIC-V205_KSM.txt: -------------------------------------------------------------------------------- 1 | {************************** SIPS Module ************************** 2 | Module: Common User Interface V2, SXM-UIC 3 | Author: R.D.Villwock aka 'Big Bob' 4 | First Written: September 18, 2006 5 | Current Version: 2.05 6 | Last Modified: January 29, 2008 7 | ******************************************************************} 8 | { Rename Panel UI Handlers } 9 | on ui_control (Alpha) 10 | Show_Alpha { Display character selected } 11 | end on { Alpha Knob } 12 | 13 | on ui_control (BackSpace) 14 | BackSpace := false { Don't light this button } 15 | Back_Space { Edit Prior character } 16 | end on { BackSpace } 17 | 18 | on ui_control (CancelRename) 19 | CancelRename := 0 20 | if EditActv = true { Edit Panel Open } 21 | EditCmd := CloseEdit { Trigger Edit Panel closure } 22 | end if 23 | Preset := No_Cmd { Set Preset Menu to Idle } 24 | end on { CancelRename } 25 | 26 | on ui_control (EnterChar) 27 | EnterChar := false { Don't light this button } 28 | Enter_Char { Put selected char in EditBfr } 29 | end on { EnterChar } 30 | 31 | on ui_control (EraseName) 32 | EraseName := false { Don't light this button } 33 | Erase_Name 34 | end on { EraseName } 35 | 36 | on ui_control (LowerCase) 37 | Set_Zone { Update zone caption } 38 | end on { LowerCase } 39 | { MIDI Controller Assignment Menu Handler } 40 | on ui_control (MCMenu) { Menu for MIDI Controller assignments } 41 | if MCMenu = UseLastCC 42 | MCMenu := LastCC { Replace with last CC# moved } 43 | end if 44 | MBtn.Actv := false { Finish BtnMenu routine } 45 | end on { MCMenu } 46 | -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/KS-Source/SIPS Modules/SXM-UPS-V205_KSM.txt: -------------------------------------------------------------------------------- 1 | {************************** SIPS Module ************************** 2 | Module: User Preset Support V2, SXM-UPS 3 | Author: R.D.Villwock aka 'Big Bob' 4 | First Written: September 18, 2006 5 | Current Version: 2.05 6 | Last Modified: June 1, 2008 7 | ******************************************************************} 8 | { ---------------- Data Constructor Functions ---------------- } 9 | function on_init_Add_UserMenu { Add User Presets & Commands to Menu } 10 | { Preset Menu Indices/Commands } 11 | declare const User0 := 50 { 0..49 for Built-Ins, 50..59 for User Presets } 12 | declare const Rename := -2 { Open the User Preset Rename Dialog } 13 | declare const Save_As := -3 { Main Panel is to be saved to a User Preset } 14 | declare const Import := -4 { Set Script to receive from another like script } 15 | declare const Export := -5 { Export the next selected User Preset } 16 | { ---------------- Save As Command ----------------- } 17 | add_menu_item (Preset,' -- Save As --',Save_As) 18 | { ----------------- User Presets ------------------- } 19 | add_menu_item(Preset, UP_Name[0],User0 + 0) 20 | add_menu_item(Preset, UP_Name[1],User0 + 1) 21 | add_menu_item(Preset, UP_Name[2],User0 + 2) 22 | add_menu_item(Preset, UP_Name[3],User0 + 3) 23 | add_menu_item(Preset, UP_Name[4],User0 + 4) 24 | add_menu_item(Preset, UP_Name[5],User0 + 5) 25 | add_menu_item(Preset, UP_Name[6],User0 + 6) 26 | add_menu_item(Preset, UP_Name[7],User0 + 7) 27 | add_menu_item(Preset, UP_Name[8],User0 + 8) 28 | add_menu_item(Preset, UP_Name[9],User0 + 9) 29 | { --------------- Commands ---------------- } 30 | add_menu_item (Preset,' -- Rename --',Rename) 31 | add_menu_item (Preset,' -- Export --',Export) 32 | add_menu_item (Preset,' -- Import --',Import) 33 | end function { on_init_AddUser } 34 | 35 | function on_init_CharSet { Initialize the numeric to Char mapping array } 36 | declare !char[CharSetSize] { Allocate mapping array } 37 | char[0] := ' ' { Space } 38 | char[1] := 'A' { Upper-case Letters } 39 | char[2] := 'B' 40 | char[3] := 'C' 41 | char[4] := 'D' 42 | char[5] := 'E' 43 | char[6] := 'F' 44 | char[7] := 'G' 45 | char[8] := 'H' 46 | char[9] := 'I' 47 | char[10] := 'J' 48 | char[11] := 'K' 49 | char[12] := 'L' 50 | char[13] := 'M' 51 | char[14] := 'N' 52 | char[15] := 'O' 53 | char[16] := 'P' 54 | char[17] := 'Q' 55 | char[18] := 'R' 56 | char[19] := 'S' 57 | char[20] := 'T' 58 | char[21] := 'U' 59 | char[22] := 'V' 60 | char[23] := 'W' 61 | char[24] := 'X' 62 | char[25] := 'Y' 63 | char[26] := 'Z' 64 | char[27] := '0' { Digits } 65 | char[28] := '1' 66 | char[29] := '2' 67 | char[30] := '3' 68 | char[31] := '4' 69 | char[32] := '5' 70 | char[33] := '6' 71 | char[34] := '7' 72 | char[35] := '8' 73 | char[36] := '9' 74 | char[37] := '#' { Symbol set } 75 | char[38] := '<' 76 | char[39] := '>' 77 | char[40] := '+' 78 | char[41] := '-' { Codes 42..46 available for more symbols } 79 | declare const TopSymbol := 41 80 | declare const LC_Ofst := 46 { Upper to Lower-Case Offset } 81 | char[47] := 'a' { Lower-case letters } 82 | char[48] := 'b' 83 | char[49] := 'c' 84 | char[50] := 'd' 85 | char[51] := 'e' 86 | char[52] := 'f' 87 | char[53] := 'g' 88 | char[54] := 'h' 89 | char[55] := 'i' 90 | char[56] := 'j' 91 | char[57] := 'k' 92 | char[58] := 'l' 93 | char[59] := 'm' 94 | char[60] := 'n' 95 | char[61] := 'o' 96 | char[62] := 'p' 97 | char[63] := 'q' 98 | char[64] := 'r' 99 | char[65] := 's' 100 | char[66] := 't' 101 | char[67] := 'u' 102 | char[68] := 'v' 103 | char[69] := 'w' 104 | char[70] := 'x' 105 | char[71] := 'y' 106 | char[72] := 'z' 107 | end function { on_init_CharSet } 108 | 109 | function on_init_RenPanel { Build the Panel to Rename User Presets } 110 | declare const CloseEdit := 3 { Command to exit rename panel } 111 | declare CP { Character Pointer for Edit Bfr } 112 | declare EditActv { Flag denoting that the Name Edit Panel is active } 113 | declare EditBfr[NameChars] { Name Edit Buffer, numeric format } 114 | declare EditCmd { Command code to be executed by Edit_Name routine } 115 | declare RenSub_Map[9] := { Rename Edit subpanel Map } ( ... 116 | tNameDsp, xxx, xxx, ... 117 | uBackSp, uAlpha, uEntChr, ... 118 | uErase, xxx, uLoCase) 119 | declare RenPanel_Map[36] := (xxx) { Start out with a blank panel } 120 | RenPanel_Map[23] := uPreset { Add the Preset Button at 6,4 } 121 | RenPanel_Map[29] := uCancel { Add Cancel button at 6,5 } 122 | AddSubPanel(RenPanel_Map,RenSub_Map,3,2,3) { Add the Edit subpanel } 123 | declare @AlphaCap0 { Alpha Knob Captions } 124 | AlphaCap0 := ' Space' { Space character } 125 | declare @AlphaCap1A 126 | AlphaCap1A := ' A - Z' { Upper-case Alphabet zone } 127 | declare @AlphaCap1B 128 | AlphaCap1B := ' a - z' { Lower-case Alphabet zone } 129 | declare @AlphaCap2 130 | AlphaCap2 := ' 0 - 9' { Digits zone } 131 | declare @AlphaCap3 132 | AlphaCap3 := '# < > + -' { Symbols zone } 133 | declare ui_knob Alpha (0,TopSymbol,1) { Alpha Knob } 134 | move_control(Alpha,0,0) 135 | declare ui_button BackSpace 136 | move_control(BackSpace,0,0) 137 | set_text(BackSpace,'<< Backspace') 138 | declare ui_button EnterChar 139 | move_control(EnterChar,0,0) 140 | set_text(EnterChar,' Enter Char >>') 141 | declare ui_button LowerCase 142 | move_control(LowerCase,0,0) 143 | set_text(LowerCase,' Lower Case') 144 | declare ui_button EraseName 145 | move_control(EraseName,0,0) 146 | set_text(EraseName,' Erase All Chars') 147 | declare @NameCap 148 | NameCap := ' Enter Name (15 chars max): ' 149 | declare ui_label NameDisplay (3,1) { New User Preset Name Display } 150 | move_control(NameDisplay,0,0) 151 | declare ui_button CancelRename 152 | move_control(CancelRename,0,0) 153 | set_text(CancelRename,'Cancel Rename') 154 | end function { on_init_RenPanel } 155 | 156 | function on_init_Set_UserLimits 157 | declare const MaxParms := 51 { Max #of parameters for a User Preset } 158 | declare const NameChars := 15 { Max #of characters in a User Preset Name } 159 | declare const CharSetSize := 73 { Max #of characters in encoded naming set } 160 | declare const UserPresets := 10 { #of UserPresets, was 20 in prior versions } 161 | { UserSize := UserPresets*MaxParms Must not exceed 512 } 162 | declare const PresetBfrSize := (MaxParms+7)/3*3 { Parms + header rounded up } 163 | declare PresetBfr[PresetBfrSize] { Import/Export Buffer for one preset } 164 | { Sized as smallest multiple of 3 with at least MaxParms + 5 header words } 165 | end function { on_init_Set_UserLimits } 166 | 167 | function on_init_UserPresets 168 | declare ImpActv { Flag denoting that Import Block is being received } 169 | declare PresetParms[512] { Legacy array, for V105 auto-update import } 170 | _read_persistent_var(PresetParms) { Recover Prior Presets, V105 } 171 | declare UserParms[512] { Persistent array, never make any smaller } 172 | _read_persistent_var(UserParms) { Recover Prior Presets, V110 and up } 173 | declare !UP_Name[UserPresets] { Allocate char array for User Preset Names } 174 | { WARNING: This array is persistent, never make it any smaller } 175 | declare UPNames[10*15] := ... 176 | { 'My Preset #1'} (13,71,0,16,64,51,65,51,66,0,37,28,0,0,0, ... 177 | { 'My Preset #2'} 13,71,0,16,64,51,65,51,66,0,37,29,0,0,0, ... 178 | { 'My Preset #3'} 13,71,0,16,64,51,65,51,66,0,37,30,0,0,0, ... 179 | { 'My Preset #4'} 13,71,0,16,64,51,65,51,66,0,37,31,0,0,0, ... 180 | { 'My Preset #5'} 13,71,0,16,64,51,65,51,66,0,37,32,0,0,0, ... 181 | { 'My Preset #6'} 13,71,0,16,64,51,65,51,66,0,37,33,0,0,0, ... 182 | { 'My Preset #7'} 13,71,0,16,64,51,65,51,66,0,37,34,0,0,0, ... 183 | { 'My Preset #8'} 13,71,0,16,64,51,65,51,66,0,37,35,0,0,0, ... 184 | { 'My Preset #9'} 13,71,0,16,64,51,65,51,66,0,37,36,0,0,0, ... 185 | { 'My Preset #10'} 13,71,0,16,64,51,65,51,66,0,37,28,27,0,0) 186 | _read_persistent_var(UPNames) { Restore last-saved UPNames if any } 187 | XfrUPNames { Convert numeric UPNames to char format } 188 | end function { on_init_UserPresets } 189 | 190 | { ------------------- User Preset Support Routines --------------------- } 191 | function Back_Space { Move cursor left to edit prior character } 192 | if CP > 0 { If not at left margin, back up one char } 193 | dec(CP) { Move cursor left } 194 | if CP = 0 195 | LowerCase := false { If at left margin set for Caps } 196 | Set_Zone { Update zone caption } 197 | end if 198 | end if 199 | end function { Back_Space } 200 | 201 | function Do_Edit 202 | { This routine acts as an interface between the Preset Menu 203 | handler and the Name Editing routine. Do_Edit allows the 204 | Preset Menu handler to open and close the Name Edit Panel } 205 | if EditActv = true { Edit Panel already open } 206 | if Command # Rename { Preset selected or new command } 207 | EditCmd := CloseEdit { Start Edit Panel closure } 208 | end if 209 | else if Command = Rename { Rename request (Edit Panel not open yet) } 210 | Edit_Name { Open Edit Panel to allow name entry } 211 | end if 212 | end function { Do_Edit } 213 | 214 | function Do_Export(upx) { Send User Preset upx to Importing Script } 215 | declare i 216 | declare nx 217 | declare px 218 | declare Packet[3] 219 | declare reply 220 | 221 | { First Compose the preset block in PresetBfr } 222 | PresetBfr[0] := Version[vPFC] { Header PFC tag } 223 | PresetBfr[1] := upx { Preset index } 224 | nx := upx * NameChars 225 | for i := 0 to 2 { Pack 15-character name as 3 integers } 226 | Pack5(nx + 5*i,PresetBfr[2 + i]) 227 | end for 228 | px := upx * MaxParms 229 | for i := 0 to MaxParms - 1 { Copy the preset parms } 230 | PresetBfr[5 + i] := UserParms[px + i] 231 | end for 232 | { Now send the entire PresetBfr to first script with same SID } 233 | for px := 0 to MaxParms+4 step 3 234 | for i := 0 to 2 { Send 3 integers at a time } 235 | Packet[i] := PresetBfr[px+i] 236 | end for 237 | SendMsg(HostSID,import_block,mda(Packet),mr0(reply)) 238 | if reply # mrOK { Check for handshake } 239 | StatMsg := "Can't find Import script" 240 | MsgFlag := true 241 | px := MaxParms + 5 { Force loop exit } 242 | end if 243 | end for 244 | end function { Do_Export } 245 | 246 | function Do_Import { Receive preset and update arrays if data OK } 247 | declare i 248 | declare px 249 | 250 | if ImpActv = false { New preset import starting } 251 | ImpActv := true 252 | px := 0 253 | end if 254 | for i := 0 to 2 { Unpack the 3 integers sent with msg } 255 | PresetBfr[px+i] := EVENT_PAR[i] 256 | end for 257 | px := px + 3 258 | if px >= PresetBfrSize { All PresetBfrSize integers are assembled } 259 | XfrPreset { Verify preset format and xfr if OK } 260 | ImpActv := false { Ready for next Preset block } 261 | end if 262 | end function { Do_Import } 263 | 264 | function Edit_Name 265 | { This name editor is implemented as a Finite State Machine to reduce 266 | a lot of 'in-line expansion' of some fairly large routines. This way 267 | the biggest routines are only expanded once (in the loop of the FSM) } 268 | declare const BlinkTime := 300000 269 | { Public Edit Commands } 270 | declare const Idle := 0 271 | { Private Edit Commands } 272 | declare const OpenEdit := 1 273 | { Executable Action Routines } 274 | declare const XFlash := 0 275 | declare const XPanel := 1 276 | { Private variables } 277 | declare EditRtn 278 | 279 | EditActv := true { Activate the FSM with an initial } 280 | EditCmd := OpenEdit { command to open the editor panel } 281 | Erase_Name { Erase Name String Display, set CP = 0 } 282 | Alpha := 1 { Initialize Alpha Knob to 'A' } 283 | Show_Alpha 284 | while EditActv = true { Start FSM loop } 285 | select EditCmd { Find handler for current command } 286 | case OpenEdit { Open Rename Panel Popup } 287 | DrawPanel := RenPanel 288 | EditRtn := XPanel 289 | EditCmd := Idle { After opening, maintain cursor blink } 290 | case CloseEdit { Close Rename Panel Popup } 291 | DrawPanel := StdPanel 292 | EditRtn := XPanel 293 | EditActv := false { Deactivate and exit the FSM } 294 | end select 295 | select EditRtn { Find action routine for current command } 296 | case XFlash 297 | Show_EditBfr { Display current EditBfr string with cursor } 298 | case XPanel { Display StdPanel or RenPanel } 299 | Call(UpdatePanel,none,none) 300 | end select 301 | if EditCmd = Idle { If not executing an Open/Close command, } 302 | EditRtn := XFlash { Continue with the Flash action routine } 303 | wait(BlinkTime) { Wait for blink interval before re-cycling } 304 | end if 305 | end while 306 | end function { Edit_Name } 307 | 308 | function Enter_Char 309 | { Put selected char in EditBfr and advance the cursor } 310 | 311 | if CP < NameChars { If EditBfr not full, } 312 | EditBfr[CP] := Alpha { Add selected char to buffer } 313 | if in_range(Alpha,1,26) and LowerCase = true 314 | EditBfr[CP] := Alpha + LC_Ofst { Adjust for Case } 315 | end if 316 | if CP = 0 { Moving to 2nd char position } 317 | LowerCase := true { Assume lower case likely } 318 | Set_Zone { Zone may need updating } 319 | end if 320 | inc(CP) { Advance cursor } 321 | end if 322 | end function { Enter_Char } 323 | 324 | function Erase_Name 325 | { Clear Preset Name Entry string } 326 | CP := 0 { Set cursor to left margin } 327 | LowerCase := false { Assume upper case char will be desired } 328 | Set_Zone { Update zone caption if need be } 329 | end function { Erase_Name } 330 | 331 | function LoadParm(control,offset) 332 | { Update Control unless Parm is the undefined token } 333 | if PresetBfr[offset] # NoParm 334 | control := PresetBfr[offset] 335 | end if 336 | end function { LoadParm } 337 | 338 | function Pack5(unx,pc5) 339 | { Packs 5 numerically-encoded chars from UPNames[unx] into pc5 (an integer). 340 | Since 73^5 < 2^31 and 74^5 > 2^31, char codes are limited to a range of 341 | 0..72 max, ie CharSetSize = 73 max (to fit 5 chars into a positive integer)} 342 | declare i 343 | 344 | pc5 := 0 345 | for i := unx to unx + 4 346 | pc5 := pc5 * CharSetSize + UPNames[i] 347 | end for 348 | end function { Pack5 } 349 | 350 | function Set_Zone 351 | { Displays zone for the selected Alpha Knob character } 352 | declare @ZoneCap { Zone caption } 353 | 354 | select Alpha 355 | case 0 356 | ZoneCap := AlphaCap0 357 | case 1 to 26 { A..Z or a..z zone } 358 | if LowerCase = false 359 | ZoneCap := AlphaCap1A { A..Z zone } 360 | else 361 | ZoneCap := AlphaCap1B { a..z zone } 362 | end if 363 | case 27 to 36 364 | ZoneCap := AlphaCap2 { 0..9 zone } 365 | case 37 to TopSymbol 366 | ZoneCap := AlphaCap3 { Symbol Set zone } 367 | end select 368 | set_text(Alpha,ZoneCap) { Knob zone label } 369 | end function { Set_Zone } 370 | 371 | function Show_Alpha { Display char in knob's data window } 372 | set_knob_label(Alpha,' ' & char[Alpha]) 373 | Set_Zone { Update Zone caption } 374 | end function { Show_Alpha } 375 | 376 | function Show_EditBfr 377 | { Display the current EditBfr as a char string } 378 | declare Blink 379 | declare i 380 | declare @Name 381 | 382 | Name := NameCap { Prefix caption for entered name } 383 | for i := 0 to CP { Add characters ahead of cursor } 384 | if i = CP { At CP, add blinking cursor unless } 385 | if i < NameChars { max chars already entered } 386 | if Blink = true 387 | Name := Name & '_' 388 | else 389 | Name := Name & ' ' 390 | end if 391 | end if 392 | else { Bfr slot is ahead of cursor position } 393 | Name := Name & char[EditBfr[i]] { Add this char } 394 | end if 395 | end for 396 | set_text(NameDisplay,Name) { Display the full string } 397 | Blink := (Blink + 1) .and. 1 { Toggle the Blink flag } 398 | end function { Show_EditBfr } 399 | 400 | function Unpack5(unx,pc5) 401 | { Unpacks pc5 and as 5 numerically-encoded chars in UPNames[unx] } 402 | declare i 403 | 404 | for i := unx + 4 downto unx 405 | UPNames[i] := pc5 mod CharSetSize 406 | pc5 := pc5 / CharSetSize 407 | end for 408 | end function { Unpack5 } 409 | 410 | function Update_Name(upx) 411 | { Transfers the user-entered name from the EditBfr to UPNames array } 412 | declare i 413 | declare namebase 414 | 415 | namebase := upx * NameChars { Use index to compute start address } 416 | for i := 0 to CP - 1 { Transfer all the entered characters } 417 | UPNames[namebase + i] := EditBfr[i] 418 | end for 419 | for i := CP to NameChars - 1 { Pad remaining name char } 420 | UPNames[namebase + i] := 0 { positions with blanks } 421 | end for 422 | end function { Update_Name } 423 | 424 | function XfrPreset { Move preset from PresetBfr to destination } 425 | declare i 426 | declare npx 427 | declare px 428 | declare upx 429 | 430 | if PresetBfr[0] = Version[vPFC] { Preset formats match? } 431 | px := PresetBfr[1] { Get destination preset index } 432 | npx := px * NameChars { Start of 5-char name in name array } 433 | for i := 0 to 2 { Unpack name from buffer } 434 | Unpack5(npx + 5*i,PresetBfr[2 + i]) 435 | end for 436 | upx := px * MaxParms { Start of destination preset } 437 | for i := 0 to MaxParms - 1 { Copy parms from buffer } 438 | UserParms[upx + i] := PresetBfr[5 + i] 439 | end for 440 | StatMsg := 'Import Done' { Report successful completion } 441 | else 442 | StatMsg := 'Preset Format Mismatch' { Preset format mismatch } 443 | end if 444 | BlinkStatMsg(5) { Blink message, there's always a message } 445 | end function { XfrPreset } 446 | 447 | function XfrUPNames 448 | { Initialize UP_Name char array from numeric UPNames array } 449 | declare i 450 | declare j 451 | 452 | for i := 0 to UserPresets - 1 453 | UP_Name[i] := '' { Build each name string char by char } 454 | for j := 0 to NameChars - 1 455 | UP_Name[i] := UP_Name[i] & char[UPNames[i*NameChars + j]] 456 | end for 457 | end for 458 | end function {XfrUPNames } 459 | -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/KS-Source/SIPS-Starter-V205_KS.txt: -------------------------------------------------------------------------------- 1 | {------------------------------------------------------------------------------- 2 | Title: SIPS Starter Script 3 | Author: R.D.Villwock aka 'Big Bob' 4 | First Written: May 17, 2008 5 | Current Version: 2.05 6 | Last Modified: May 30, 2008 7 | 8 | This script can provide automatic (or at least semi-automatic) startup of SIPS 2. 9 | If you include this script (ahead of the SAS) when you save an instrument that uses the 10 | SIPS scripts, upon loading the instrument, this starter script will provide the 11 | needed CC event to start the trio of SIPS scripts. It will also provide an automatic 12 | restart whenvever you recompile any SIPS script (via the Apply button). However, if you 13 | just reload one of scripts, it itself will not be able to start and you will see the 14 | familiar 6x6 panel asking you to wiggle a CC. 15 | --------------------------------------------------------------------------------} 16 | 17 | on init 18 | declare const StartSIPS := 122 { CC used to startup SIPS 2, formerly KSP+ Timer } 19 | set_controller(StartSIPS,0) { When instrument is loaded, send startup event } 20 | message('') 21 | end on { init } 22 | 23 | on ui_update { This callback will run whenever any script is } 24 | set_controller(StartSIPS,0) { recompiled. By sending this CC event, the } 25 | end on { ui_update } { newly-compiled script will restart automatically } 26 | 27 | 28 | -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/KS-Source/SuperBender-V100_KS.txt: -------------------------------------------------------------------------------- 1 | {------------------------------------------------------------------------------- 2 | Title: Super Bender Starter Script for SIPS 2 3 | Author: R.D.Villwock aka 'Big Bob' 4 | First Written: July 8, 2008 5 | Current Version: 1.00 6 | Last Modified: July 15, 2008 7 | 8 | Besides providing the usual automatic (or at least semi-automatic) startup of SIPS 2, 9 | this script provides for a selection of Pitch Wheel modes which include the Super Bender 10 | mode. In order for this script to work properly, the SLS must be properly setup with 11 | appropriate CC assignments. See section 4.15 of the User's Guide for complete details. 12 | --------------------------------------------------------------------------------} 13 | 14 | on init 15 | { Standard CC Assignments } 16 | declare const Aftertouch := 124 { Channel Aftertouch KSP+ Proxy } 17 | declare const BendCC := 25 { Legato & Portamento Bend Control } 18 | declare const PitchWheel := 128 { K2/3 CC code for PW } 19 | declare const PTimeCC := 23 { PTime Control } 20 | declare const SLSModeCC := 21 { SLS Mode Control } 21 | declare const StartSIPS := 122 { CC to startup SIPS 2, formerly used as KSP+ Timer } 22 | { Menu Choices } 23 | declare const pwmNormal := 1 { Normal PW operation, using bend Range setting } 24 | declare const pwmSuper := 2 { PW functions as SIPS Super Bender } 25 | declare const pwmOff := 3 { PW functions as a MIDI controller only } 26 | { Misc constants } 27 | declare const false := 0 28 | declare const true := 1 29 | 30 | declare ui_menu PWMode { Pitch Wheel Mode Menu } 31 | add_menu_item(PWMode,'Normal Bender',pwmNormal) 32 | add_menu_item(PWMode,'Super Bender',pwmSuper) 33 | add_menu_item(PWMode,'Controller Only',pwmOff) 34 | PWMode := pwmNormal 35 | move_control(PWMode,1,2) 36 | make_persistent(PWMode) 37 | declare ui_value_edit BendRange (1,12,1) { Normal Bender Range in semitones } 38 | set_text(BendRange,'Set Range') 39 | BendRange := 1 { Default is one semitone } 40 | move_control(BendRange,2,2) 41 | make_persistent(BendRange) 42 | declare ui_label SuperState (1,1) { In Super Bender mode, displays current status } 43 | declare ui_label PWModeCap (2,1) 44 | set_text(PWModeCap,'Pitch Wheel Mode - Range or Status') 45 | move_control(PWModeCap,1,1) 46 | 47 | declare PortMode := false { Flag set when SLS is in portamento mode } 48 | declare SwitchOK := true { Enable Super Bender Switch initially } 49 | set_controller(StartSIPS,0) { When instrument is loaded, send startup event } 50 | set_controller(Aftertouch,0) { Initialize Aftertouch to zero } 51 | _read_persistent_var(PWMode) 52 | declare LastPWMode 53 | LastPWMode := PWMode 54 | PWState 55 | declare InstTune 56 | InstTune := _get_engine_par(ENGINE_PAR_TUNE,-1,-1,-1) { Initial Inst Tuning } 57 | set_controller(SLSModeCC,96) { Srart SLS in Legato Mode } 58 | set_controller(BendCC,0) 59 | set_controller(PTimeCC,0) 60 | message('') 61 | end on { init } 62 | 63 | on ui_update { When a script is compiled or instrument tuning is changed } 64 | set_controller(StartSIPS,0) { Restart SIPS if need be } 65 | if CC[PitchWheel] = 0 { If not bending and user has changed inst tune } 66 | InstTune := _get_engine_par(ENGINE_PAR_TUNE,-1,-1,-1) { Update PW = 0 Tuning } 67 | end if 68 | end on { ui_update } 69 | 70 | on ui_control (PWMode) 71 | if CC[PitchWheel] # 0 or PLAYED_VOICES_INST # 0 72 | PWMode := LastPWMode { Don't allow a PW Mode change } 73 | else { OK to change mode } 74 | LastPWMode := PWMode { Update LastPWMode } 75 | SwitchOK := true { Enable Port/Leg switching } 76 | PortMode := false { Set SLS to Legato Mode } 77 | set_controller(SLSModeCC,96) 78 | PWState { Update PW Mode and Status Display } 79 | end if 80 | end on { PWMode } 81 | 82 | on controller 83 | if CC_NUM = PitchWheel and PWMode # pwmOff 84 | if PWMode = pwmSuper 85 | ignore_controller 86 | if CC[PitchWheel] < 0 { PW mode switch request } 87 | if SwitchOK = true { OK to honor request } 88 | if CC[SLSModeCC] < 127 { If in any mode other than Portamento } 89 | set_controller(SLSModeCC,127) { Change to Portamento Mode } 90 | PortMode := true 91 | else 92 | set_controller(SLSModeCC,96) { Change to Legato Mode } 93 | PortMode := false 94 | end if 95 | SwitchOK := false { No more mode changes allowed until PW >= 0 } 96 | PWState { Update switch status display } 97 | end if 98 | if PortMode = true { Map PW to PTime controller } 99 | set_controller(PTimeCC,abs(CC[PitchWheel])*127/8191) 100 | end if 101 | else { After PW is out of negative region } 102 | SwitchOK := true { Make it OK for PW to switch modes again } 103 | set_controller(BendCC,abs(CC[PitchWheel])*127/8191) { Map PW to Leg/PBend CC } 104 | end if 105 | else { Normal Bender mode, tune overall instrument via the PW } 106 | _set_engine_par(ENGINE_PAR_TUNE,CC[PitchWheel]*13889*BendRange/8191+InstTune,-1,-1,-1) 107 | end if 108 | end if 109 | end on { controller } 110 | 111 | function PWState { Update display to reflect current PW Mode and Bender status } 112 | select PWMode 113 | case pwmNormal 114 | move_control(BendRange,2,2) 115 | move_control(SuperState,0,2) 116 | case pwmSuper 117 | move_control(BendRange,0,2) 118 | move_control(SuperState,2,2) 119 | if PortMode = true 120 | set_text(SuperState,'Portamento Bend') 121 | else 122 | set_text(SuperState,' Legato Bend') 123 | end if 124 | case pwmOff 125 | move_control(BendRange,0,2) 126 | move_control(SuperState,0,2) 127 | end select 128 | end function { PWState } 129 | 130 | 131 | -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/Precompiled/No MultiScript.nkm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/SIPS Scripts/Precompiled/No MultiScript.nkm -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/Precompiled/SIPS-Articulation-V205.nkp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/SIPS Scripts/Precompiled/SIPS-Articulation-V205.nkp -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/Precompiled/SIPS-Legato-V205.nkp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/SIPS Scripts/Precompiled/SIPS-Legato-V205.nkp -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/Precompiled/SIPS-Starter-V205.nkp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/SIPS Scripts/Precompiled/SIPS-Starter-V205.nkp -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/Precompiled/SIPS-Vibrato-V205.nkp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/SIPS Scripts/Precompiled/SIPS-Vibrato-V205.nkp -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/Precompiled/SIPS_KSP+.nkm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/SIPS Scripts/Precompiled/SIPS_KSP+.nkm -------------------------------------------------------------------------------- /Big Bob/SIPS/SIPS Scripts/Precompiled/SuperBender-V100.nkp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/SIPS Scripts/Precompiled/SuperBender-V100.nkp -------------------------------------------------------------------------------- /Big Bob/SIPS/Wallpaper/SIPS2 .tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/SIPS/Wallpaper/SIPS2 .tga -------------------------------------------------------------------------------- /Big Bob/TCM-UserGuide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/TCM-UserGuide.pdf -------------------------------------------------------------------------------- /Big Bob/WIPS/Docs/AETGuidePart1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/Docs/AETGuidePart1.pdf -------------------------------------------------------------------------------- /Big Bob/WIPS/Docs/AETGuidePart2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/Docs/AETGuidePart2.pdf -------------------------------------------------------------------------------- /Big Bob/WIPS/Docs/Readme.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/Docs/Readme.doc -------------------------------------------------------------------------------- /Big Bob/WIPS/Docs/Readme.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/Docs/Readme.pdf -------------------------------------------------------------------------------- /Big Bob/WIPS/Docs/TCM-UserGuide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/Docs/TCM-UserGuide.pdf -------------------------------------------------------------------------------- /Big Bob/WIPS/Docs/VirtualWindIntruments.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/Docs/VirtualWindIntruments.pdf -------------------------------------------------------------------------------- /Big Bob/WIPS/Docs/WIPS-UserGuide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/Docs/WIPS-UserGuide.pdf -------------------------------------------------------------------------------- /Big Bob/WIPS/Docs/WIPS-UserGuideV104.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/Docs/WIPS-UserGuideV104.pdf -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Instruments/Wips Example.nki: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Instruments/Wips Example.nki -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-a#3.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-a#3.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-a#4.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-a#4.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-a#5.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-a#5.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-c#4.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-c#4.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-c#5.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-c#5.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-c#6.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-c#6.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-e3.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-e3.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-e4.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-e4.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-e5.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-e5.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-e6.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-e6.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-g3.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-g3.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-g4.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-g4.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/Samples/trumpet-g5.ncw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/Samples/trumpet-g5.ncw -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/WIPSV104.nkc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/WIPSV104.nkc -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS Example/WIPSV104.nkr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS Example/WIPSV104.nkr -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/NKP Files/PCMapper.nkp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/NKP Files/PCMapper.nkp -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/NKP Files/WIPSV103-Art.nkp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/NKP Files/WIPSV103-Art.nkp -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/NKP Files/WIPSV103-Leg.nkp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/NKP Files/WIPSV103-Leg.nkp -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/NKP Files/WIPSV103-Vib.nkp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/NKP Files/WIPSV103-Vib.nkp -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Data/FSin.nka: -------------------------------------------------------------------------------- 1 | %FSin 2 | 0 3 | 16 4 | 32 5 | 47 6 | 63 7 | 79 8 | 94 9 | 110 10 | 126 11 | 141 12 | 157 13 | 173 14 | 188 15 | 204 16 | 220 17 | 236 18 | 251 19 | 267 20 | 283 21 | 299 22 | 314 23 | 330 24 | 346 25 | 362 26 | 377 27 | 393 28 | 408 29 | 424 30 | 440 31 | 455 32 | 471 33 | 486 34 | 502 35 | 518 36 | 534 37 | 549 38 | 565 39 | 581 40 | 597 41 | 612 42 | 628 43 | 644 44 | 660 45 | 675 46 | 691 47 | 706 48 | 722 49 | 737 50 | 753 51 | 769 52 | 785 53 | 800 54 | 816 55 | 832 56 | 847 57 | 863 58 | 879 59 | 894 60 | 910 61 | 925 62 | 941 63 | 957 64 | 972 65 | 988 66 | 1004 67 | 1020 68 | 1035 69 | 1050 70 | 1066 71 | 1082 72 | 1097 73 | 1113 74 | 1129 75 | 1144 76 | 1160 77 | 1175 78 | 1191 79 | 1206 80 | 1222 81 | 1238 82 | 1254 83 | 1269 84 | 1284 85 | 1300 86 | 1316 87 | 1331 88 | 1347 89 | 1362 90 | 1378 91 | 1394 92 | 1409 93 | 1425 94 | 1440 95 | 1455 96 | 1471 97 | 1487 98 | 1502 99 | 1518 100 | 1533 101 | 1549 102 | 1565 103 | 1580 104 | 1595 105 | 1611 106 | 1627 107 | 1642 108 | 1657 109 | 1673 110 | 1689 111 | 1704 112 | 1719 113 | 1735 114 | 1751 115 | 1766 116 | 1781 117 | 1797 118 | 1812 119 | 1827 120 | 1843 121 | 1859 122 | 1874 123 | 1889 124 | 1905 125 | 1920 126 | 1935 127 | 1951 128 | 1966 129 | 1982 130 | 1997 131 | 2012 132 | 2028 133 | 2043 134 | 2059 135 | 2074 136 | 2089 137 | 2105 138 | 2120 139 | 2135 140 | 2151 141 | 2166 142 | 2181 143 | 2197 144 | 2212 145 | 2228 146 | 2242 147 | 2258 148 | 2273 149 | 2289 150 | 2304 151 | 2319 152 | 2335 153 | 2350 154 | 2365 155 | 2380 156 | 2396 157 | 2410 158 | 2426 159 | 2441 160 | 2457 161 | 2471 162 | 2487 163 | 2502 164 | 2518 165 | 2532 166 | 2548 167 | 2563 168 | 2578 169 | 2593 170 | 2608 171 | 2624 172 | 2639 173 | 2654 174 | 2669 175 | 2684 176 | 2699 177 | 2714 178 | 2729 179 | 2745 180 | 2760 181 | 2775 182 | 2790 183 | 2805 184 | 2820 185 | 2835 186 | 2850 187 | 2865 188 | 2881 189 | 2895 190 | 2910 191 | 2925 192 | 2941 193 | 2955 194 | 2970 195 | 2986 196 | 3001 197 | 3015 198 | 3030 199 | 3045 200 | 3060 201 | 3075 202 | 3090 203 | 3105 204 | 3120 205 | 3135 206 | 3150 207 | 3165 208 | 3180 209 | 3194 210 | 3209 211 | 3224 212 | 3239 213 | 3254 214 | 3269 215 | 3284 216 | 3299 217 | 3313 218 | 3328 219 | 3343 220 | 3358 221 | 3372 222 | 3387 223 | 3402 224 | 3417 225 | 3432 226 | 3446 227 | 3461 228 | 3476 229 | 3491 230 | 3505 231 | 3520 232 | 3535 233 | 3549 234 | 3564 235 | 3579 236 | 3593 237 | 3608 238 | 3623 239 | 3638 240 | 3652 241 | 3667 242 | 3681 243 | 3696 244 | 3711 245 | 3725 246 | 3740 247 | 3754 248 | 3768 249 | 3783 250 | 3798 251 | 3812 252 | 3827 253 | 3841 254 | 3856 255 | 3871 256 | 3885 257 | 3899 258 | 3914 259 | 3928 260 | 3942 261 | 3957 262 | 3972 263 | 3986 264 | 4000 265 | 4015 266 | 4029 267 | 4044 268 | 4058 269 | 4072 270 | 4087 271 | 4101 272 | 4115 273 | 4129 274 | 4144 275 | 4158 276 | 4172 277 | 4187 278 | 4201 279 | 4215 280 | 4229 281 | 4244 282 | 4258 283 | 4272 284 | 4286 285 | 4300 286 | 4315 287 | 4329 288 | 4343 289 | 4357 290 | 4371 291 | 4385 292 | 4399 293 | 4414 294 | 4428 295 | 4441 296 | 4456 297 | 4470 298 | 4484 299 | 4498 300 | 4512 301 | 4526 302 | 4540 303 | 4554 304 | 4568 305 | 4582 306 | 4596 307 | 4610 308 | 4624 309 | 4638 310 | 4651 311 | 4665 312 | 4679 313 | 4693 314 | 4707 315 | 4721 316 | 4735 317 | 4749 318 | 4762 319 | 4776 320 | 4790 321 | 4804 322 | 4817 323 | 4831 324 | 4845 325 | 4859 326 | 4873 327 | 4886 328 | 4900 329 | 4914 330 | 4927 331 | 4941 332 | 4955 333 | 4968 334 | 4982 335 | 4995 336 | 5009 337 | 5023 338 | 5036 339 | 5050 340 | 5063 341 | 5077 342 | 5090 343 | 5104 344 | 5118 345 | 5131 346 | 5144 347 | 5158 348 | 5171 349 | 5185 350 | 5198 351 | 5212 352 | 5225 353 | 5238 354 | 5252 355 | 5265 356 | 5279 357 | 5292 358 | 5305 359 | 5318 360 | 5332 361 | 5345 362 | 5358 363 | 5372 364 | 5385 365 | 5398 366 | 5411 367 | 5424 368 | 5438 369 | 5451 370 | 5464 371 | 5477 372 | 5490 373 | 5503 374 | 5516 375 | 5530 376 | 5542 377 | 5556 378 | 5569 379 | 5582 380 | 5595 381 | 5608 382 | 5621 383 | 5634 384 | 5647 385 | 5660 386 | 5673 387 | 5686 388 | 5698 389 | 5711 390 | 5724 391 | 5737 392 | 5750 393 | 5763 394 | 5776 395 | 5789 396 | 5801 397 | 5814 398 | 5827 399 | 5839 400 | 5852 401 | 5865 402 | 5878 403 | 5891 404 | 5903 405 | 5916 406 | 5929 407 | 5941 408 | 5954 409 | 5966 410 | 5979 411 | 5992 412 | 6004 413 | 6017 414 | 6029 415 | 6042 416 | 6054 417 | 6067 418 | 6079 419 | 6092 420 | 6104 421 | 6117 422 | 6129 423 | 6141 424 | 6154 425 | 6166 426 | 6179 427 | 6191 428 | 6203 429 | 6216 430 | 6228 431 | 6240 432 | 6252 433 | 6265 434 | 6277 435 | 6289 436 | 6301 437 | 6314 438 | 6326 439 | 6338 440 | 6350 441 | 6362 442 | 6374 443 | 6386 444 | 6398 445 | 6411 446 | 6423 447 | 6434 448 | 6447 449 | 6459 450 | 6471 451 | 6482 452 | 6494 453 | 6506 454 | 6519 455 | 6530 456 | 6542 457 | 6554 458 | 6566 459 | 6578 460 | 6590 461 | 6601 462 | 6613 463 | 6625 464 | 6637 465 | 6649 466 | 6660 467 | 6672 468 | 6684 469 | 6695 470 | 6707 471 | 6718 472 | 6730 473 | 6742 474 | 6753 475 | 6765 476 | 6777 477 | 6788 478 | 6799 479 | 6811 480 | 6823 481 | 6834 482 | 6845 483 | 6857 484 | 6868 485 | 6880 486 | 6891 487 | 6902 488 | 6914 489 | 6925 490 | 6936 491 | 6948 492 | 6959 493 | 6971 494 | 6982 495 | 6993 496 | 7004 497 | 7016 498 | 7026 499 | 7038 500 | 7049 501 | 7060 502 | 7071 503 | 7082 504 | 7093 505 | 7104 506 | 7115 507 | 7126 508 | 7137 509 | 7148 510 | 7160 511 | 7170 512 | 7181 513 | 7192 514 | 7203 515 | 7214 516 | 7225 517 | 7236 518 | 7247 519 | 7257 520 | 7268 521 | 7279 522 | 7290 523 | 7301 524 | 7311 525 | 7322 526 | 7333 527 | 7343 528 | 7354 529 | 7365 530 | 7375 531 | 7386 532 | 7396 533 | 7407 534 | 7418 535 | 7428 536 | 7438 537 | 7449 538 | 7460 539 | 7470 540 | 7480 541 | 7491 542 | 7501 543 | 7511 544 | 7522 545 | 7532 546 | 7542 547 | 7553 548 | 7563 549 | 7573 550 | 7583 551 | 7594 552 | 7604 553 | 7614 554 | 7624 555 | 7635 556 | 7645 557 | 7655 558 | 7665 559 | 7675 560 | 7685 561 | 7695 562 | 7705 563 | 7715 564 | 7725 565 | 7735 566 | 7745 567 | 7755 568 | 7765 569 | 7775 570 | 7784 571 | 7794 572 | 7804 573 | 7814 574 | 7824 575 | 7834 576 | 7843 577 | 7853 578 | 7863 579 | 7873 580 | 7882 581 | 7892 582 | 7901 583 | 7911 584 | 7921 585 | 7931 586 | 7940 587 | 7949 588 | 7959 589 | 7968 590 | 7978 591 | 7987 592 | 7997 593 | 8006 594 | 8016 595 | 8025 596 | 8035 597 | 8044 598 | 8053 599 | 8062 600 | 8072 601 | 8081 602 | 8090 603 | 8099 604 | 8109 605 | 8118 606 | 8127 607 | 8136 608 | 8145 609 | 8154 610 | 8163 611 | 8172 612 | 8182 613 | 8190 614 | 8199 615 | 8209 616 | 8218 617 | 8226 618 | 8235 619 | 8244 620 | 8253 621 | 8262 622 | 8271 623 | 8280 624 | 8289 625 | 8297 626 | 8306 627 | 8315 628 | 8324 629 | 8332 630 | 8341 631 | 8350 632 | 8358 633 | 8367 634 | 8375 635 | 8384 636 | 8392 637 | 8401 638 | 8409 639 | 8418 640 | 8426 641 | 8435 642 | 8443 643 | 8452 644 | 8460 645 | 8468 646 | 8477 647 | 8485 648 | 8493 649 | 8502 650 | 8510 651 | 8518 652 | 8526 653 | 8535 654 | 8543 655 | 8551 656 | 8559 657 | 8567 658 | 8575 659 | 8583 660 | 8591 661 | 8599 662 | 8608 663 | 8615 664 | 8623 665 | 8631 666 | 8639 667 | 8647 668 | 8655 669 | 8663 670 | 8671 671 | 8678 672 | 8686 673 | 8694 674 | 8702 675 | 8709 676 | 8717 677 | 8725 678 | 8732 679 | 8740 680 | 8748 681 | 8756 682 | 8763 683 | 8771 684 | 8778 685 | 8786 686 | 8793 687 | 8801 688 | 8808 689 | 8816 690 | 8823 691 | 8830 692 | 8838 693 | 8845 694 | 8852 695 | 8860 696 | 8867 697 | 8874 698 | 8881 699 | 8889 700 | 8896 701 | 8903 702 | 8910 703 | 8917 704 | 8924 705 | 8931 706 | 8938 707 | 8945 708 | 8952 709 | 8960 710 | 8966 711 | 8973 712 | 8980 713 | 8987 714 | 8994 715 | 9001 716 | 9008 717 | 9014 718 | 9021 719 | 9028 720 | 9035 721 | 9042 722 | 9048 723 | 9055 724 | 9062 725 | 9068 726 | 9075 727 | 9081 728 | 9088 729 | 9095 730 | 9101 731 | 9108 732 | 9114 733 | 9121 734 | 9127 735 | 9133 736 | 9140 737 | 9146 738 | 9152 739 | 9159 740 | 9165 741 | 9171 742 | 9177 743 | 9184 744 | 9190 745 | 9196 746 | 9202 747 | 9208 748 | 9215 749 | 9221 750 | 9227 751 | 9233 752 | 9239 753 | 9245 754 | 9251 755 | 9257 756 | 9263 757 | 9269 758 | 9274 759 | 9280 760 | 9286 761 | 9292 762 | 9298 763 | 9304 764 | 9309 765 | 9315 766 | 9321 767 | 9326 768 | 9332 769 | 9338 770 | 9343 771 | 9349 772 | 9355 773 | 9360 774 | 9365 775 | 9371 776 | 9377 777 | 9382 778 | 9387 779 | 9393 780 | 9398 781 | 9403 782 | 9409 783 | 9414 784 | 9419 785 | 9425 786 | 9430 787 | 9435 788 | 9440 789 | 9445 790 | 9451 791 | 9456 792 | 9461 793 | 9466 794 | 9471 795 | 9476 796 | 9481 797 | 9486 798 | 9491 799 | 9496 800 | 9501 801 | 9506 802 | 9511 803 | 9515 804 | 9520 805 | 9525 806 | 9530 807 | 9535 808 | 9539 809 | 9544 810 | 9549 811 | 9553 812 | 9558 813 | 9563 814 | 9567 815 | 9572 816 | 9576 817 | 9581 818 | 9585 819 | 9590 820 | 9594 821 | 9599 822 | 9603 823 | 9607 824 | 9612 825 | 9616 826 | 9620 827 | 9625 828 | 9629 829 | 9633 830 | 9637 831 | 9641 832 | 9646 833 | 9650 834 | 9654 835 | 9658 836 | 9662 837 | 9666 838 | 9670 839 | 9674 840 | 9678 841 | 9682 842 | 9686 843 | 9690 844 | 9694 845 | 9697 846 | 9701 847 | 9705 848 | 9709 849 | 9713 850 | 9716 851 | 9720 852 | 9724 853 | 9727 854 | 9731 855 | 9735 856 | 9738 857 | 9742 858 | 9745 859 | 9749 860 | 9752 861 | 9756 862 | 9759 863 | 9763 864 | 9766 865 | 9769 866 | 9773 867 | 9776 868 | 9779 869 | 9783 870 | 9786 871 | 9789 872 | 9792 873 | 9795 874 | 9799 875 | 9802 876 | 9805 877 | 9808 878 | 9811 879 | 9814 880 | 9817 881 | 9820 882 | 9823 883 | 9826 884 | 9829 885 | 9832 886 | 9835 887 | 9837 888 | 9840 889 | 9843 890 | 9846 891 | 9848 892 | 9851 893 | 9854 894 | 9856 895 | 9859 896 | 9862 897 | 9864 898 | 9867 899 | 9869 900 | 9872 901 | 9874 902 | 9877 903 | 9879 904 | 9882 905 | 9884 906 | 9886 907 | 9889 908 | 9891 909 | 9894 910 | 9896 911 | 9898 912 | 9900 913 | 9902 914 | 9905 915 | 9907 916 | 9909 917 | 9911 918 | 9913 919 | 9915 920 | 9917 921 | 9919 922 | 9921 923 | 9923 924 | 9925 925 | 9927 926 | 9929 927 | 9931 928 | 9933 929 | 9934 930 | 9936 931 | 9938 932 | 9940 933 | 9941 934 | 9943 935 | 9945 936 | 9946 937 | 9948 938 | 9949 939 | 9951 940 | 9953 941 | 9954 942 | 9956 943 | 9957 944 | 9959 945 | 9960 946 | 9961 947 | 9963 948 | 9964 949 | 9965 950 | 9967 951 | 9968 952 | 9969 953 | 9970 954 | 9972 955 | 9973 956 | 9974 957 | 9975 958 | 9976 959 | 9977 960 | 9978 961 | 9979 962 | 9980 963 | 9981 964 | 9982 965 | 9983 966 | 9984 967 | 9985 968 | 9986 969 | 9987 970 | 9987 971 | 9988 972 | 9989 973 | 9990 974 | 9990 975 | 9991 976 | 9992 977 | 9992 978 | 9993 979 | 9993 980 | 9994 981 | 9995 982 | 9995 983 | 9996 984 | 9996 985 | 9996 986 | 9997 987 | 9997 988 | 9998 989 | 9998 990 | 9998 991 | 9999 992 | 9999 993 | 9999 994 | 9999 995 | 9999 996 | 10000 997 | 10000 998 | 10000 999 | 10000 1000 | 10000 1001 | 10000 1002 | 10000 1003 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvBG24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvBG24.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvBG24.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 24 3 | Horizontal Animation: no 4 | Vertical Resizable: yes 5 | Horizontal Resizable: yes 6 | Fixed Top: 2 7 | Fixed Bottom: 2 8 | Fixed Left: 2 9 | Fixed Right: 2 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvBlk_Skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvBlk_Skin.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvBlk_Skin.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: no 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: yes 5 | Horizontal Resizable: yes 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCheckBox_Blk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCheckBox_Blk.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCheckBox_Blk.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 6 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCheckBox_Wht.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCheckBox_Wht.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCheckBox_Wht.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 6 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvClr_Skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvClr_Skin.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvClr_Skin.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: yes 5 | Horizontal Resizable: yes 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_ExpDn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_ExpDn.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_ExpDn.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_ExpUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_ExpUp.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_ExpUp.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_SDn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_SDn.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_SDn.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_SUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_SUp.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvCurves_SUp.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvFloat_Caption.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvFloat_Caption.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvFloat_Caption.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 1 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvGrayedDelay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvGrayedDelay.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvGrayedDelay.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: no 2 | Number of Animations: 1 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLIstBox_ScrollDn.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: no 2 | Number of Animations: 6 3 | Horizontal Animation: yes 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_ClearBtn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_ClearBtn.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_ClearBtn.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 6 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_Left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_Left.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_Left.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_Right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_Right.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_Right.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: yes 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 8 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_ScrollDn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_ScrollDn.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_ScrollUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_ScrollUp.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_ScrollUp.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: no 2 | Number of Animations: 6 3 | Horizontal Animation: yes 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_Select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_Select.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvListBox_Select.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 6 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Leg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Leg.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Leg.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 1 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Play.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Play.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 1 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Setup.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Setup.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 1 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Vib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Vib.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvLogo_Vib.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 1 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvRedBlu_Dots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvRedBlu_Dots.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvRedBlu_Dots.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvRedBlu_Ring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvRedBlu_Ring.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvRedBlu_Ring.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvRedBtn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvRedBtn.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvRedBtn.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 6 3 | Horizontal Animation: no 4 | Vertical Resizable: yes 5 | Horizontal Resizable: yes 6 | Fixed Top: 8 7 | Fixed Bottom: 7 8 | Fixed Left: 3 9 | Fixed Right: 3 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderB1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderB1.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderB1.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 69 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderB2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderB2.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderB2.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 161 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderScale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderScale.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderScale.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 0 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderU2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderU2.png -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/Resources/pictures/rdvSliderU2.txt: -------------------------------------------------------------------------------- 1 | Has Alpha Channel: yes 2 | Number of Animations: 161 3 | Horizontal Animation: no 4 | Vertical Resizable: no 5 | Horizontal Resizable: no 6 | Fixed Top: 0 7 | Fixed Bottom: 0 8 | Fixed Left: 0 9 | Fixed Right: 0 10 | -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/WIPSV103.nkc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/WIPSV103.nkc -------------------------------------------------------------------------------- /Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/WIPSV103.nkr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Big Bob/WIPS/WIPS V103 Editable/WIPS_Resources/WIPSV103.nkr -------------------------------------------------------------------------------- /Kontakt Font Reference.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidhealey/kontakt-scripting-framework/a5b8d86078eb2310f759dc16b1f652fbf1c78315/Kontakt Font Reference.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 David Healey 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # kontakt-scripting-framework 2 | Collection of Kontakt script libraries. 3 | 4 | Please read the license file. 5 | 6 | To use these scripts you must be using the SublimeKSP plugin inside Sublime Text 3 or later. The plugin can be found here - https://github.com/nojanath/SublimeKSP 7 | 8 | You must be using the task control module - tcm. 9 | 10 | Some of the functions make use of Big Bob's math library, such functions have been commented out by default so you'll need to uncomment them if you wish to use them. 11 | 12 | The scripts in the modules folder are in various states of completion and are not guaranteed to work but you might find them useful as a jumping off point for your own script. 13 | -------------------------------------------------------------------------------- /libraries/arrays.ksp: -------------------------------------------------------------------------------- 1 | {--------------------------------------------------------------------- 2 | Title: Arrays 3 | File: arrays.txt 4 | Author: David Healey 5 | First Written: June 17 2012 6 | ----------------------------------------------------------------------} 7 | 8 | {/** 9 | * Creates a psuedo 2D pgs key 10 | */} 11 | macro array.2D_pgs(#name#, d1, d2) 12 | 13 | pgs_create_key(_#name#_2d, d1*d2) 14 | 15 | family #name# 16 | declare const SIZE_D1 := d1 17 | declare const SIZE_D2 := d2 18 | end family 19 | 20 | property #name# 21 | 22 | function get(x, y) -> result 23 | result := pgs_get_key_val(_#name#_2d, y * d1 + x) 24 | end function 25 | 26 | function set(x, y, value) 27 | pgs_set_key_val(_#name#_2d, y * d1 + x, value) 28 | end function 29 | 30 | end property 31 | 32 | end macro 33 | 34 | {/** 35 | * Deprecated, use latest sublime KSP plugin which includes support for multi-dimensional arrays 36 | * 37 | * Creates a psuedo 2D array using the property command. 38 | * 39 | * @param Name Name of the 2D array 40 | * @param c Number of columns 41 | * @param r Number of rows 42 | */} 43 | macro array.2D_array(#name#, d1, d2, default, persistent) 44 | 45 | declare #name#_array_data[d1*d2] := (default) {Fill the array with default value} 46 | 47 | if (persistent = 1) 48 | make_persistent(#name#_array_data) 49 | read_persistent_var(#name#_array_data) 50 | end if 51 | 52 | family #name# 53 | declare const X := d1 54 | declare const Y := d2 55 | end family 56 | 57 | property #name# 58 | 59 | function get(x, y) -> result 60 | result := #name#_array_data[y * d1 + x] 61 | end function 62 | 63 | function set(x, y, value) 64 | #name#_array_data[y * d1 + x] := value 65 | end function 66 | 67 | end property 68 | 69 | end macro 70 | 71 | {/** 72 | * Deprecated, use latest sublime KSP plugin which includes support for multi-dimensional arrays 73 | * 74 | * Creates a psuedo 3D array using the property command. 75 | * 76 | * @param Name Name of the 2D array 77 | * @param d1 Number of rows 78 | * @param d2 Number of columns 79 | * @param d3 Number of layers 80 | */} 81 | macro array.3D_array(#name#, d1, d2, d3, default, persistent) 82 | 83 | declare #name#_array_data[d1*d2*d3] := (default) {Fill the array with default value} 84 | 85 | if (persistent = 1) 86 | make_persistent(#name#_array_data) 87 | read_persistent_var(#name#_array_data) 88 | end if 89 | 90 | family #name# 91 | declare const X := d1 92 | declare const Y := d2 93 | declare const Z := d3 94 | end family 95 | 96 | property #name# 97 | 98 | function get(x, y, z) -> result 99 | result := #name#_array_data[d2 * d3 * x + d3 * y + z] 100 | end function 101 | 102 | function set(x, y, z, value) 103 | #name#_array_data[d2 * d3 * x + d3 * y + z] := value 104 | end function 105 | end property 106 | 107 | end macro 108 | 109 | {/** 110 | * Takes two arrays and copies the values of the first to the second. Works best if both arrays are the same size but if 111 | * not the size of the smallest will be used. 112 | */} 113 | function array.copy(a1, a2) 114 | 115 | declare $i 116 | declare $size 117 | 118 | //Check how many elements are to be copied - if the two arrays are different sizes the smallest is used 119 | if num_elements(a1) < num_elements(a2) 120 | $size := num_elements(a1)-1 121 | else 122 | $size := num_elements(a2)-1 123 | end if 124 | 125 | for $i := 0 to $size 126 | a2[$i] := a1[$i] 127 | end for 128 | 129 | end function 130 | 131 | //Normalises the values of an array upto the given max value 132 | function array.normalise(a, max) 133 | 134 | declare $i 135 | declare $found_max 136 | 137 | //Look for the highest value in the array 138 | $found_max := a[0] 139 | for $i := 1 to num_elements(a) - 1 140 | if abs(a[$i]) > $found_max 141 | $found_max := abs(a[$i]) 142 | end if 143 | end for 144 | 145 | //Normalise the array 146 | for $i := 0 to num_elements(a)-1 147 | a[$i] := a[$i] * max / $found_max 148 | end for 149 | 150 | end function 151 | 152 | {/** 153 | * For debugging purposes, message out the contents of an array and wait the given delay time between elements 154 | * If wanting to use this during on init you will need to defer it to the pgs callback and trigger the callback because 155 | * wait() is not allowed in on init 156 | */} 157 | function array.message(a, delay) 158 | 159 | declare $i 160 | 161 | for $i := 0 to num_elements(a)-1 162 | message('Element ' & $i & ': ' & a[$i]) 163 | wait(delay*1000) 164 | end for 165 | 166 | end function 167 | 168 | //Search a PGS key for a value and if found return its index 169 | function array.search_pgs(key, elements, value) -> return 170 | 171 | declare $i 172 | $return := -1 173 | 174 | $i := 0 175 | while (return = -1 and $i < elements) 176 | 177 | if (pgs_get_key_val(key, $i) = value) {If the value has been found at the PGS index} 178 | return := $i 179 | end if 180 | 181 | inc($i) 182 | end while 183 | 184 | end function 185 | 186 | //Fills an array with a given value 187 | function array.fill(a, value) 188 | 189 | declare i 190 | 191 | for i := 0 to num_elements(a) - 1 192 | a[i] := value 193 | end for 194 | 195 | end function 196 | 197 | //Inverts the values of an array 198 | function array.reverse(a) 199 | 200 | declare $i 201 | declare temp 202 | 203 | for $i := 0 to num_elements(a)/2 204 | temp := a[$i] 205 | a[$i] := a[num_elements(a)-1-$i] 206 | a[num_elements(a)-1-$i] := temp 207 | end for 208 | 209 | end function 210 | 211 | //Replaces all instances of a value (old) in an array with a new value 212 | function array.replace_value(a, old, new) 213 | 214 | declare $i 215 | 216 | for $i := 0 to num_elements(a)-1 217 | if (a[$i] = old) 218 | a[$i] := new 219 | end if 220 | end for 221 | 222 | end function 223 | 224 | macro array.search_pgs(key, numElements, value, return) 225 | 226 | $return := -1 227 | 228 | $i := 0 229 | while (return = -1 and $i < numElements) 230 | 231 | if (pgs_get_key_val(key, $i) = value) //If the value has been found at the PGS index 232 | return := $i 233 | end if 234 | 235 | inc($i) 236 | end while 237 | 238 | end macro -------------------------------------------------------------------------------- /libraries/helpers.ksp: -------------------------------------------------------------------------------- 1 | {--------------------------------------------------------------------- 2 | Title: Helpers 3 | File: helpers.txt 4 | Author: David Healey 5 | First Written: August 07 2016 6 | ----------------------------------------------------------------------} 7 | 8 | macro disableAutoReleaseTriggers() 9 | SET_CONDITION(NO_SYS_SCRIPT_RLS_TRIG) //Disable Kontakt Release Triggers 10 | end macro 11 | 12 | macro allowGroupForEvent(event, group) 13 | set_event_par_arr(event, $EVENT_PAR_ALLOW_GROUP, 1, group) 14 | end macro 15 | 16 | macro disallowGroupForEvent(event, group) 17 | set_event_par_arr(event, $EVENT_PAR_ALLOW_GROUP, 0, group) 18 | end macro 19 | 20 | {/** 21 | * Returns the number of keys that are currently held 22 | */} 23 | taskfunc getNumHeldKeys() -> return 24 | 25 | declare $i 26 | declare $heldKeys := 0 27 | 28 | for $i := 0 to 127 {Each key} 29 | if (KEY_DOWN[$i] = 1) {This key is down} 30 | inc($heldKeys) 31 | end if 32 | end for 33 | 34 | return := $heldKeys 35 | 36 | end taskfunc 37 | 38 | {/** 39 | * This function should be called in onNote. If two notes are played within the given 40 | * threshold time then it counts as a chord and the function returns 1 41 | /*} 42 | function isChord(threshold) -> return 43 | 44 | declare global $chordDetectorTime 45 | 46 | if ($KSP_TIMER - $chordDetectorTime < threshold) 47 | return := 1 48 | else 49 | return := 0 50 | end if 51 | 52 | $chordDetectorTime := $KSP_TIMER 53 | 54 | end function 55 | 56 | function midiNumberToNoteName(n) -> return 57 | declare !note_letters[12] := ('C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B') //Note name strings 58 | 59 | return := !note_letters[n mod 12] & ((n/12)-2) //Return the note name 60 | end function 61 | 62 | //Morphs between the values of x, y, and z. Morph is controlled by given morph value (0-1000) 63 | taskfunc morphXyz(morph, x, y, z) -> return 64 | 65 | if (morph <= 500) 66 | return := (((500 - morph) * x) + (morph * y)) / 500 67 | end if 68 | 69 | if (morph > 500) 70 | return := (((1000 - morph) * y) + ((morph - 500) * z)) / 500 71 | end if 72 | 73 | end taskfunc 74 | 75 | //Morphs between the values of x and y. Morph is controlled by given morph value (0-1000) 76 | function morphXy(morph, x, y) -> return 77 | return := (((1000 - morph) * x) + (morph * y)) / 1000 78 | end function 79 | 80 | {/** 81 | * THIS FUNCTION RELIES ON BIG BOB'S MATH LIBRARY - SO LOAD THAT LIBRARY THEN UNCOMMENT THIS FUNCTION TO USE IT 82 | * 83 | * Crossfades the volume of two notes. 84 | * 85 | * @param type The crossfade shape to use (0:equal power, 1:Sshape1, 2:Sshape2, 3:Sshape3) 86 | * @param mv The curve morph value: 0 - 1000 87 | * @param value The value at which to crossfade: 0 - 1000 - If using a CC then must be passed after formula: xfv := Ang90*CC/127 88 | * @param note_ids Two element array containing the IDs of notes to crossfade 89 | */} 90 | {function volumeCrossfade(type, mv, value, note_ids) 91 | 92 | declare val[2] 93 | declare $i 94 | 95 | if (value <= 1000) 96 | select (type) 97 | case 0 //Equal power 98 | EP_XFade(value, mv, val[1], val[0]) 99 | case 1 //S shape 1 100 | S1_XFade(value, mv, val[1], val[0]) 101 | case 2 //S shape 2 102 | S2_XFade(value, mv, val[1], val[0]) 103 | case 3 //S shape 3 104 | S3_XFade(value, mv, val[1], val[0]) 105 | end select 106 | 107 | for $i := 0 to num_elements(val)-1 108 | val[$i] := VR_to_mdb(val[$i]) //Convert the XFade EP value to a mdB value 109 | change_vol(note_ids[$i], val[$i], 0) 110 | end for 111 | 112 | end if 113 | 114 | end function} -------------------------------------------------------------------------------- /libraries/rr.ksp: -------------------------------------------------------------------------------- 1 | {--------------------------------------------------------------------- 2 | Title: Round Robin 3 | File: rr.txt 4 | Author: David Healey 5 | First Written: August 07 2016 6 | ----------------------------------------------------------------------} 7 | 8 | //Generates a random number that isn't the same as the last random number generated for the same given note 9 | //note = MIDI note number 10 | //num_rr = Max number of repetitions 11 | taskfunc rr.randomPerNote(note, num_rr) -> return 12 | 13 | declare $rand 14 | declare local %last[128] 15 | 16 | $rand := random(0, num_rr-1) 17 | while $rand = %last[note] 18 | $rand := random(0, num_rr-1) 19 | end while 20 | 21 | %last[note] := $rand 22 | return := $rand 23 | 24 | end taskfunc 25 | 26 | 27 | {/* 28 | * Generates a random number that when added to the passed note number is within the lo/hi note range. 29 | * 30 | * @param int note A MIDI note number, usually the number of the note that the generated rr_step is going to affect 31 | * @param int num_rr The number of RRs the instrument/articulation uses. 32 | */} 33 | taskfunc rr.getGroupStep(note, num_rr) -> return 34 | 35 | declare $rand 36 | declare local %last[128, 128] := (-999) 37 | 38 | $rand := random(0, num_rr-1) 39 | while $rand = %last[note] 40 | $rand := random(0, num_rr-1) 41 | end while 42 | 43 | %last[note] := $rand //Keep a record of the generated rand 44 | return := $rand 45 | 46 | end taskfunc 47 | 48 | //Similar to randomPerNote but non-repeating (so not random :p) 49 | //@todo This function looks inefficient to me, to many loops 50 | taskfunc rr.randomUniquePerNote(note, num_rr) -> return 51 | 52 | declare $rand 53 | declare $i := 0 54 | declare $index := -1 55 | declare local %history[128, 128] 56 | 57 | while $index = -1 58 | 59 | //If the loop reaches the number of RRs or the max number of history slots then reset the history array 60 | if ($i = num_rr or $i := %history.SIZE_D2) 61 | 62 | //Reset history 63 | for $i := 0 to %history.SIZE_D2-1 64 | %history[note, $i] := -1 65 | end for 66 | 67 | $i := 0 68 | end if 69 | 70 | if (%history[note, $jj] = -1) //Empty slot 71 | $index := $i 72 | end if 73 | 74 | inc($i) 75 | 76 | end while 77 | 78 | //Generate random number that hasn't been used previously by this note 79 | $rand : random(0, num_rr-1) 80 | 81 | while $rand = %history[note, $index] 82 | $rand = random(0, num_rr-1) 83 | end while 84 | 85 | %history[note, $index] := $rand 86 | return := $rand 87 | 88 | end taskfunc 89 | 90 | //Uses retuned neighboring samples to create a psuedo round robin, also allows for some microtuning 91 | //@todo - There's probably a more efficient way to do this 92 | taskfunc rr.sampleBorrowed(event, num_rr, lo_note, hi_note, microtuning) 93 | 94 | declare $rand 95 | declare local %last[128] := (-999) 96 | 97 | declare $i 98 | declare $index := -1 99 | declare $note 100 | declare local %history[128, 128] 101 | 102 | while $index = -1 103 | 104 | //If the loop reaches the number of RRs or the max number of history slots then reset the history array 105 | if ($i = num_rr or $i := %history.SIZE_D2) 106 | 107 | //Reset history 108 | for $i := 0 to %history.SIZE_D2-1 109 | %history[note, $i] := -1 110 | end for 111 | 112 | $i := 0 113 | end if 114 | 115 | if (%history[note, $jj] = -1) //Empty slot 116 | $index := $i 117 | end if 118 | 119 | inc($i) 120 | 121 | end while 122 | 123 | $note := get_event_par(event, $EVENT_PAR_NOTE) //Get event's MIDI note 124 | 125 | $rand := random(-num_rr, num_rr) 126 | while %history[note, $index] := $rand or not in_range(note+$rand, lo_note, hi_note) 127 | $rand := random(-num_rr, num_rr) 128 | end while 129 | 130 | %history[note, $index] := $rand 131 | 132 | set_event_par(event, $EVENT_PAR_NOTE, $note + $rand) //Change the event's note to include the RR step 133 | change_tune(event, -(100000 * ($rand)), 0) {Apply macro tuning} 134 | change_tune(event, random(-microtuning, microtuning), 1) {Apply microtuning} 135 | 136 | end taskfunc -------------------------------------------------------------------------------- /libraries/units.ksp: -------------------------------------------------------------------------------- 1 | {--------------------------------------------------------------------- 2 | Title: Units Library 3 | File: units.txt 4 | Author: David Healey 5 | First Written: August 07 2016 6 | ----------------------------------------------------------------------} 7 | 8 | //Maps a given value in a given range of values to that of another range of values 9 | taskfunc units.rescale(value, oldmin, oldmax, newmin, newmax) -> return 10 | 11 | declare local old_range 12 | declare local new_range 13 | 14 | old_range := oldmax - oldmin 15 | 16 | if (old_range = 0) 17 | return := newmin 18 | else 19 | new_range := newmax - newmin 20 | 21 | return := (((value - oldmin) * new_range) / old_range) + newmin 22 | end if 23 | 24 | end taskfunc 25 | 26 | //Returns 1 when the passed number (n) is even 27 | taskfunc units.isEven(n) -> return 28 | if (n .and. 1 = 0) 29 | return := 1 30 | else 31 | return := 0 32 | end if 33 | end taskfunc 34 | 35 | // Returns the hosts current BPM 36 | taskfunc units.hostBpm -> return 37 | return := (60000000 + DURATION_QUARTER / 2) / DURATION_QUARTER 38 | end taskfunc 39 | 40 | //Hz to Microseconds 41 | function units.hzToMicroseconds(hz) -> return 42 | return := abs((1000 / hz) * 1000) 43 | end function 44 | 45 | //Cycles to seconds. Rate = Frequency in Hz 46 | function units.cyclesToSeconds(cycles, rate) -> return 47 | return := cycles / rate 48 | end function 49 | 50 | //Seconds to cycles based on the number of seconds and the rate(Hz) 51 | function units.secondsToCycles(seconds, rate) -> return 52 | return := seconds * rate 53 | end function 54 | 55 | //Seconds to milliseconds 56 | function units.secondsToMs(seconds) -> return 57 | return := seconds * 1000 58 | end function 59 | 60 | //Seconds to microseconds 61 | function units.secondsToMicroseconds(seconds) -> return 62 | return := (seconds * 1000) * 1000 63 | end function 64 | 65 | //Milliseconds to seconds 66 | function units.msToSeconds(ms) -> return 67 | return := ms / 1000 68 | end function 69 | 70 | //Converts Milliseconds (Ms) to Microseconds (Us) and returns the return 71 | function units.msToMicroseconds(ms) -> return 72 | return := ms * 1000 73 | end function 74 | 75 | //Convert Microseconds to seconds 76 | function units.microsecondsToSeconds(microseconds) -> return 77 | return := (microseconds / 1000) / 1000 78 | end function 79 | 80 | //Converts Microseconds (Us) to Milliseconds (Ms) and returns the return 81 | function units.microsecondsToMs(microseconds) -> return 82 | return := microseconds / 1000 83 | end function 84 | 85 | //BPM to milliseconds 86 | taskfunc units.bpmToMs(bpm) -> return 87 | return := 60 / bpm * 100 88 | end taskfunc 89 | 90 | //Milliseconds to BPM 91 | function units.msToBpm(ms) -> return 92 | return := 60 / ms * 1000 93 | end function 94 | 95 | //Convert decibel to millidecibel 96 | function units.dbToMdb(db) -> return 97 | return := db * 1000 98 | end function 99 | 100 | //Convert millidecibel to decibel 101 | function units.mdbToDb(mdb) -> return 102 | return := mdb / 1000 103 | end function 104 | 105 | //Convert semitones to millicents 106 | function units.semitonesToMillicents(semitones) -> return 107 | return := semitones * 100000 108 | end function 109 | 110 | //Convert semitones to Cents 111 | function units.semitonesToCents(semitones) -> return 112 | return := semitones * 100 113 | end function 114 | 115 | //Convert cents to millicents 116 | function units.centsToMillicents(cents) -> return 117 | return := cents * 1000 118 | end function 119 | 120 | //Convert cents to millicents 121 | function units.millicentsToCents(millicents) -> return 122 | return := millicents / 1000 123 | end function -------------------------------------------------------------------------------- /modules/Coarse and fine tuning.ksp: -------------------------------------------------------------------------------- 1 | //Demo script - Coarse >> fine tuning knobs 2 | on init 3 | 4 | declare $i 5 | declare $octave 6 | declare $semi 7 | declare $cent 8 | 9 | declare ui_knob $knb_oct(-2, 2, 1) {Octave tuning} 10 | $knb_oct -> TEXT := "OCTAVE" 11 | set_control_par(get_ui_id($knb_oct), $CONTROL_PAR_DEFAULT_VALUE, 0) 12 | $knb_oct := 0 13 | 14 | declare ui_knob $knb_semi(-12, 12, 1) {Semi tone tuning} 15 | $knb_semi -> TEXT := "SEMI" 16 | set_control_par(get_ui_id($knb_semi), $CONTROL_PAR_DEFAULT_VALUE, 0) 17 | $knb_semi := 0 18 | 19 | declare ui_knob $knb_cent(-100, 100, 1) {Cent tuning} 20 | $knb_cent -> TEXT := "CENT" 21 | set_control_par(get_ui_id($knb_cent), $CONTROL_PAR_DEFAULT_VALUE, 0) 22 | $knb_cent := 0 23 | 24 | end on 25 | 26 | function set_tune 27 | 28 | $octave := 500000+(($knb_oct-3)*12*13888) {Octave tuning value} 29 | $semi := 500000+($knb_semi*13888) {Semi tone tuning value} 30 | $cent := 139 * $knb_cent {Fine tuning} 31 | 32 | $i := 0 33 | while ($i < $NUM_GROUPS) 34 | set_engine_par($ENGINE_PAR_TUNE, $octave + $semi + $cent, $i, 0, -1) 35 | inc($i) 36 | end while 37 | 38 | end function 39 | 40 | on ui_control($knb_oct) 41 | call set_tune 42 | end on 43 | 44 | on ui_control($knb_semi) 45 | call set_tune 46 | end on 47 | 48 | on ui_control($knb_cent) 49 | call set_tune 50 | end on -------------------------------------------------------------------------------- /modules/Multi Channel Instrument Thing.ksp: -------------------------------------------------------------------------------- 1 | on init 2 | 3 | declare %assigned[128] := (-1) 4 | declare $mono := 0 5 | declare $channel := 0 6 | end on 7 | 8 | 9 | on midi_in 10 | 11 | if ($MIDI_COMMAND = $MIDI_COMMAND_NOTE_ON and $MIDI_BYTE_2 > 0) {Note on} 12 | on_note_on() 13 | else if ($MIDI_COMMAND = $MIDI_COMMAND_NOTE_OFF or $MIDI_BYTE_2 = 0) {Note off} 14 | on_note_off() 15 | end if 16 | 17 | end on 18 | 19 | function on_note_on() 20 | 21 | if ($mono # 0) {There is already a note held} 22 | $channel := ($channel + 1 mod 16) 23 | set_event_par($EVENT_ID, $EVENT_PAR_MIDI_CHANNEL, $channel) {Change MIDI channel} 24 | %assigned[$MIDI_BYTE_1] := 1 25 | else 26 | $mono := 1 27 | end if 28 | 29 | end function 30 | 31 | function on_note_off() 32 | 33 | %assigned[$MIDI_BYTE_1] := 0 34 | 35 | end function -------------------------------------------------------------------------------- /modules/Retriggerer.ksp: -------------------------------------------------------------------------------- 1 | on init 2 | 3 | declare $i 4 | declare @noteName 5 | declare lastNote 6 | 7 | declare read ui_menu mnu_lowKey 8 | mnu_lowKey -> POS_X := 0 9 | mnu_lowKey -> POS_Y := 0 10 | 11 | declare read ui_menu mnu_highKey 12 | mnu_highKey -> POS_X := 100 13 | mnu_highKey -> POS_Y := 0 14 | 15 | declare read ui_menu mnu_trigger1 16 | mnu_trigger1 -> POS_X := 200 17 | mnu_trigger1 -> POS_Y := 0 18 | 19 | declare read ui_menu mnu_trigger2 20 | mnu_trigger2 -> POS_X := 300 21 | mnu_trigger2 -> POS_Y := 0 22 | 23 | for i := 0 to 127 24 | noteName := getNoteName(i) 25 | add_menu_item(mnu_lowKey, noteName, i) 26 | add_menu_item(mnu_highKey, noteName, i) 27 | add_menu_item(mnu_trigger1, noteName, i) 28 | add_menu_item(mnu_trigger2, noteName, i) 29 | end for 30 | 31 | for i := 0 to 127 32 | set_key_color(i, KEY_COLOR_WHITE) 33 | if (in_range(i, mnu_lowKey, mnu_highKey)) 34 | set_key_color(i, KEY_COLOR_BLUE) 35 | end if 36 | end for 37 | 38 | set_key_color(mnu_trigger1, KEY_COLOR_YELLOW) 39 | set_key_color(mnu_trigger2, KEY_COLOR_YELLOW) 40 | 41 | end on 42 | 43 | on note 44 | 45 | if ($EVENT_NOTE = mnu_trigger1 or EVENT_NOTE = mnu_trigger2) 46 | 47 | for i := mnu_lowKey to mnu_highKey 48 | if (%KEY_DOWN[i] = 1 and i # lastNote) //Last note is not played here 49 | play_note(i, EVENT_VELOCITY, 0, -1) 50 | end if 51 | end for 52 | 53 | //Play last note if it's in playable range 54 | if (in_range(lastNote, mnu_lowKey, mnu_highKey)) 55 | play_note(lastNote, EVENT_VELOCITY, 0, -1) 56 | end if 57 | else 58 | lastNote := EVENT_NOTE 59 | end if 60 | 61 | 62 | end on 63 | 64 | function getNoteName(note_num) -> return 65 | 66 | declare !notes[12] {Note name strings} 67 | !notes[0] := "C" 68 | !notes[1] := "C#" 69 | !notes[2] := "D" 70 | !notes[3] := "D#" 71 | !notes[4] := "E" 72 | !notes[5] := "F" 73 | !notes[6] := "F#" 74 | !notes[7] := "G" 75 | !notes[8] := "G#" 76 | !notes[9] := "A" 77 | !notes[10] := "A#" 78 | !notes[11] := "B" 79 | 80 | return := !notes[note_num mod 12] & ((note_num/12)-2) 81 | 82 | end function 83 | 84 | on ui_control(mnu_lowKey) 85 | 86 | for i := 0 to 127 87 | set_key_color(i, KEY_COLOR_WHITE) 88 | if (in_range(i, mnu_lowKey, mnu_highKey)) 89 | set_key_color(i, KEY_COLOR_BLUE) 90 | end if 91 | end for 92 | 93 | end on 94 | 95 | on ui_control(mnu_highKey) 96 | 97 | for i := 0 to 127 98 | set_key_color(i, KEY_COLOR_WHITE) 99 | if (in_range(i, mnu_lowKey, mnu_highKey)) 100 | set_key_color(i, KEY_COLOR_BLUE) 101 | end if 102 | end for 103 | 104 | end on 105 | 106 | on ui_control(mnu_trigger1) 107 | set_key_color(mnu_trigger1, KEY_COLOR_YELLOW) 108 | end on 109 | 110 | on ui_control(mnu_trigger2) 111 | set_key_color(mnu_trigger2, KEY_COLOR_YELLOW) 112 | end on -------------------------------------------------------------------------------- /modules/keyboard colour changer k4.ksp: -------------------------------------------------------------------------------- 1 | { --------------------------------------------------------------------- 2 | Title: Keyboard Colour Changer 3 | File: keyboar colour changer.ksp 4 | Author: David Healey 5 | First Written: July 29 2016 6 | Current Version: 1.0 7 | Last Modified: July 29 2016 8 | ----------------------------------------------------------------------} 9 | 10 | {******************************************************************************* 11 | * INCLUDES * 12 | *******************************************************************************} 13 | import '..\_Kontakt Development Framework v2.0\libraries\kontakt.ksp' 14 | import '..\_Kontakt Development Framework v2.0\libraries\ui.ksp' 15 | import '..\_Kontakt Development Framework v2.0\libraries\units.ksp' 16 | 17 | on init 18 | 19 | set_script_title("David Healey's Key Colourer v1") 20 | set_ui_height_px(150) 21 | tcm.init(50) 22 | ul.init() 23 | kl.lock_script(150+68, 1) 24 | 25 | //VARIABLES 26 | declare $i 27 | declare $j 28 | declare @note_name 29 | declare pers $scroll 30 | declare $pgs_init := 0 31 | 32 | //CONSTANTS 33 | declare const $KEY_COLOUR_DEFAULT := 19 34 | define NUM_ROWS := 15 35 | declare NUM_TO_SHOW := 5 36 | 37 | //ARRAYS 38 | declare %k4_colours[7] := (KEY_COLOR_NONE, KEY_COLOR_WHITE, KEY_COLOR_GREEN, KEY_COLOR_RED, KEY_COLOR_CYAN, KEY_COLOR_BLUE, KEY_COLOR_BLACK) 39 | 40 | //GUI 41 | declare %ui_lo[NUM_ROWS] //Menu for setting low note of range 42 | declare %ui_hi[NUM_ROWS] //Menu for setting hi note of range 43 | declare %ui_k4[NUM_ROWS] //Menus for K4 version 44 | declare %ui_row[NUM_ROWS] //Holds IDs of row number labels 45 | iterate_macro(control_row) := 0 to NUM_ROWS-1 46 | 47 | ui.button(up, "", 520, 12, -1, -1, "SCROLL UP") 48 | ui.button(dn, "", 520, 12+25*(NUM_TO_SHOW-1), -1, -1, "SCROLL DOWN") 49 | 50 | message("") 51 | 52 | end on 53 | 54 | on pgs_changed 55 | 56 | if (pgs_init = 0) 57 | pgs_init := 1 58 | hide_all_rows() 59 | scroll_list() 60 | set_key_colours() 61 | end if 62 | 63 | end on 64 | 65 | taskfunc scroll_list() 66 | 67 | declare $i 68 | 69 | for $i := $scroll to $scroll + $NUM_TO_SHOW-1 70 | 71 | if ($i < NUM_ROWS) 72 | 73 | %ui_k4[%i] -> HIDE := HIDE_PART_NOTHING 74 | 75 | %ui_lo[$i] -> HIDE := HIDE_PART_NOTHING 76 | %ui_hi[$i] -> HIDE := HIDE_PART_NOTHING 77 | %ui_row[$i] -> HIDE := HIDE_PART_NOTHING 78 | %ui_row[$i] -> HIDE := HIDE_PART_BG 79 | %ui_k4[$i] -> POS_Y := 12+25*($i - $scroll) 80 | %ui_lo[$i] -> POS_Y := 12+25*($i - $scroll) 81 | %ui_hi[$i] -> POS_Y := 12+25*($i - $scroll) 82 | %ui_row[$i] -> POS_Y := 12+25*($i - $scroll) 83 | end if 84 | 85 | end for 86 | 87 | end taskfunc 88 | 89 | taskfunc hide_all_rows() 90 | 91 | declare $i 92 | 93 | for $i := 0 to NUM_ROWS-1 94 | %ui_k4[$i] -> HIDE := HIDE_WHOLE_CONTROL 95 | %ui_lo[$i] -> HIDE := HIDE_WHOLE_CONTROL 96 | %ui_hi[$i] -> HIDE := HIDE_WHOLE_CONTROL 97 | %ui_row[$i] -> HIDE := HIDE_WHOLE_CONTROL 98 | end for 99 | 100 | end taskfunc 101 | 102 | taskfunc set_key_colours() 103 | 104 | declare $i 105 | declare $j 106 | 107 | //Reset all keys 108 | for $i := 0 to 127 109 | set_key_color($i, KEY_COLOR_NONE) 110 | end for 111 | 112 | //Assign key colours based on user settings 113 | for $i := 0 to num_elements(%ui_lo)-1 //Each row 114 | 115 | if (in_range(%ui_lo[$i] -> VALUE, 0, 127) and in_range(%ui_hi[$i] -> VALUE, 0, 127)) //Valid note range has been set for this row 116 | 117 | for $j := %ui_lo[$i] -> VALUE to %ui_hi[$i] -> VALUE 118 | set_key_color($j, %k4_colours[%ui_k4[$i] -> VALUE]) 119 | end for 120 | 121 | end if 122 | 123 | end for 124 | 125 | end taskfunc 126 | 127 | macro control_row(#n#) 128 | 129 | 130 | ui.label(row#n#, "", 70, 12+25*#n#, 25, -1, #n#+1, 12, 0, 0) 131 | ui.menu(lo#n#, "", 100, 12+25*#n#, -1, -1, -1, 0) 132 | ui.menu(hi#n#, "", 200, 12+25*#n#, -1, -1, -1, 0) 133 | ui.menu(k4#n#, "", 300, 12+25*#n#, 110, -1, -1, 0) 134 | 135 | %ui_row[#n#] := get_ui_id(lbl_row#n#) 136 | %ui_lo[#n#] := get_ui_id(mnu_lo#n#) 137 | %ui_hi[#n#] := get_ui_id(mnu_hi#n#) 138 | %ui_k4[#n#] := get_ui_id(mnu_k4#n#) 139 | 140 | for $i := 0 to 127 141 | @note_name := ul.note_name($i) 142 | add_menu_item(mnu_lo#n#, "Low Key: " & @note_name, $i) 143 | add_menu_item(mnu_hi#n#, "High Key: " & @note_name, $i) 144 | end for 145 | add_menu_item(mnu_lo#n#, "-DISABLED-", -1) 146 | add_menu_item(mnu_hi#n#, "-DISABLED-", -1) 147 | 148 | //Add key colour constants for K4 149 | add_menu_item(mnu_k4#n#, "NONE (DEFAULT)", KEY_COLOR_NONE) 150 | add_menu_item(mnu_k4#n#, "WHITE", KEY_COLOR_WHITE) 151 | add_menu_item(mnu_k4#n#, "GREEN", KEY_COLOR_GREEN) 152 | add_menu_item(mnu_k4#n#, "RED", KEY_COLOR_RED) 153 | add_menu_item(mnu_k4#n#, "CYAN", KEY_COLOR_CYAN) 154 | add_menu_item(mnu_k4#n#, "BLUE", KEY_COLOR_BLUE) 155 | add_menu_item(mnu_k4#n#, "BLACK", KEY_COLOR_BLACK) 156 | 157 | end macro 158 | 159 | iterate_macro(row_action) := 0 to NUM_ROWS-1 160 | macro row_action(#n#) 161 | 162 | on ui_control(mnu_k4#n#) 163 | set_key_colours() 164 | end on 165 | 166 | on ui_control(mnu_lo#n#) 167 | set_key_colours() 168 | end on 169 | 170 | on ui_control(mnu_hi#n#) 171 | set_key_colours() 172 | end on 173 | 174 | end macro 175 | 176 | on ui_control(btn_up) 177 | 178 | if ($scroll > 0) 179 | dec($scroll) 180 | if (scroll < 0) 181 | scroll := 0 182 | end if 183 | hide_all_rows() 184 | scroll_list() 185 | end if 186 | 187 | btn_up := 0 188 | end on 189 | 190 | on ui_control(btn_dn) 191 | 192 | if ($scroll < NUM_ROWS-1 - (NUM_TO_SHOW-1)) 193 | inc($scroll) 194 | if (scroll > NUM_ROWS - (NUM_TO_SHOW-1)) 195 | scroll := NUM_ROWS - (NUM_TO_SHOW-1) 196 | end if 197 | hide_all_rows() 198 | scroll_list() 199 | end if 200 | 201 | btn_dn := 0 202 | 203 | end on 204 | -------------------------------------------------------------------------------- /modules/keyboard colour changer k5.ksp: -------------------------------------------------------------------------------- 1 | { --------------------------------------------------------------------- 2 | Title: Keyboard Colour Changer 3 | File: keyboar colour changer.ksp 4 | Author: David Healey 5 | First Written: July 29 2016 6 | Current Version: 1.0 7 | Last Modified: July 29 2016 8 | ----------------------------------------------------------------------} 9 | 10 | {******************************************************************************* 11 | * INCLUDES * 12 | *******************************************************************************} 13 | 14 | import '../../_Frameworks/_Kontakt Development Framework v2.0/libraries/kontakt.ksp' 15 | import '../../_Frameworks/_Kontakt Development Framework v2.0/libraries/ui.ksp' 16 | import '../../_Frameworks/_Kontakt Development Framework v2.0/libraries/units.ksp' 17 | 18 | on init 19 | 20 | set_script_title("David Healey's Key Colourer v1.1") 21 | set_ui_height_px(150) 22 | tcm.init(50) 23 | ul.init() 24 | kl.lock_script(150+68, 1) 25 | 26 | //VARIABLES 27 | declare $i 28 | declare $j 29 | declare @note_name 30 | declare pers $scroll 31 | declare $pgs_init := 0 32 | 33 | //CONSTANTS 34 | declare const $KEY_COLOUR_DEFAULT := 19 35 | define NUM_ROWS := 25 36 | declare NUM_TO_SHOW := 5 37 | 38 | //ARRAYS 39 | declare %k5_colours[20] := (KEY_COLOR_NONE, $KEY_COLOUR_DEFAULT, KEY_COLOR_INACTIVE, KEY_COLOR_ORANGE, KEY_COLOR_LIGHT_ORANGE,... 40 | KEY_COLOR_GREEN, KEY_COLOR_RED, KEY_COLOR_CYAN, KEY_COLOR_BLUE, KEY_COLOR_BLACK, KEY_COLOR_WARM_YELLOW, KEY_COLOR_YELLOW,... 41 | KEY_COLOR_LIME, KEY_COLOR_MINT, KEY_COLOR_TURQUOISE, KEY_COLOR_VIOLET, KEY_COLOR_PLUM, KEY_COLOR_PURPLE,... 42 | KEY_COLOR_MAGENTA, KEY_COLOR_FUCHSIA) 43 | 44 | //GUI 45 | declare %ui_lo[NUM_ROWS] //Menu for setting low note of range 46 | declare %ui_hi[NUM_ROWS] //Menu for setting hi note of range 47 | declare %ui_k5[NUM_ROWS] //Menus for K5 version 48 | declare %ui_row[NUM_ROWS] //Holds IDs of row number labels 49 | iterate_macro(control_row) := 0 to NUM_ROWS-1 50 | 51 | ui.button(up, "", 520, 12, -1, -1, "SCROLL UP") 52 | ui.button(dn, "", 520, 12+25*(NUM_TO_SHOW-1), -1, -1, "SCROLL DOWN") 53 | 54 | message("") 55 | 56 | end on 57 | 58 | on pgs_changed 59 | 60 | if (pgs_init = 0) 61 | pgs_init := 1 62 | hide_all_rows() 63 | scroll_list() 64 | set_key_colours() 65 | end if 66 | 67 | end on 68 | 69 | taskfunc scroll_list() 70 | 71 | declare $i 72 | 73 | for $i := $scroll to $scroll + $NUM_TO_SHOW-1 74 | 75 | if ($i < NUM_ROWS) 76 | %ui_k5[%i] -> HIDE := HIDE_PART_NOTHING 77 | 78 | %ui_lo[$i] -> HIDE := HIDE_PART_NOTHING 79 | %ui_hi[$i] -> HIDE := HIDE_PART_NOTHING 80 | %ui_row[$i] -> HIDE := HIDE_PART_NOTHING 81 | %ui_row[$i] -> HIDE := HIDE_PART_BG 82 | 83 | %ui_k5[$i] -> POS_Y := 12+25*($i - $scroll) 84 | %ui_lo[$i] -> POS_Y := 12+25*($i - $scroll) 85 | %ui_hi[$i] -> POS_Y := 12+25*($i - $scroll) 86 | %ui_row[$i] -> POS_Y := 12+25*($i - $scroll) 87 | end if 88 | 89 | end for 90 | 91 | end taskfunc 92 | 93 | taskfunc hide_all_rows() 94 | 95 | declare $i 96 | 97 | for $i := 0 to NUM_ROWS-1 98 | %ui_k5[$i] -> HIDE := HIDE_WHOLE_CONTROL 99 | %ui_lo[$i] -> HIDE := HIDE_WHOLE_CONTROL 100 | %ui_hi[$i] -> HIDE := HIDE_WHOLE_CONTROL 101 | %ui_row[$i] -> HIDE := HIDE_WHOLE_CONTROL 102 | end for 103 | 104 | end taskfunc 105 | 106 | taskfunc set_key_colours() 107 | 108 | declare $i 109 | declare $j 110 | 111 | //Reset all keys 112 | for $i := 0 to 127 113 | set_key_color($i, KEY_COLOR_NONE) 114 | end for 115 | 116 | //Assign key colours based on user settings 117 | for $i := 0 to num_elements(%ui_lo)-1 //Each row 118 | 119 | if (in_range(%ui_lo[$i] -> VALUE, 0, 127) and in_range(%ui_hi[$i] -> VALUE, 0, 127)) //Valid note range has been set for this row 120 | 121 | for $j := %ui_lo[$i] -> VALUE to %ui_hi[$i] -> VALUE 122 | set_key_color($j, %k5_colours[%ui_k5[$i] -> VALUE]) 123 | end for 124 | 125 | end if 126 | 127 | end for 128 | 129 | end taskfunc 130 | 131 | macro control_row(#n#) 132 | 133 | 134 | ui.label(row#n#, "", 70, 12+25*#n#, 25, -1, #n#+1, 12, 0, 0) 135 | ui.menu(lo#n#, "", 100, 12+25*#n#, -1, -1, -1, 0) 136 | ui.menu(hi#n#, "", 200, 12+25*#n#, -1, -1, -1, 0) 137 | ui.menu(k5#n#, "", 300, 12+25*#n#, 110, -1, -1, 0) 138 | 139 | %ui_row[#n#] := get_ui_id(lbl_row#n#) 140 | %ui_lo[#n#] := get_ui_id(mnu_lo#n#) 141 | %ui_hi[#n#] := get_ui_id(mnu_hi#n#) 142 | %ui_k5[#n#] := get_ui_id(mnu_k5#n#) 143 | 144 | for $i := 0 to 127 145 | @note_name := ul.note_name($i) 146 | add_menu_item(mnu_lo#n#, "Low Key: " & @note_name, $i) 147 | add_menu_item(mnu_hi#n#, "High Key: " & @note_name, $i) 148 | end for 149 | add_menu_item(mnu_lo#n#, "-DISABLED-", -1) 150 | add_menu_item(mnu_hi#n#, "-DISABLED-", -1) 151 | 152 | //Key colour constants for K5 153 | add_menu_item(mnu_k5#n#, "NONE", KEY_COLOR_NONE) 154 | add_menu_item(mnu_k5#n#, "DEFAULT", $KEY_COLOUR_DEFAULT) 155 | add_menu_item(mnu_k5#n#, "INACTIVE", KEY_COLOR_INACTIVE) 156 | add_menu_item(mnu_k5#n#, "ORANGE", KEY_COLOR_ORANGE) 157 | add_menu_item(mnu_k5#n#, "LIGHT ORANGE", KEY_COLOR_LIGHT_ORANGE) 158 | add_menu_item(mnu_k5#n#, "GREEN", KEY_COLOR_GREEN) 159 | add_menu_item(mnu_k5#n#, "RED", KEY_COLOR_RED) 160 | add_menu_item(mnu_k5#n#, "CYAN", KEY_COLOR_CYAN) 161 | add_menu_item(mnu_k5#n#, "BLUE", KEY_COLOR_BLUE) 162 | add_menu_item(mnu_k5#n#, "BLACK", KEY_COLOR_BLACK) 163 | add_menu_item(mnu_k5#n#, "WARM YELLOW", KEY_COLOR_WARM_YELLOW) 164 | add_menu_item(mnu_k5#n#, "YELLOW", KEY_COLOR_YELLOW) 165 | add_menu_item(mnu_k5#n#, "LIME", KEY_COLOR_LIME) 166 | add_menu_item(mnu_k5#n#, "MINT", KEY_COLOR_MINT) 167 | add_menu_item(mnu_k5#n#, "TURQUOISE", KEY_COLOR_TURQUOISE) 168 | add_menu_item(mnu_k5#n#, "VIOLET", KEY_COLOR_VIOLET) 169 | add_menu_item(mnu_k5#n#, "PLUM", KEY_COLOR_PLUM) 170 | add_menu_item(mnu_k5#n#, "PURPLE", KEY_COLOR_PURPLE) 171 | add_menu_item(mnu_k5#n#, "MAGENTA", KEY_COLOR_MAGENTA) 172 | add_menu_item(mnu_k5#n#, "FUCHSIA", KEY_COLOR_FUCHSIA) 173 | 174 | end macro 175 | 176 | iterate_macro(row_action) := 0 to NUM_ROWS-1 177 | macro row_action(#n#) 178 | 179 | on ui_control(mnu_k5#n#) 180 | set_key_colours() 181 | end on 182 | 183 | on ui_control(mnu_lo#n#) 184 | set_key_colours() 185 | end on 186 | 187 | on ui_control(mnu_hi#n#) 188 | set_key_colours() 189 | end on 190 | 191 | end macro 192 | 193 | on ui_control(btn_up) 194 | 195 | if ($scroll > 0) 196 | dec($scroll) 197 | if (scroll < 0) 198 | scroll := 0 199 | end if 200 | hide_all_rows() 201 | scroll_list() 202 | end if 203 | 204 | btn_up := 0 205 | end on 206 | 207 | on ui_control(btn_dn) 208 | 209 | if ($scroll < NUM_ROWS-1 - (NUM_TO_SHOW-1)) 210 | inc($scroll) 211 | if (scroll > NUM_ROWS - (NUM_TO_SHOW-1)) 212 | scroll := NUM_ROWS - (NUM_TO_SHOW-1) 213 | end if 214 | hide_all_rows() 215 | scroll_list() 216 | end if 217 | 218 | btn_dn := 0 219 | 220 | end on 221 | -------------------------------------------------------------------------------- /modules/x y pad.ksp: -------------------------------------------------------------------------------- 1 | on init 2 | 3 | declare $i 4 | declare $ii 5 | 6 | set_ui_height_px(250) 7 | 8 | declare %table_values[127] {Backup array} 9 | 10 | declare ui_label lbl_bg(1, 1) 11 | lbl_bg -> WIDTH := 175 12 | lbl_bg -> HEIGHT := 160 13 | move_control_px(lbl_bg, 100, 0) 14 | lbl_bg -> TEXT := "" 15 | 16 | declare ui_table tbl_grid[127](2, 2, 127) 17 | tbl_grid -> WIDTH := 200 18 | tbl_grid -> HEIGHT := 160 19 | move_control_px(tbl_grid, 100, 0) 20 | 21 | set_control_par(get_ui_id(tbl_grid), CONTROL_PAR_BAR_COLOR, 0) 22 | 23 | set_control_par(get_ui_id(tbl_grid), $CONTROL_PAR_BAR_COLOR, 96c7371h) 24 | set_control_par(get_ui_id(tbl_grid), $CONTROL_PAR_HIDE, $HIDE_PART_BG) 25 | 26 | message("") 27 | end on 28 | 29 | 30 | on ui_control(tbl_grid) 31 | 32 | {Output X and Y based on values that have changed, store table values in backup array and clear table} 33 | for $i := 0 to 126 34 | 35 | {Check if this columns value is the same as the saved value} 36 | if (tbl_grid[$i] # table_values[$i]) 37 | message('X=' & $i & ' : Y=' & table_values[$i]) 38 | end if 39 | 40 | table_values[$i] := tbl_grid[$i] {Save column value in backup array} 41 | tbl_grid[$i] := 0 {Clear grid column} 42 | end for 43 | 44 | end on --------------------------------------------------------------------------------