asked Jan 31 '15 at 12:05 by tp2750 (11)

I'm using an ESI Midimate II to connect my Technics SX-PX222 electrical piano as a midi device under Ubuntu 14.10. It works well and Bitwig can easily use it. However, the keys are quite heavy, and the velocity signal over midi is never more than about 70. This has the effect, that I'm only playing the lower 2 banks of a multisample instrument like Dr. Power's Wurlitzer. My question is how to most easily be able to play the full dynamic range of a multisample device in this setup.

One option is to edit the device as described in the manual from page 310. Then I can change the velocity setting under Range. However, it looks like I have to do this separately for every single sample in the instrument, which is quite tedious. Is there a way to select all samples in a "row" and adjust the velocity parameters for all of them at the same time?

Alternatively I expect I can write a control surface script and multiply the velocity value by 2 in that.

Or is there a "midi sensitivity" setting I have not yet found?

Replying to my own question.

I managed to write a controller script based on the example here: http://eighteyes.github.io/bitwig/keyboard-velocity.html

I just copied Sean Canton's lines into the generic midi controller template in the installation. It can probably be done simpler, but this worked for me.

loadAPI(1);

host.defineController("Technics", "SX-PX222", "1.0", "f2a8508c-a93e-11e4-9610-0090f5eb675b", "Thomas Poulsen"); host.defineMidiPorts(1, 0);

var LOWEST_CC = 1; var HIGHEST_CC = 119;

function init() { host.getMidiInPort(0).setMidiCallback(onMidi); generic = host.getMidiInPort(0).createNoteInput("", "??????"); generic.setShouldConsumeEvents(false);

// From http://eighteyes.github.io/bitwig/keyboard-velocity.html

var noteInput = host.getMidiInPort(0).createNoteInput("Technics SX-PX222");

inputVel = [ 0, 1, 16, 25, 40, 90, 127 ]; // x
transVel = [ 0, 1, 48, 60, 80, 127, 127 ]; // y

var output = [];
for ( slope = 0, i = 0; i < 128; i++){
//Y = Y1 + ( ( Y2 - Y1) ( X - X1 ) / ( X2 - X1) )
y = transVel[0] +
    ( ((transVel[1] - transVel[0]) * ( i - inputVel[0] )) /
      (inputVel[1]-inputVel[0])
    );
output[i] = Math.min(Math.round(y), 127);
if ( inputVel[1] < i ){
    transVel.shift();
    inputVel.shift();
}
}

noteInput.setVelocityTranslationTable(output);

// Make CCs 1-119 freely mappable userControls = host.createUserControlsSection(HIGHEST_CC - LOWEST_CC + 1);

for(var i=LOWEST_CC; i<=HIGHEST_CC; i++) { userControls.getControl(i - LOWEST_CC).setLabel("CC" + i); } }

function onMidi(status, data1, data2) { if (isChannelController(status)) { if (data1 >= LOWEST_CC && data1 <= HIGHEST_CC) { var index = data1 - LOWEST_CC; userControls.getControl(index).set(data2, 128); } }
}

function exit() { }

link

answered Feb 07 '15 at 16:53 by tp2750 (11)

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×206
×15
×15

Asked: Jan 31 '15 at 12:05

Seen: 1,726 times

Last updated: Feb 07 '15 at 16:53