Jump to content

How to set the pitch bend range of pitch bend


yyang

Recommended Posts

After trying a lot of ways, I found that only programming scripts are best, but in any case not successful, here leave for you to be able to pitch bend two bend range set separately, I always set a value in the source of another value is not valid. My goal is to set a bending range to two degrees, the maximum range of eight degrees, or to control the rise or fall of the octave with a slider. does anyone know this script, can it be shared under
Link to comment
Share on other sites

Hello yyang, and welcome to our community!

 

I'm not sure this answers your question but the image below shows one way to have 2 pitch bend ranges available side by side using a standard Pitchbender and Modwheel.

 

Set your synth/sampler Pitchbend Range to one octave.

Set up your channel strip with 2 modifier scripts, the first scales the Pitchbend range to around 2 half steps.

Set the second modifier script to transform your Modwheel to perform an octave Pitchbend Up.

 

1707201232_Pitchbend2stepsoranoctave.png.ebcc60b47fb376fde1a458de0f21f84e.png

Note: you can use the scale sliders to set up other range values you might need.

Link to comment
Share on other sites

I received a note from Yyang with further information. It looks like she/he would like to have a pitch bend wheel setup like the amazing Jordan Rudess. I found the example video below.

 

In the video, Jordan is using the pitch bender to go 1 whole step (2 semitones) up from the center point, and 1 octave down from the center point.

The pitch bend MIDI output from a keyboard is usually fixed at it's full (high resolution) range. If you are sending this to a virtual plugin you can specify the pitch range at the receiving end inside the plugin. Some plugins (Alchemy, ES2 etc...) allow different settings for Up and Down pitch bend. But if the plugin doesn't differentiate between pitch bend up and down then a modifier script can be placed in the path to reduce one of these ranges. Below is a 40 second motion gif that shows setting this up with Logic's Retro synth and one Modifier MIDI FX plugin.

 

2118561102_PitchBendUp2Down12.thumb.gif.42cde1fcc53ead56c2283969fad1541f.gif

 

Notes: This set up is probably far more useful than my previous post in that this one emulates the octave down of a guitar's whammy bar while keeping the upward bend to a sensible 2 semitones, all on the pitch bender. The only problem with this setup is most synth/sampler patches default to 2 steps up and down. So the pitch bend range has to be reset to an octave every time you change a patch. Fortunately there is a new Extended Parameter in many of Logic's instrument plugins that doesn't change with patch changes. See Apple's extended parameters note: https://support.apple.com/kb/PH27756?locale=en_US&viewlocale=en_US

This feature is intended to be used with a new MIDI standard, allowing separate pitch bends for each note. If you don't mind Mono Mode you might be able to use it here to keep the octave setting global and unaffected between patch changes.

 

1015735403_MonoModeExtendedParameters.thumb.png.34ff9a0a3a7ab0eb48974996b3be0b09.png

Link to comment
Share on other sites

Hey Dewdman42, Glad you are here. I was hoping you would take a look at a related bug I might have uncovered in the Modifier MIDI FX Script. Using the same setup I'm using above but changing both fields to Pitchbend Down, it doesn't process MIDI correctly, it's outputting a down bend upside down. Can you confirm?

And a custom script would be very appreciated!

 

Edit: The Pitchbend Down works if I set the 'Scale' slider to -100% and the 'Add' slider to 126. Weird illogical settings though, maybe some inverted thinking is needed to understand. : )

Link to comment
Share on other sites

I was using 2 modifiers in the first example because it seemed that yyang wanted 2 separate controllers set to do pitch bend but with 2 different mod ranges.

 

I'm asking about using just 1 modifier plugin like in the 2nd example, the motion .gif.

Don't worry about it now, I will investigate further and post a bug report project because the way it acts now (if I use Pitchbend Down settings), it actually throws away half the pitchbend resolution.

Edited by Mark R
Link to comment
Share on other sites

Try this:

 

pbscaler.jpg.05ab178b632af575011040cbd28af705.jpg

 

/*******************************************************************
* PitchBend Scaler
*
* v1.21
*******************************************************************/


function HandleMIDI(event) {

   if(event instanceof PitchBend) {
   
       if(event.value > 0) {
       
           var scale = GuiParameter(0)/100;            
           event.value = Math.round(event.value * scale);
           
           if(event.value > 8191) {
               event.value = 8191;
           }
       }
       
       else if(event.value < 0) {
           var scale = GuiParameter(1)/100;
           event.value = Math.round(event.value * scale);
                       
           if(event.value < -8192) {
               event.value = -8192;
           }
       }
   }
   event.send();
}


var PluginParameters = [];

PluginParameters.push({
   name: "Positive Scale",
   type: "lin",
   defaultValue: 100,
   minValue: 0,
   maxValue: 300,
   numberOfSteps: 1200,
   unit: "%"
});

PluginParameters.push({
   name: "Negative Scale",
   type: "lin",
   defaultValue: 100,
   minValue: 0,
   maxValue: 300,
   numberOfSteps: 1200,
   unit: "%"
});

function ParameterChanged(id, val) {
   PluginParameters[id].data = val;
}

function GuiParameter(id) {
   // if script was recently initialized, reload GUI value
   if(PluginParameters[id].data == undefined) {
       PluginParameters[id].data = GetParameter(id);
   }
   if(id < PluginParameters.length) {
       return PluginParameters[id].data;
   }
}
Edited by Dewdman42
Link to comment
Share on other sites

I used a percentage for the scaling, but its not very intuitive to figure out what percentage to use for adjusting pitch bend to musical scale degrees...but of course that depends entirely on the instrument its feeding... So I guess using % is the best way here, you just have to figure out the math yourself for whatever instrument you're using.
Link to comment
Share on other sites

Just checked out v1.1, works great! And Yes, for the topic author's use case (up 2, down 12) I think it would be nice to have a finer grained % amount. A .25% resolution should be able to land within a few cents of the 12 equal tempered notes in an octave up-down pitchbend. Higher ranges could benefit with 10th of a percent but would the sliders become unwieldily?
Link to comment
Share on other sites

I see.

I changed the 2 lines that have:

numberOfSteps: 300

to:

numberOfSteps: 600

and doubled the resolution.

 

With this small change a value of 16.5% was able to tune a whole step pitchbend, and a value of 57.5% set up a 5th pitchbend within a few cents using the sliders and incremental arrows. So cool!

Link to comment
Share on other sites

Hi,

 

It is important to remember, to get either of the two scripting methods in this thread to achieve a pitchbend range of up 2 and down 12 steps you must first set your instrument plugin's bend range to 1 octave.

 

In my example (in the 3rd post) set the modifier plugin 'Scale' slider to 17% and 'Add' slider to 0.

 

For Dewdman42's custom script (in the 8th post) set the 'Positive Scale' slider to 16.5% and the 'Negative Scale' slider to 100%

 

Most synth/sampler patches default to 2 steps up and down. So the pitch bend range has to be reset to an octave every time you change a patch. There is a detailed 'Note' about this (and a mono modo work around) in the 2nd half of my 3rd post.

 

Let us know how you get on with it.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...