Rockband drums (joystick) as a drum controller


#1

Hi, newbie here so please bear with me…

I have a dummies build of Zynthian working with a 7inch screen and an Audio injector sound card. So far so good.

I have some wii RockBand drums which has a usb receiver (which is essentially a joypad) . I can see the inputs working with jstest /dev/input/js0.

I belive FluidSynth has some suitable drum kits - Red Zeplin / Black Perl (see https://x42-plugins.com/x42/x42-avldrums for note assignments).

My question is how do I map the joypad to the midi inputs ?
In windows I use RB2midi and Loopbe1. I see a few potential solutions with applications such as:

https://terminatorx.org/aseqjoy-man.html for ALSA
https://github.com/osune/MidiJoystick for jack audio

Can anyone recommend the best route for me ( a beginner ) to configure the drums (joypad) inputs to the midi notes ?

Has anyone already done this ?

Kind regards, and thanks in advance

Skinner


#2

It’s good with a 7" screen isn’t it?

<Narrows eyes in cryptic fashion . . .>

I don’t remember receiving an audio file . . .?

<goes to xmas card list and ponders over making a mark next to Skinnersplace’s name … >

I don’t know the device you describe but you say you have seen the device working.

As you probably already know most things round here are jack based.

Now what exactly do you mean by working? Does it produce MIDI notes ? does it produce something else?
As it produces MIDI data what sort of event is it producing

  1. Notes/on Off? If so which channel ?
  2. Control signals ?? again which channel?
  3. Program Change ? --dittoo–
  4. Pitch bend data ?
  5. Some obsure stream of Sys-ex stuff that means something to only about five people on the planet? ( ask them :smiley: ) and then we’ll talk :smiley:

Presumably you want to end up on MIDI channel 10 ( Perc) ?


#3

Thanks Chris for the reply, yes it worked pretty much right out of the box with the screen (using the info posted in this forum).

I will concentrate on the Midijoystick route thanks to your advice.
Seams it should just be as simple as modifying the config file:

https://github.com/osune/MidiJoystick/blob/master/input.conf:

to match the joypad inputs from jstest /dev/input/js0 :

Red Drum Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:on 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:on 11:off 12:off
Yellow Drum Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:on 4:off 5:off 6:off 7:off 8:off 9:off 10:on 11:off 12:off
Blue Drum Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:on 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:on 11:off 12:off
Green Drum Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:on 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:on 11:off 12:off

Peddle Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:on 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off

Green cymbal Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:on 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:on 12:off
Blue cymbal Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 32767 Buttons: 0:on 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:on 12:off
Yellow cymbal Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: -32767 Buttons: 0:off 1:off 2:off 3:on 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:on 12:off

//the following is for reference only
Button 1 Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:on 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off
Button 2 Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:on 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off
Button A Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:on 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off
Button B Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:on 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off

Button - Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:on 9:off 10:off 11:off 12:off
Button + Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:on 10:off 11:off 12:off

Button Up Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: -32767 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off
Button Down Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: -32767 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off
Button Left Axes: 0: 0 1: 0 2: 0 3: 0 4: -32767 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off
Button Right Axes: 0: 0 1: 0 2: 0 3: 0 4: 32767 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off

Button Select Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:on

to the instrument channels:

Multi Channel Layout the 9 ports are

1 Kick (mono)
2 Snare (mono)
3 Hi-Hat (mono)
4 Tom (mono)
5 Floor-Tom (mono)
6+7 Cymbals (stereo)
8+9 Percussions (stereo)

Note Assignments

The plugin uses MIDI notes 36 through 61. The five velocity layers are mapped to 1-26, 27-52, 53-77, 78-102, 103-127. Cymbal-hits are exclusive: a new hit stops the any active samples of the same cymbal.

Key# (Note) Drum Sample Exclusive Group
36 (C2) Kick Drum
37 (C#2) Snare SideStick
38 (D2) Snare Ctr.
39 (D#2) Hand Clap
40 (E2) Snare Edge
41 (F2) Floor Tom Ctr.
42 (F#2) Closed HiHat A
43 (G2) Floor Tom Edge
44 (G#2) Pedal HiHat A
45 (A2) Tom Ctr.
46 (Bb2) Semi-Open HiHat A
47 (B2) Tom Edge
48 (C3) Swish HiHat A
49 (C#3) Crash Cymbal 1 (left) B
50 (D3) Crash Cymbal 1 Choked* B
51 (D#3) Ride Cymbal Tip C
52 (E3) Ride Cymbal Choked* C
53 (F3) Ride Cymbal Bell C
54 (F#3) Tambourine
55 (G3) Splash Cymbal
56 (G#3) Cowbell
57 (A3) Crash Cymbal 2 (right) D
58 (Bb3) Crash Cymbal 2 Choked* D
59 (B3) Ride Cymbal Shank C
60 (C4) Crash Cymbal 3 (large Paiste)
61 (C#4) Maracas

I will report back once I have given it my best try

Thanks


#4

Hi @Skinnersplace

Hmmm, there is also a nice tool made by falkTX: noice. Its second name is “Joysticks as JACK-MIDI devices” and seems to be exactly what you need.

I think it is not very problematic to make a recipe and add this for Zynthian. Do you have some experience to setup software from source on Linux? You can take a look at https://github.com/zynthian/zynthian-sys/tree/master/scripts/recipes where you can find several scripts for installing software for Zynthian from source…

Regards, Holger


#5

Thanks I will take a look


#6

I worked on a utility for this: https://github.com/rbdrum2midi/rbdrum2midi
It supports most of the drumkits


#7

Here’s a 10 year old article on remapping a usb rockband drumset through a PC.

Try searching Hacking Rockband for more information on translating their language,


#8

Thanks I have it working on the PC, but all sources of information help.


#9

Great thanks ssj71, I have it built, installed and running - how do i get Zynthian to recognize the input?

  • I am using the wii receiver btw:

Wii Rockband kit found
claimed interface
Setting up alsa
client:port = 128:0
Returning 1
Debug Mode Enabled…
0000087f 7f7f7f00 00000000 00000000 00000002 00020002 000200 kit type=3
1000087f 7f7f7f00 00000000 00000000 00000002 00020002 000200 kit type=3
0000087f 7f7f7f00 00000000 00000000 00000002 00020002 000200 kit type=3
0404087f 7f7f7f00 00000000 a8000000 00000002 00020002 000200 kit type=3
0000087f 7f7f7f00 00000000 00000000 00000002 00020002 000200 kit type=3
0804087f 7f7f7f00 000000a8 00000000 00000002 00020002 000200 kit type=3
0000087f 7f7f7f00 00000000 00000000 00000002 00020002 000200 kit type=3
0208087f 7f7f7f00 00000000 007e0000 00000002 00020002 000200 kit type=3
0000087f 7f7f7f00 00000000 00000000 00000002 00020002 000200 kit type=3
0104087f 7f7f7f00 00000000 0000a800 00000002 00020002 000200 kit type=3
0000087f 7f7f7f00 00000000 00000000 00000002 00020002 000200 kit type=3
0108047f 7f7f7f00 00000000 0000ff00 00000002 00020002 000200 kit type=3
0000087f 7f7f7f00 00000000 00000000 00000002 00020002 000200 kit type=3
0204087f 7f7f7f00 00000000 00a80000 00000002 00020002 000200 kit type=3
0000087f 7f7f7f00 00000000 00000000 00000002 00020002 000200 kit type=3
0808007f 7f7f7f00 000000a8 00000000 00000002 00020002 000200 kit type=3
0000087f 7f7f7f00 00000000 00000000 00000002 00020002 000200 kit type=3


#10

looks like everything should be working if you just run it without the -dbg flag. Then it should produce a midi port that you can connect to a synth or sampler. Just run with the -h option to see all the mapping options etc. :slight_smile: Or ask if you are stuck.


#11

Thanks ssj71 - it was the connection to the midi port I was struggling with, Zynthian is set up with a drum kit on channel 10, but i a not hearing anything (I am a noob, please bear with me)
I tried running with the -j -c 10 flags, did I missing something ?


#12

How much kit do you want to take on stage…? Presumably not a PC so you’d be looking at plugging the usb connection from the RockBand Drums into the zynthian? (normal rules apply: tell me if i’m wrong)

There are lots of ways to do this and that’s often why it’s confusing.

So all the code has to run on the zynthian, so it would seem sensible if the implementation became ‘blessed’ and as such we would want as much as is actually possible in the Zynthian MIDI config world, so that you can just come to the zynth load a Snapshot and hey presto!

Excellent sampled drums played out of Fluid Synth when you hit a drum.

Download the files from the site . . .

image

and load them up into the zynth…

Press the green save button . .

Look they are in the zynth on the webconf …

So now we want to make this a snapshot on a particular channel. . . .

So it’s on to the zynthian UI . . .

So a cleared down zynth ( All the layers removed)

Select New Layer…

Select Fluid Synth . .

and then MIDI Channel

grab the Red Zepplin file

and will have drums on midi channel 10 on the zynth input . . .


#13

Great thanks wyleu, that confirms i have been setting up the synth correctly.
I am still not getting any sound though (works with test midi from the main menu).

The diagnostic output from the rbdrums2midi application is showing the drums hits are getting into the pi.
Just seams to be a break between the midi port it creates and the one the zynth is connected to ?

On the PC I use a virtual loop back, I didn’t think that was required in linux?


#14

TBH I don’t have a zynthian yet so I don’t know how to do JACK midi connections :
@wyleu is there a typical way to do that in zynthian? or must you use CLI?


#15

qjackctl is one jack way of doing it.

Fire up an external ssh terminal

qjackctl&

If you can’t see your device in thre then you need to look further back up the chain

Check if it appears in the alsa tab

a2j moves you from the alsa world to jack and then patch in this interface, will get you going.

The ultimate answer is using the MIDI Mapper in the webconf environment but thats a bit of an abstraction above at this stage.

To make it entirely we would probably need to construct a config for the setup, I’ve not done it but the system is all pretty modular and the midi router had a big work over recently.

@jofemodo ???


#16

it shows up :

I connect it to zynMidiRouter main_in correct?


#17

That should do it, I’ve certainly bolted Qmidinet in that way long before it became blessed.

We can see your MIDI channel 10 mapping and wouldn’t you know it?
it’s going straight into LinuxSampler midi_in_0

So anything MIDI on channel 10 coming into the zynth should be ending up playing stuff.

I’ve had the red zeppelin sf2 playing MIDI channel 10 from the Motor 61 through my rig here, so I think that side is ok…

You presumably know aseqdump ?

and Audacity will display MIDI from the Admin MIDI Record feature (AlphaNumerics & hyphens in the name)

it will at least get you an insight into the alsa side of this if you find you’re loosing the notes as they bounce from buffer to buffer . . .


#18

Thanks Weyleu, appreciate all the help.

When I run rbdrums2midi -c 10 in aseq mode i get working messages through aseqdump


image

using a2j to get from the alsa tab to the midi tab, but still no sound

If i run rbdrums2midi -j -c 10 in jack mode, I get a coonection in the midi tab directly

still no sound… could it be the output of the synth? (I have only tested using the test midi menu option)


#19

Just for sanitys sake connect directly from you midi out to the fluid synth midi in. Also the midi recorder option will at least tell you if midi is moving around.
It could be the audio injectors delight in responding to alsa mixer levels. You can rig stuff up entirely without midi hardware by using qmidinet… Don’t know how friendly it is in the Windows world but a remote midiox/midi yoke will probably tell you a fair bit. Midi in to the zynth is pretty heavily tested so proving midi USB or tty> zynth > sound would be good.


#20

For giggles I’d try another sound font, like a piano. Maybe the notes from the kit are not mapping to notes in the drum soundfont.