Step-by-step to run a midi keyboard, into reaper, with a focusrite sound card?

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
LouisRRR
Posts: 2
Joined: Tue Jun 13, 2023 7:27 pm
Been thanked: 1 time

Step-by-step to run a midi keyboard, into reaper, with a focusrite sound card?

Post by LouisRRR »

Hey guys

However I really need help to sort out how to configure my M-audio controller (Axiom pro 49) with Reaper on Ubuntu.

I installed Reaper in ~/opt/ folowing their instructions and using their install-reaper.sh.
Also I have a focusrite soundcard and would like the sound to ouput through it, and also input some voice via the focusrite.

Nota : Qjackctl stopped throwing "JACK server could not be started" after I did

$ sudo killall -9 jackdbus
$ jack_control start

So I launch Qjackctl, start it. I don't know how to setup settings nor connections.

In Reaper, audio system is JACK, and I think MIDI devices is set up but I am not sure.

Code: Select all

$ aseqdump -l

 Port    Client name                      Port name
  0:0    System                           Timer
  0:1    System                           Announce
 14:0    Midi Through                     Midi Through Port-0
 20:0    Axiom Pro 49                     Axiom Pro 49 MIDI 1
 20:1    Axiom Pro 49                     Axiom Pro 49 MIDI 2
 20:2    Axiom Pro 49                     Axiom Pro 49 MIDI 3
 20:3    Axiom Pro 49                     Axiom Pro 49 MIDI 4
 24:0    Scarlett 6i6 USB                 Scarlett 6i6 USB MIDI 1

Midi signal is reaching Linux:

Code: Select all

$ aseqdump -p 20

Waiting for data. Press Ctrl+C to end.
Source  Event                  Ch  Data
 20:0   Note on                15, note 45, velocity 93
 20:0   Note on                15, note 47, velocity 78
 20:0   Note on                15, note 48, velocity 81

Thanks a lot for your help guys

User avatar
Linuxmusician01
Established Member
Posts: 1548
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 784 times
Been thanked: 144 times

Re: Step-by-step to run a midi keyboard, into reaper, with a focusrite sound card?

Post by Linuxmusician01 »

I think that you want to connect your Midi keyboard to, say, a VST synthesizer in Reaper.

First of all, I'm not so sure that Jack's configured correctly. You have two audio devices in your computer: the on-board sound card (chip) and the Focusrite. I'll bet you a million dollars that the first is number 0 (zero) and the Focusrite number 1. Check that w/ the following command:

Code: Select all

cat /proc/asound/cards

Example of output on my computer:

Code: Select all

 0 [CMI8738        ]: CMI8738-MC6 - C-Media CMI8738
                      C-Media CMI8738 (model 55) at 0xd000, irq 20
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf7c10000 irq 31
 2 [U192k          ]: USB-Audio - UMC404HD 192k
                      BEHRINGER UMC404HD 192k at usb-0000:00:1a.0-1.1.2, high speed

As you can see, my Behringer USB audio device is device number 2. You start JackAudio for the second audio device (that is: number one) like this:

Code: Select all

jackd -d alsa --device hw:1

(if you want to execute that command in the background add an ampersand & to the command)

Now there's another caveat w/ Reaper. As far as I know it doesn't work with Alsa's version of Midi but with JackAudio's version of it. AFAIK Reaper is the only application that uses Jack Midi instead of Alsa Midi. Sigh... This is how I start Jack for audio device 1 and Jack Midi:

Code: Select all

jackd -d alsa --device hw:1 --midi seq &

Now check which OUTput Midi port is your midi keybrd with:

Code: Select all

jack_lsp -A

Example part of output:

Code: Select all

system:midi_capture_4
   alsa_pcm:CH345/midi_playback_1
   CH345:midi/playback_1

For some reason my midi keybrd. is called CH345 and it's OUTput is called Jack Midi capture "port" number 4 (the Jack system "captures" this from Alsa). In Qjackctl it looks like the screenshot below (I've set in Qjackctl's 'Settings' window in the 'Misc' tab: de-activated "Replace connections windows with graph window"). Connect Reaper's Midi INput to your midi kbrd.'s OUTput. In my version of Qjackctl the Jack Midi tab is still simply called "Midi"; if I'm not mistaken then that tab has a more clear neme now.

Image

Oefh! That was confusing and complicated wasn't it? But no matter what OS you use: audio drivers, connections and Midi is always complicated! Good luck puzzling! :)

Last edited by Linuxmusician01 on Wed Jun 21, 2023 8:15 am, edited 1 time in total.
LouisRRR
Posts: 2
Joined: Tue Jun 13, 2023 7:27 pm
Been thanked: 1 time

Re: Step-by-step to run a midi keyboard, into reaper, with a focusrite sound card?

Post by LouisRRR »

wow thanks a lot for your detailed answer, that's very nice of you.

So I did everything you said, and, the first time, it worked: I was able to send midi to reaper and play one of the default VST instrument.

But I can't reproduce it.

It seems that the midi signal is not reaching the system anymore, because I get nothing in aseqdump when playing the controller:
$ aseqdump -l
Port Client name Port name
0:0 System Timer
0:1 System Announce
14:0 Midi Through Midi Through Port-0
20:0 Axiom Pro 49 Axiom Pro 49 MIDI 1
20:1 Axiom Pro 49 Axiom Pro 49 MIDI 2
20:2 Axiom Pro 49 Axiom Pro 49 MIDI 3
20:3 Axiom Pro 49 Axiom Pro 49 MIDI 4
24:0 Scarlett 6i6 USB Scarlett 6i6 USB MIDI 1

$ aseqdump -p 20
Waiting for data. Press Ctrl+C to end.
Source Event Ch Data
0:1 Port subscribed 128:0 -> 130:0

Also my external soundcard is on #2

$ cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xfc020000 irq 47
1 [A49 ]: USB-Audio - Axiom Pro 49
M-Audio Axiom Pro 49 at usb-0000:00:1a.0-1, full speed
2 [USB ]: USB-Audio - Scarlett 6i6 USB
Focusrite Scarlett 6i6 USB at usb-0000:00:1d.7-1, high speed
29 [ThinkPadEC ]: ThinkPad EC - ThinkPad Console Audio Control
ThinkPad Console Audio Control at EC reg 0x30, fw 7VHT16WW-1.06

so I am launching Jack like this
$ jackd -d alsa --device hw:2 --midi seq &

glowrak guy
Established Member
Posts: 2329
Joined: Sat Jun 21, 2014 8:37 pm
Been thanked: 257 times

Re: Step-by-step to run a midi keyboard, into reaper, with a focusrite sound card?

Post by glowrak guy »

Hi, as mentioned, the cat command will present the soundcards your kernel recognizes, within brackets, in the command output.
Quote the name of your device (without the brackets) in your .jackdrc text file. In the pics, you'll see I have an maudio soundcard


$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xfba20000 irq 42
1 [M2496 ]: ICE1712 - M Audio Audiophile 24/96

M Audio Audiophile 24/96 at 0xd040, irq 16

My .jackdrc file generated by qjackctl uses the M2496 seen in that output:

/usr/bin/jackd -r -dalsa -r44100 -p128 -n2 -D -Chw:M2496 -Phw:M2496

cat-proc-asound-cards.png
cat-proc-asound-cards.png (44.48 KiB) Viewed 1653 times
reaper-jackd.png
reaper-jackd.png (22.58 KiB) Viewed 1653 times

I included the contents of my Reaper folder, it's not in the root owned /opt
but in a folder I made in my /home/username folder, .679
To launch Reaper, a simple terminal command:

.679/reaper

V 6.80 just arrived, simply extract the contents of that Reaper archive to a folder placed under your control, and named as you desire.
Keep 6.79 for good luck, though regressions are very very rare.

glowrak guy
Established Member
Posts: 2329
Joined: Sat Jun 21, 2014 8:37 pm
Been thanked: 257 times

Re: Step-by-step to run a midi keyboard, into reaper, with a focusrite sound card?

Post by glowrak guy »

The commands aplay -l and arecord -l also present the kernels findings for soundcards, the card names will be shown within brackets, and you'll see that naming show up in your Reaper midi hardware preferences, minus the brackets, if things are operating correctly.

arecord -l.png
arecord -l.png (122.47 KiB) Viewed 1651 times
aplay -l.png
aplay -l.png (159.32 KiB) Viewed 1651 times
Reaper midi preferences.png
Reaper midi preferences.png (74.96 KiB) Viewed 1651 times

Hope this helps. There have been issues with Axiom controllers even in mac/win so don't be shy about changing
it for a different brand if it's troublesome. You can try inserting the Axiom usb cable before and after computer power-on,
and before-after Reaper is launched, should it make a difference.
Cheers

User avatar
Linuxmusician01
Established Member
Posts: 1548
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 784 times
Been thanked: 144 times

Re: Step-by-step to run a midi keyboard, into reaper, with a focusrite sound card?

Post by Linuxmusician01 »

glowrak guy wrote: Wed Jun 21, 2023 1:55 am

The commands aplay -l and arecord -l also present the kernels findings for soundcards, the card names will be shown within brackets, and you'll see that naming show up in your Reaper midi hardware preferences, minus the brackets, if things are operating correctly.

arecord -l.png

aplay -l.png

Reaper midi preferences.png

Hope this helps. There have been issues with Axiom controllers even in mac/win so don't be shy about changing
it for a different brand if it's troublesome. You can try inserting the Axiom usb cable before and after computer power-on,
and before-after Reaper is launched, should it make a difference.
Cheers

@glowrak guy: I can see from your screenshots that you're using a2j: a program to "bridge" ALSA's Midi to Jackaudio Midi. I don't know if topic starter @LouisRRR uses that software. BTW: a2j makes it possible to use ALSA Midi as if it was Jackaudio Midi.

@LouisRRR: where exactly does it go wrong? Do you see anything in the "Midi" tab (that's the Jackaudio version of Midi) of QJackctl, like in my screenshot? And what is the output of the following command?

Code: Select all

jack_lsp -A

Remember: one must connect OUT to IN and not the other way around. That is: the keyboard is OUT and not IN. And Reaper is the IN for the Midi kbrd. And one must connect the OUT and IN from the correct devices (your M-Audio Axiom Pro 49 kbrd. appears to have no less than 4 Midi ports. does it have 2 IN and 2 OUT? I don't know, read manual or ask M-Audio). And configure everything for the correct "driver" or "audio server" (i.e. ALSA or Jack). That sounds trivial, but you've come to notice that it ain't. Everybody struggles w/ that. :wink:

P.S. Could you use [ code ] tags around command line output? Makes posts more readable. :)

P.S.2 If you want to bridge ALSA's Midi to Jack like @glowrak guy does than you could run:

Code: Select all

a2jmidid -e

P.S. Sometimes the sound card numbers (cat /proc/asound/cards) change after a reboot.

Post Reply