asked Mar 15 '15 at 17:52 by iggyk (11)

Hello, I have axiom pro 49, is there a way for me to midi map all the buttons on it to bitwig, the transport buttons, drum pads, knobs, mute, solo for channels etc...? I downloaded some axiom pro controller script but it does nothing but let me play the keys. Thank you Igor

I might have something for you! (and anyone who stumbled into this thread)

I created a simple Bitwig Controller Script for my Axiom Pro 61, that lets it be used as a normal generic midi controller, but also gives functionality to the Axiom's transport buttons. Credits to "teetrinkers" who created the Bitwig Script for the Axiom 25, which I referenced.

Play - Starts Bitwig's Playback
Rec - Toggles Bitwigs Record
 Stop - Stops Bitwigs Playback
>> - Selects Next Track
<< - Selects Previous Track
LOOP - Toggles current window visible/invisible
Soft Buttons S10-S17 - Functionality dependent on what "Button Mode" you've selected
Soft Button S18 - Cycles through "Button Modes" (Select -> Mute -> Solo -> Arm)

Change all occurances of "Axiom Pro 61" to "Axiom Pro 49", and I think you'll be golden!

This script should give everyone (not just Axiom owners) a solid base to start creating their own controller scripts =D

loadAPI(1);

host.defineController("M-Audio", "Axiom Pro 61", "1.0", "10eeab13-ccbc-4a40-8850-ed335826d7e6");  // These values are what you want to be displayed in BitWig for this MIDI Controller / Script.
host.defineMidiPorts(1, 1);
host.addDeviceNameBasedDiscoveryPair(["Axiom Pro 61"], ["Axiom Pro 61"]); // Change this to your device's name that shows up in Bitwigs MIDI Controller Drop-down.

var NUM_SCENES = 10;
var ccToUserIndex = []
var CC_MIN = 1;
var CC_MAX = 127;
var buttonMode = 0;

var BUTTON = {
    SELECT : 0,
    MUTE : 1,
    SOLO : 2,
    ARM : 3,
    PRESS : 127,
    RELEASED : 0
}

var CC = {
    LOOP: 113,
    REW: 114,
    FF: 115,
    STOP: 116,
    PLAY: 117,
    REC: 118,
    BUTTON1: 85,
    BUTTON2: 86,
    BUTTON3: 87,
    BUTTON4: 88,
    BUTTON5: 89,
    BUTTON6: 90,
    BUTTON7: 110,
    BUTTON8: 111,
    BUTTON9: 112
}

function printSysexId() {
    // To view logs, in BitWig goto View -> Controller Script Console.
    println("Sysex ID:");
    sendSysex("F0 7E 7F 06 01 F7");
}

function createViews() {

    noteInput = host.getMidiInPort(0).createNoteInput("Axiom Pro 61", /* Change this to your MIDI Controller Name */
        "80????", "90????", "B001??", "B002??", "B00B??", "B040??", "C0????", "D0????", "E0????" /* These bytes can stay the same, regardless of MIDI Controller */);
    noteInput.setShouldConsumeEvents(false);

    transport = host.createTransport();

    // A track-bank view acts as a N-track window onto the documentĀ“s tracks
    trackBank = host.createTrackBank(8 /* num tracks */, 1 /* num sends */, 0 /* num scenes*/);

    // The cursor track view follows the track selection in the application GUI
    cursorTrack = host.createCursorTrack(4 /* num sends */, NUM_SCENES /* num scenes */);

    masterTrack = host.createMasterTrack( NUM_SCENES );

    userControls = host.createUserControls(CC_MAX - CC_MIN + 1 /* numControls */ );
}

function init() {

    host.getMidiInPort(0).setSysexCallback(onSysex);
    host.getMidiInPort(0).setMidiCallback(onMidi);

    printSysexId();
    createViews();

    var index = 0;
    for (var cc = CC_MIN; cc < CC_MAX; cc++) {
        if (!withinRange(cc, CC.LOOP, CC.REC)) {
            ccToUserIndex[cc] = index;
            userControls.getControl(index).setLabel("CC" + cc); // Makes the CC Available to be Mapped!
            index++;
        }
    }

    host.showPopupNotification("Axiom Pro Loaded");
}

function isUserCc(cc) {
    return cc < ccToUserIndex.length && ccToUserIndex[cc] != undefined;
}

function onSysex(data)
{
    // Handle SysEx Here
    println(data);
}

function processButton(trackNum){
    theTrack = trackBank.getTrack(trackNum - 1);
    if(theTrack){
        switch(buttonMode) {
            case BUTTON.SELECT:
                theTrack.select();
                break;
            case BUTTON.MUTE:
                theTrack.getMute().toggle();
                break;  
            case BUTTON.SOLO:
                theTrack.getSolo().toggle();
                break;  
            case BUTTON.ARM:
                theTrack.getArm().toggle();
                break;      
        }   
    }
}

function onMidi(status, noteNumber, noteVelocity) {
    printMidi(status, noteNumber, noteVelocity);

    if (isChannelController(status)) {

        if(noteVelocity == BUTTON.RELEASED){ 
            switch (noteNumber) {
                case CC.LOOP:
                    cursorTrack.getPrimaryDevice().isWindowOpen().toggle();
                    break;
                case CC.REW:
                    cursorTrack.selectPrevious();
                    host.showPopupNotification("Axiom Pro Loaded");
                    break;
                case CC.FF:
                    cursorTrack.selectNext();
                    host.showPopupNotification("Axiom Pro Loaded");
                    break;
                case CC.STOP:
                    transport.stop();
                    break;
                case CC.PLAY:
                    transport.play();
                    break;
                case CC.REC:
                    transport.record();
                    break;
                case CC.BUTTON1:
                    processButton(1);
                    break;
                case CC.BUTTON2:
                    processButton(2);
                    break;
                case CC.BUTTON3:
                    processButton(3);
                    break;
                case CC.BUTTON4:
                    processButton(4);
                    break;
                case CC.BUTTON5:
                    processButton(5);
                    break;
                case CC.BUTTON6:
                    processButton(6);
                    break;
                case CC.BUTTON7:
                    processButton(7);
                    break;
                case CC.BUTTON8:
                    processButton(8);
                    break;
                case CC.BUTTON9:
                    buttonMode == 3 ? buttonMode = 0 : buttonMode++;
                    if(buttonMode == 0) { 
                        host.showPopupNotification("Button Mode [Select Track]");
                    } else if(buttonMode == 1) { 
                        host.showPopupNotification("Button Mode [Mute Track]");
                    } else if(buttonMode == 2) { 
                        host.showPopupNotification("Button Mode [Solo Track]");
                    } else if(buttonMode == 3) { 
                        host.showPopupNotification("Button Mode [Arm Track]");
                    }
                    break;

            }
        }

        if (isUserCc(noteNumber)) {
            var index = ccToUserIndex[noteNumber];
            userControls.getControl(index).set(noteVelocity, 128);
        }
    } else {
        // Not a controller-message.  WHAT IS IT?!
    }
}

function exit() {
    // No clean-up necessary.
}

I've added some comments to make it somewhat more understandable.

To install this script (or any, really) in BitWig

  1. Create a new folder called "AxiomPro" in %USERPROFILE%\Documents\Bitwig Studio\Controller Scripts\
  2. In the new AxiomPro folder, create a new file called "AxiomPro.control.js", and save the above script/code inside of it.
  3. Goto Bitwig's Settings -> Controllers -> Click "Detect Available Controllers", and you should see a new controller entry get added!

If you want to learn more about scripting, or your script/device does not get recognized, then in BitWig goto Help -> Control Surface Scripting Guide, and read it. =]

Cheers

link

answered Dec 31 '15 at 01:10 by wygonjinn (221)

edited Dec 31 '15 at 19:02

Hi

long shot

but does this script still work with the latest version of BWS v2.4

cheers Kev

link

answered Sep 26 at 20:20 by turbo_kev (59)

Why don't you try it :)

Also, I don't have BitWig anymore, so I can't test or develop this script any further, sorry!

link

answered Sep 26 at 21:20 by wygonjinn (221)

Hi

Yes it still works play stop record etc etc but if you press FF or RW it crashes

but the axiom pro is now an old keyboard, but I like the feel of the keys thanks for your quick reply

just wondering why you gave up on BWS

cheers Kev

link

answered Sep 26 at 21:25 by turbo_kev (59)

I switched to REAPER. As a programmer, REAPER is perfect for me, because no other daw comes close to the amount of features REAPER has (and I'm fluent in 5+ DAWS) -- and the customization REAPER supports is astounding. The sky is the limit w/ REAPER.

And I didn't wanna pay for the upgrade to BWS 2.0 -- and BWS 2.0 didnt support Sysex, whereas REAPER does.

Also there were some bugs in BitWig, like Kontakt instruments randomly stopped working, and loud clicks happened from the External Audio Effect or Instrument or something completely randomly I think

And to top it off, I have a ton of hardware effects and synthesizers, and BitWig at the time didnt support synchronize everything together nicely......midi clock, latency compensation, etc.

Whereas REAPER has this nice "Ping Device" feature, where it will send a click to an External Effect, or a MIDI note to an External Instrument, and then calculate the round trip delay in samples it took to get back into the computer, and offset the track by that much -- so all the tracks were aligned properly with all the external devices latency accounted for

link

answered Sep 26 at 21:34 by wygonjinn (221)

edited Sep 26 at 21:35

IM not a musician but I think a lot of the things you mentioned have now been sorted out in BWS

Maybe you'll come back one day, its a shame when talented people like yourself leave

For me its just a hobby, I fell in love with the sound of synthesisers way back when ELP and YES and tangerdream and Kraftwerk were all the rage I could never afford a mini moog back then, but now with the Arturia synths and the beatstep pro I have them all and with my musical knowledge of just about knowing where middle c is, I have a lot of fun making old berlin school kinda stuff, then dragging the tracks in to the clip launcher and using the launch pad pro to fire them off.

I doubt very much I will ever need or use all the new features of BWS But for an absolute novice, I have found it very easy to use

my only complaint is that at the moment all the new flashy controllers out of the box work with abelton live and you have to wait for people like you to write the scripts to use them with BWS

sorry to have bored you with my life history, but im a UK expat that moved to Spain and I don't get out much LOL

thanks for your work on the axiom script

cheers Kevin

link

answered Sep 26 at 21:48 by turbo_kev (59)

That's awesome haha! You didn't bore me :)

BitWig is much better than REAPER for just jamming out on the fly with your launchpad too, so It seems to suit you well!

p.s. As a hacky workaround fix for the crashes you can comment out the code by adding two forward slashes //

case CC.REW: cursorTrack.selectPrevious(); host.showPopupNotification("Axiom Pro Loaded"); break; case CC.FF: cursorTrack.selectNext(); host.showPopupNotification("Axiom Pro Loaded"); break;

so It looks like :

case CC.REW: //cursorTrack.selectPrevious(); //host.showPopupNotification("Axiom Pro Loaded"); break; case CC.FF: // cursorTrack.selectNext(); //host.showPopupNotification("Axiom Pro Loaded"); break;

link

answered Sep 26 at 22:34 by wygonjinn (221)

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:

×232
×3
×3
×2

Asked: Mar 15 '15 at 17:52

Seen: 2,455 times

Last updated: Sep 26 at 22:34