Cc momentary button to pitchbend?

Hello,
Is it possible to set one midi cc button to send smooth pitchbend up and one for pitchbend down ? So that it will reset to zero after releasing the button.

1 Like

Hi, although this is not fully tested, it should get you started.

CC1, when pressed, will start a timer increment moving pitch bend up. CC2, when pressed, will start a timer increment moving pitch bend down.

Releasing CC1 or CC2 will stop the pitch timer, set the value to 0 and send the final center pitch bend.

I use the global variable ga for the current pitch bend and gb for the direction of the movement. In this case I use 100 for positive movement and -100 for negative movement and 0 for stop.

When I stop movement, I use Perform ‘Stop’ to both stop the timer and send the final PB at value 0.

CC-to-PB-2024-12-28.bmtp (2.9 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Thank you.
thats a bit much for me but it seems to work.
When i map a button to pitchbend down and press it, the pitch goes down
but will not stay there as long as i hold the button. It will immediately go back to the zero position.

Removing or commenting out this rule in translator 1.0 and 1.1 will stop them from returning to 0. In your original post, you said you wanted them to go back to 0 when releasing the button. You may need to have a different method of returning them to zero, like maybe another button.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
else gb=0

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Yes, that’s correct. Maybee i made a mistake ? Im not really shure how to set it up. I inserted my midi command with capture midi in: cc to pitchbend in entry one. When i press the button it’s pitching down but also release to zero without releasing the button. My button is sending 127 and 0 depending on on press or release. Where do i have to insert these two commands in the script ?

When you learn the CC, your input will be populated with the value of the button as shown here.

You should change the value as shown here so that the rules can use the local variable qq to decide what to do.

Then in the rules of the same translator if you do not want it to go back to zero when you release the button, change this

// direction up
if qq>0 then gb=100
else gb=0
if gb==0 then Perform "Stop"

to this

// direction up
if qq>0 then gb=100
if qq==0 then Perform "Stop"

This will stop the timer in its place without re-centering

The below is for translator 1.0 (preset 1 translator 0). For down movement you need to do similar for translator 1.1.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

When i hold the note with the pitch translator , the pitch rises like it should and it goes back to zero when i release the note like it should. (When im fast enough) because when i hold the note for a bit longer, the pitch fall or rises like it should but still goes immediately back to zero after it reached the max position by itself without me releasing the note. It should go back to zero only after releasing, and like on a pitch wheel the pitch should stay up or down as long as i hold the note. Im not sure where the mistake is

This version should stop at current location until release.

CC-to-PB-2024-12-29.bmtp (2.9 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Sorry for all the hassle, maybee its not working ?
Now the pitch rises up (or down) when i press the pitch up or down key and than drops under the starting note (or above) before i release the key. It’s still not holding the pitch as long as i hold the key.

Hi, I made a slight modification.

I tested this with the Sektor Synth plugin and it seemed to work.

CC-to-PB-2024-12-29a.bmtp (3.0 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Yes, it’s working :slight_smile: Thank you very much for the effort

One last question
I have one knob on a controller wich is sending Note On 9 C8 127 on press and Note Off 9 C8 0 on release. Is it possible to use this also for pitchbend down or up ? Because its not momentary
Or option number 2
I have this knob configured to a momentary message in the translator, can i route the momentary message than inside of the translator to your Pitchbend translator ?

See the attached. There are two options.

  1. Use 2 translators, one with note-on, one with note-off
  2. Use a single translator to evaluate note-on or note-off and use rules to determine the action.

Translators 2.0 and 2.1 handle the first method.
Translator 2.2 handles the second method

For method 2 (single translator), since Bome MIDI Translator Pro does not have a ‘Note-on or Note-Off’ type trigger, I evaluate the incoming message in rules.

I first look at the command byte and mask out the MIDI channel. I do a bit comparison with 0xe0 (224) and if the result is note 128 (0x80), then it is not a note message.

Then I mask out the upper nibble and look for MIDI CH 1. If it is not MIDI CH 1, then I abort.

Finally I test if it is a note off. If the velocity is zero then it is a note off and I go to the ‘note-off’ label.

If the velocity is not zero, then I look again at the upper nibble of the command byte to see if the value is 128 (0x80). If it is, then again, I go to "note-off’ label.

Otherwise, I process the note-on rules

Here are the complete rules for this method.

// look for note message
// mask out MIDI channel
rr=oo&224
if rr!=128 then exit rules, skip Outgoing Action
// Look for MIDI ch 1
rr=oo&15
if rr!=0 then exit rules, skip outgoing action

// is it a note off
if qq==0 then Goto "note-off"
rr=oo&240
if rr!=144 then Goto "note-off"

// note on
// direction up
ga=0
gb=100
exit rules, execute Outgoing Action
Label "note-off"
gb=0
ga=0
Perform "Stop"
exit rules, skip Outgoing Action

For method 1, I have different translators and rules for note-on and note-off. It is simpler to understand but requires 2 translators.

In my case I’m using note 3 on MIDI CH 1. The note name ‘C8’ might have different meanings depending on the DAW that you use as note naming is not part of the MIDI standard. It is unclear from your posting whether you mean MIDI CH 9 or MIDI CH 10 for incoming note number MIDI CH 9 would be 8 (numbering from 0) and MIDI CH 10 would be 9. You will need to modify these as appropriate for your situation.

I hope this helps!

CC-to-PB-2024-12-30.bmtp (4.2 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

In Bome MIDI Translator Pro, BMT Virtual ports are one way meaning one end of the virtual port has to be Bome MIDI Translator Pro and the other anything but Bome MIDI Translator Pro. So you can’t route an output of a virtual port to an input of a virtual port in Bome MIDI Translator Pro .

You can, however, use a perform action with parameters or use global variables to communicate between translators.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

The Solution with the two translators is working fine.
Can you please make also an pitchbend down with this method.
And would it be possible to also set ms for the release time ?
Im ready than :slight_smile:

  1. Duplicate the current translators
  2. Change the incoming triggers and the names
  3. On New Note-on translator change the value of gb from +100 to -100

Set a delay of the outgoing action on translators 1.3 and 1.4.
Translator 1.3 stops the timer, and 1.4 sets the pitch bend value back to center.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Yeah i got it.
Am i right that i i can set the duration of the Pitch after press on translator 1.1 Outgoing tab and then Initial Duration ? Because i think with this numbers i can get a longer or shorter sweep i think ?
That’s what im trying to create for the release. Not a delay of the action.

There are a few ways to change the sweep duration.

  1. Changing the duration (initial and repeat) on the outgoing message of the timer.
  2. Changing the increment/decrement values of the pitch in the rules. I’m using +100 and -100 now. If you use +1 and -1 then the duration will be quite long.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

When I change the increment/decrement values of the pitch in the rules I can change the duration of the pitch after pressing the key. But after I release the button it went straight back to zero. can I change the duration after I release the key ? So that it has the same curve and duration like on the attack ?

OK, this version handles it. The timer will stop itself when it reaches the target.

Here is how my global variables are set up in translator 0.2

// Initialize and document global variables used here
// Current pitch bend value
ga=0
// Direction and amount
gb=0
// Target pitch bend value
gc=0
// increment/decrement amount
gd=100

So now, pressing or releasing a button sets a direction amount and target stop point.
The timer stops itself when reaching the target stop point.

Rules were modified to match this requirement in the various translators.

CC-to-PB-2025-01-01.bmtp (4.0 KB)

You should really study the rules, to see how they work so that if you needs to make modifications, you will know what to change.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz