Git Product home page Git Product logo

rb3_driver's Introduction

RB3 Wireless MIDI Keyboard Driver

This is a user-mode "driver" for the Harmonix Rock Band 3 wireless MIDI keyboard ("keytar") in wireless mode.

So far, it has only been tested with the Wii version of the keytar, although I see no reason in principle why most functionality should not work with the other versions.

Please see the bottom of this document for licensing and disclaimers.

What is the keytar?

The keytar is a 2-octave (25-key) keyboard with full-size spring-loaded velocity-sensitive keys, octave shift and program change buttons, a footswitch/modulation pedal jack, and a dual-function modulation/pitch-bend touch panel. It comes with a USB dongle that communicates wirelessly with the keytar. It also has a standard MIDI out (DIN) jack.

What is this driver supposed to do?

Using this driver (although I make no representation that it will work for you), you can use the keytar to send MIDI messages wirelessly to your computer using the dongle that comes with the device.

The dongle does not support standard USB-MIDI, so this driver converts the dongle's USB packets into MIDI and sends the messages to a MIDI output interface of your choosing.

To use the driver's output as input to another program, you need some way of patching the MIDI "Out" of this program to the MIDI "In" of the other program. On Windows, this can be done using MIDI Yoke (http://www.midiox.com). On Linux or Mac OS X, you can probably use Jack (and I believe Jack 2 supports Windows as well). However, so far I haven't tried it with anything apart from MIDI Yoke.

If you do use MIDI Yoke (on Windows), bear in mind that you do not need to manually create a patch using MIDI-OX. In fact, if you do this, it will not work properly. [I found this out the hard way. :-)] Simply use the MIDI Yoke "Out" and "In" devices with corresponding numbers, and it should work.

Do I need to install it / is it complicated to use?

No, it's just a normal program. The simplest way to use it (on Windows) is just to expand the zip file to a folder, then double-click "rb3_driver" in the folder. You will be presented with a numbered list of MIDI output devices. Just type the number of your chosen output device, and press the Enter key on your keyboard. If something goes wrong, the program will display an error message, then exit automatically after a few seconds. To close the program at any time, just close the window. While in use, you can minimise the program in the normal way if you want to avoid cluttering up your screen.

It should automatically detect the correct USB (input) device, provided that the keytar dongle is plugged in.

Most systems will have at least one built-in MIDI output device that corresponds to your sound card's or operating system's built-in MIDI synthesizer. However, this will usually be of low quality, and you will probably want to connect it to something else. If you install MIDI Yoke on Windows, it provides a set of 8 virtual MIDI output devices that send all their data to the corresponding virtual MIDI input device (which has the same number but "In" instead of "Out"). This works exactly like a digital patch cable. You can set up your synthesizer or sequencer program to use this as its input.

What are the dependencies / how do I compile it?

If you are using Windows, the good news is that you don't have to compile it yourself. A ready-compiled version of the program (with dependencies included) is available from https://github.com/martinjos/rb3_driver/releases

So far, I have only compiled it under MinGW32/MSYS. However, it should in principle work just as well on Linux or even (possibly) Mac OS X.

The main dependencies are libusb (http://libusb.org/) and PortMidi (http://portmedia.sourceforge.net/portmidi/).

Once you have those in place (and your C compiler/build system obviously!), just type "make". (I think this may require GNU make - if it doesn't work, it should be simple enough to adapt the Makefile.)

How much of the keytar's functionality is implemented?

At the moment, the keys themselves (including velocity), octave & program change buttons, the modulation/pitch-bend touch panel, drum split, all foot pedal features (including stomp and mode change), and the sequencer control buttons, are fully implemented. (Let me know if you find any bugs or missing features.)

Note that drum split requires a General MIDI-compliant synthesizer program. If your synthesizer program is not General MIDI compliant, it may output either nothing at all, or a confusing array of jumbled up notes, when drum split is active and the drum keys (i.e. the lower 12) are pressed.

Also note that the velocity-sensitivity is limited to at most 5 simultaneous keys - if 5 keys are held down and you strike another, it will register as having a velocity of exactly 64 (50% of the maximum value), regardless of the actual velocity. This is an unavoidable limitation of the keytar's USB packet format.

LED output is so far not implemented.

License

Copyright (c) 2015 Martin Sidaway

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Additional legal disclaimers

The author can not be held responsible for the content, safety, security, freeness from bugs or viruses, or fitness-for-purpose of websites mentioned/linked to from this file/this repository, nor of the third-party programs and libraries mentioned here or anywhere in this repository (even those mentioned as dependencies). If you download, install, or otherwise use any of these programs and libraries, or visit any of the websites, you do so entirely at your own risk.

The author of this software is not associated or affiliated with Harmonix Music Systems, Inc., or Nintendo Co., Ltd. and this software is not in any way endorsed or approved by those companies or their subsidiaries/associates.

The author takes no responsibility for any attempt to use this software with Harmonix and/or Nintendo products, and provides no guarantee or affirmation that it is legal to do so in your jurisdiction.

Harmonix and Rock Band are trademarks of Harmonix Music Systems, Inc. Nintendo and Wii are trademarks of Nintendo Co., Ltd. The author does not claim any rights over those trademarks.

rb3_driver's People

Contributors

martinjos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rb3_driver's Issues

want to join projects?

Hi martinjos,
I've worked a lot on a similar project. We started out with just supporting drumkits, but have since added guitars and basic support for keyboards. Feel free to look at our source. I don't have as much time as I'd like to work on this anymore, to make the keyboards really work well, but maybe we could combine forces.

Here's our project:
https://github.com/rbdrum2midi/rbdrum2midi/tree/master

Running on OSX

I just tried to compile and run this on OSX (10.11).

It successfully compiles with the libusb include changed from <libusb.h> to <libusb-1.0/libusb.h> with libusb and portmidi installed via homebrew.

But trying to run it, libusb fails to claim to the device. It gives the following CLI Output:

Got MIDI output device!
Brilliant news! Found input device!
Got input device endpoint!
Failed to claim input device interface

As far as i can tell this has something to do with the system already having loaded the device. Running as root does not fix it. This seems to be a somewhat common issue and the only fix i see recommended is unloading certain kernel extensions. I checked to see if any extra kernel extensions where loaded when i plugged in the device with kextstat and couldnt see any, so i figured i couldnt safely unload any of them without messing with other devices.

So yeah, i dont know how to fix it, maybe someone else does.

Great Work!

No issue to report - just really enjoying being able to use my Keytar to send Midi to my performance laptop without wires.

Thanks so much for developing this.

Matt

MidiYoke: Out of Date in a 64bit World (+ SOLUTION)

It's 2020, and I'm just learning about the capabilities of the Rock Band 3 keytar and its dongle. After a long evening testing my DAWs and various programs on Windows 10, I've come to the following discovery.

  1. The driver will work in a 64-bit environment.
  2. MidiYoke will not send MIDI to a DAW or a virtual instrument unless it is running as a 32-bit program.

That's a little rough to deal with if you're like me and use these programs with performance in mind. While I have bridges set up, I wanted a virtual MIDI cable that required little setup and could be left alone. Fortunately, I've tested it, and the LoopBe1 Driver fills the void left by MidiYoke in a 64-bit environment. If you're searching for something which will do the trick without depending on 32-bit versions of your favorite instruments and DAWs, this will do the trick. (And remember, don't close that rb3_driver window!)

You can find this second driver over at: https://nerds.de/en/loopbe1.html

Compatibility issue

Hey,
Would it be possible for this to work on win 7 64bit and/or a PS3 Rock Band 3 keyboard?
I've tried and tried for hours and MIDI-OX does output random instrument change events, but doesn't do anything if I press the keys, only the buttons.

Feature request

Hi,

Is there any possibility for additional features that make the heyboard behave much different than connected by midi cable? What I have in my mind are for example send configurable controller (eg. portamento time) instead of pitch bend and transposition by pressing the button next to controller strip?

I could probably do the coding by my self but I wanted opinions if this might be useful for someone else.

Hi, could you help

Hi, I am trying to do the same thing, but for X360 keys.
Could you point me in some direction with the MIDI emulation?
Also, I cant wrap my head around keys being sent as positions of sticks.
Thanks

Successfully compiled and ran under Linux after debugging, here's the steps I followed

Hey, I'm pretty new to github and pretty inexperienced at programming in general but with the help of ChatGPT and some troubleshooting I was able to get this to work in my install of Fedora 39. I successfully ran this project years ago in Windows so I thought I'd give it a shot.

First thing I had to do was alter the makefile because it wasn't finding libusb.h (probably something wrong with my setup), this is what mine now looks like:

CFLAGS += -I/usr/include/libusb-1.0
LDLIBS += -lusb-1.0 -lportmidi

all: rb3_driver

rb3_driver: rb3_driver.o myusb_utils.o myusb_atexit.o my_atexit.o
	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS)

Next I found that libusb was running into permissions errors trying to get devices, so I had to run it as root. Then finally the last thing that fixed it was doing libusb_detatch_kernel_driver() before trying to claim the interface, and that solved it! So, on line 236 right before the interface is claimed I added this line:

libusb_detach_kernel_driver(h, interface_number);

And it works great! (though the program could be checking if it needs to detach the kernel driver programmatically but whatever it works!)

Thanks!

Adding multiple devices

I have 2 keytars, and I want to uniquely patch them to separate outputs.

Unfortunately, the loop exits on first device. It should be relatively simple to add the option to select the input device if the search finds more than 1 device. That way, you can launch additional instances of rb3_driver and select the other devices for MIDI patching.

I will make the change if you're busy xD. Lmk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.