Zimmer Bend
-
A little script that bends all held notes to a specified pitch as a selected controller is moved - inspired by something Hans Zimmer mentioned in his masterclass.
<?xml version="1.0" encoding="UTF-8"?> <Processor Type="SynthChain" ID="Zimmer Bend Demo" Bypassed="0" Gain="1" Balance="0" VoiceLimit="128" KillFadeTime="20" IconColour="0" packageName="" views="32.rk1bzA.....A.........DC.g4lakwF.P+Ag77W...." currentView="-1"> <EditorStates BodyShown="0" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="1" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="SineSynth" ID="Sine Wave Generator" Bypassed="0" Gain="0.25" Balance="0" VoiceLimit="128" KillFadeTime="20" IconColour="0" OctaveTranspose="0" SemiTones="0" UseFreqRatio="0" CoarseFreqRatio="1" FineFreqRatio="0" SaturationAmount="0.31999999"> <EditorStates BodyShown="1" Visible="1" Solo="0" GainModulationShown="1" Folded="0"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="ScriptProcessor" ID="Zimmer Bend" Bypassed="0" Script="//INIT reg i; reg interval; reg events = Engine.createMidiList(); reg intervals = Engine.createMidiList(); const var noteNames = []; const var Ccs = []; const var cmbTarget = Content.addComboBox("Target", 0, 10); const var btnRandom = Content.addButton("Randomise", 150, 10); const var cmbCC = Content.addComboBox("Controller", 300, 10); for (i = 0; i < 128; i++) { 	noteNames.push(Engine.getMidiNoteName(i)); 	Ccs.push(i); } cmbTarget.set("items", noteNames.join("\n")); cmbCC.set("items", Ccs.join("\n")); const var knbBend = Content.addKnob("Bend", 450, 0); knbBend.setRange(0, 127, 1); const var knbLag = Content.addKnob("Lag", 600, 0); knbLag.setRange(0, 500, 1); knbLag.set("defaultValue", 150); knbLag.set("suffix", " ms"); //FUNCTIONS inline function remapRange(value, oldMin, oldMax, newMin, newMax) { if (oldMax - oldMin == 0) return newMin; else { return (((value - oldMin) * (newMax - newMin)) / (oldMax - oldMin)) + newMin; } } inline function bendEvent(event, interval) { 	reg bendAmount; 	reg fraction; 	if (event != -1) 	{ 		bendAmount = remapRange(knbBend.getValue(), 0, 127, 0, interval); 		fraction = remapRange(bendAmount - Math.floor(bendAmount), 0, 1, 0, 100); 		Synth.addPitchFade(event, knbLag.getValue(), Math.floor(bendAmount), parseInt(fraction)); 	} } //CALLBACKS function onNoteOn() { 	if (btnRandom.getValue() == 1 && Synth.getNumPressedKeys() == 1) 	{ 		cmbTarget.setValue(Math.floor(Math.random() * ((Message.getNoteNumber()+12) - (Message.getNoteNumber()-12) + 1)) + (Message.getNoteNumber()-12)); 	} 	interval = Math.abs(Message.getNoteNumber() - (cmbTarget.getValue() - 1)); 	if (Message.getNoteNumber() > (cmbTarget.getValue()-1)) interval = -interval; //Flip interval if played note is greater than target 	intervals.setValue(Message.getNoteNumber(), interval); 	events.setValue(Message.getNoteNumber(), Message.getEventId()); 	bendEvent(Message.getEventId(), interval); } function onNoteOff() { 	events.setValue(Message.getNoteNumber(), -1); } function onController() { 	if (Message.getControllerNumber() == cmbCC.getValue()-1) 	{ 		knbBend.setValue(Message.getControllerValue()); 		for (i = 0; i < 127; i++) 		{ 			bendEvent(events.getValue(i), intervals.getValue(i));	 		}		 	} } function onTimer() { 	 } function onControl(number, value) { 	if (number == knbBend && !events.isEmpty()) 	{ 		for (i = 0; i < 127; i++) 		{ 			bendEvent(events.getValue(i), intervals.getValue(i));	 		} 	} }"> <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="0" onNoteOnOpen="0" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0" onControlOpen="0"/> <ChildProcessors/> <Content> <Control type="ScriptComboBox" id="Target" value="73"/> <Control type="ScriptButton" id="Randomise" value="0"/> <Control type="ScriptComboBox" id="Controller" value="2"/> <Control type="ScriptSlider" id="Bend" value="0"/> <Control type="ScriptSlider" id="Lag" value="500"/> </Content> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0"/> <ChildProcessors> <Processor Type="SimpleEnvelope" ID="DefaultEnvelope" Bypassed="0" Intensity="1" Attack="5" Release="10" LinearMode="1"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors> <Processor Type="ModulatorChain" ID="Attack Time Modulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="0" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> <macro_controls> <macro name="Macro 1" value="0" midi_cc="-1"/> <macro name="Macro 2" value="0" midi_cc="-1"/> <macro name="Macro 3" value="0" midi_cc="-1"/> <macro name="Macro 4" value="0" midi_cc="-1"/> <macro name="Macro 5" value="0" midi_cc="-1"/> <macro name="Macro 6" value="0" midi_cc="-1"/> <macro name="Macro 7" value="0" midi_cc="-1"/> <macro name="Macro 8" value="0" midi_cc="-1"/> </macro_controls> <MidiAutomation/> </Processor>
-
Amazing, the cluster sound when used with the sines that go both up and down really gives that Joker Theme vibe (you just need to replace the sines with cello samples and run it through a guitar amp :)