Cant get midi to work with carla

Still new to all of this? Feel free to post in any of the subforums on this site, but in this subforum newbie questions are especially encouraged!

Moderators: MattKingUSA, khz

Post Reply
AndyH
Established Member
Posts: 7
Joined: Thu Apr 14, 2022 10:13 pm

Cant get midi to work with carla

Post by AndyH »

I am a long time linux user but very new to audio. I picked up a Korg nanoKontrol Studio. I'm trying to get that working with Carla. As a simple test I added 3 plugins: Invada Test Tones, Audio Gain, and VU. I linked them up in that order in the PatchBay. I linked the nanoKontrol midi events to the Audio Gain. I can't get a nanoKontrol slider to change the volume. I tried using the "Midi Learn" in the Gain plugin. No luck.

I know the nano is being seen. aseqdump I can see the control values change. I tried manually setting the channel and controller in the Gain plugin. That didn't work either.

I'm running the latest Ubuntu Studio distribution, Carla version 2.5.4.

aseqdump -p 32:0
Waiting for data. Press Ctrl+C to end.
Source Event Ch Data
0:1 Port subscribed 146:0 -> 131:0
0:1 Port subscribed 130:3 -> 131:0
32:0 Control change 4, controller 2, value 6
32:0 Control change 4, controller 2, value 7
32:0 Control change 4, controller 2, value 8

Any ideas?

Thanks, Andy

User avatar
Impostor
Established Member
Posts: 1392
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 148 times
Been thanked: 366 times

Re: Cant get midi to work with carla

Post by Impostor »

Carla standalone offers a variety of choices for the audio engine. Regardless, the only way it works (midi + audio) on my system is with Jack audio and Jack midi (but I run Carla git 2.6, which may be more buggy than a stable version like yours).

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: Cant get midi to work with carla

Post by Linuxmusician01 »

Did you configure Carla to use Alsa-Midi? For instance like so:
Image

User avatar
Impostor
Established Member
Posts: 1392
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 148 times
Been thanked: 366 times

Re: Cant get midi to work with carla

Post by Impostor »

Linuxmusician01 wrote: Tue Aug 08, 2023 9:37 am

Did you configure Carla to use Alsa-Midi?

Edit:

There's a menu item "canvas". You must select "show external" for alsa midi ports to show up in "patchbay" mode. Bit weird this is even an option, since without it one cannot make alsa midi connections at all(*) in patchbay mode....even weirder then that it apparently defaults to "show internal" (I have no recollection of having ever changed it, at least).

(*)That is, not with any external ports. Not from within Carla, but also not externally, say, in qjackctl.

AndyH
Established Member
Posts: 7
Joined: Thu Apr 14, 2022 10:13 pm

Re: Cant get midi to work with carla

Post by AndyH »

I've tried with jack. That is the only one that shows all my devices. If I try the others, but Carla only displays a few devices. I took screen shots, but apparently I don't have permission to attach them.

Thanks, Andy

AndyH
Established Member
Posts: 7
Joined: Thu Apr 14, 2022 10:13 pm

Re: Cant get midi to work with carla

Post by AndyH »

artix_linux_user wrote: Tue Aug 08, 2023 4:00 pm

I am sorry, maybe I am totally not getting your point.
Does not matter if alsa or jack, you have to connect the ins and outs as well as the midi connections inside CARLA's patchbay.
Carla is a stable software, it should work.

I can connect, but no events are getting through to the plugin. Unfortunately I'm not allowed to post attachments yet. Not sure how that works here.
Thank, Andy

AndyH
Established Member
Posts: 7
Joined: Thu Apr 14, 2022 10:13 pm

Re: Cant get midi to work with carla

Post by AndyH »

Linuxmusician01 wrote: Tue Aug 08, 2023 9:37 am

Did you configure Carla to use Alsa-Midi? For instance like so:
Image

Jack+Alsa midi only shows Audio in, out, and midi capture, playback in the patchbay. None of my other devices, including builtin system ones. It does not display midi for a keyboard, the Korg nano, or my Scarlett 18i20.

Thanks, Andy

AndyH
Established Member
Posts: 7
Joined: Thu Apr 14, 2022 10:13 pm

Re: Cant get midi to work with carla

Post by AndyH »

Linuxmusician01 wrote: Tue Aug 08, 2023 9:37 am

Did you configure Carla to use Alsa-Midi? For instance like so:
Image

Jack+Alsa midi only shows Audio in, out, and midi capture, playback in the patchbay. None of my other devices, including builtin system ones. It does not display midi for a keyboard, the Korg nano, or my Scarlett 18i20.

Thanks, Andy

User avatar
noedig
Established Member
Posts: 239
Joined: Wed Feb 12, 2014 4:39 am
Location: South Africa
Has thanked: 9 times
Been thanked: 54 times

Re: Cant get midi to work with carla

Post by noedig »

For me, the Carla plugins list shows an LV2 version and an Internal version of the Audio Gain plugin. I can't get the Internal one to react to MIDI, but the LV2 version works.

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: Cant get midi to work with carla

Post by Linuxmusician01 »

AndyH wrote: Tue Aug 08, 2023 9:50 pm
Linuxmusician01 wrote: Tue Aug 08, 2023 9:37 am

Did you configure Carla to use Alsa-Midi? For instance like so:

Jack+Alsa midi only shows Audio in, out, and midi capture, playback in the patchbay. None of my other devices, including builtin system ones. It does not display midi for a keyboard, the Korg nano, or my Scarlett 18i20.

Thanks, Andy

If it does not show your external USB audio device (i.e. the Scarlett 18i20) then you may have started Jack for the wrong audio device/sound card. Try the following to test.

BTW do you use PipeWire or not? PipeWire can act like it's Jack Audio (some sort of emulation). If you don't know if you're using PW or not you might start a separate topic. I use an old Linux distro (Ubuntu 20.04) so I don't have PW yet (and might never start use it either).

Did you by any chance install JackAudio in Linux next to PipeWire?

Anyway, the classic test is as follows:

A. Determine the "number" of your audio device with ye old command 'cat /proc/asound/cards'. It's the first number in the line of the example below.

Code: Select all

cat /proc/asound/cards

 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 29
 2 [U192k          ]: USB-Audio - UMC404HD 192k
                      BEHRINGER UMC404HD 192k at usb-0000:00:1a.0-1.2.4, high speed

So the audio device that I wanna use is number 2.

B. Start JackAudio for audio device number 2 with the command 'jackd -d alsa --device hw:2'. Example of output:

Code: Select all

jackd -d alsa --device hw:2

jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio2
creating alsa driver ... hw:2|hw:2|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback

Try that and then start Carla w/ Jack support. And, like I said, determine if you're using PipeWire or not. If need be start a separate topic on that.

Good luck! :)

AndyH
Established Member
Posts: 7
Joined: Thu Apr 14, 2022 10:13 pm

Re: Cant get midi to work with carla

Post by AndyH »

Linuxmucian01,

Yes, I am using pipewire. Its the default for Ubuntu Studio. I'm familiar with it and wireplumber. I was using wireplumber to rename video cameras. I have several of the same type that were showing up with the same name.

My cards are:

Code: Select all

0 [C920           ]: USB-Audio - HD Pro Webcam C920
                      HD Pro Webcam C920 at usb-0000:00:14.0-11, high speed
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0x6001110000 irq 153
 2 [USB            ]: USB-Audio - Scarlett 18i20 USB
                      Focusrite Scarlett 18i20 USB at usb-0000:00:14.0-12, high speed
 3 [Webcam         ]: USB-Audio - C922 Pro Stream Webcam
                      C922 Pro Stream Webcam at usb-0000:00:14.0-13, high speed
 4 [Studio         ]: USB-Audio - nanoKONTROL Studio
                      nanoKONTROL Studio at usb-0000:00:14.0-14, full speed
 5 [Grand          ]: USB-Audio - Portable Grand
                      Yamaha Corporation Portable Grand at usb-0000:00:14.0-8, full speed

Pipewire is emulating jack, though not completely it seems.

Code: Select all

jackd -d alsa hw:2
jackdmp 1.9.21
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2022 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
[W][17208.151690] default      | [       control.c:   87 jackctl_server_create2()] not implemented 0x55b5e4b18eb0 0x55b5e4b19010 0x55b5e4b190d0
[W][17208.151721] default      | [       control.c:  174 jackctl_server_get_parameters()] 0x55b5e5a87080: not implemented
[W][17208.151727] default      | [       control.c:  162 jackctl_server_get_drivers_list()] 0x55b5e5a87080: not implemented
[W][17208.151731] default      | [       control.c:  245 jackctl_driver_get_name()] 0x55b5e5a870a0: not implemented
Unknown driver "alsa"
[W][17208.151736] default      | [       control.c:  114 jackctl_server_destroy()] 0x55b5e5a87080: not implemented

There does seem to be some weirdness in the Canvas menu. I can't select both Show Internal and and Show External. Clicking one disables the other. That is odd, given that they are both check boxes. This was working before I started messing with the Canvas menu. I could see all my devices.

I haven't tried installing jack with pipewire. I think they are mutually exclusive. I'll investigate more. Thank you for your help.

AndyH
Established Member
Posts: 7
Joined: Thu Apr 14, 2022 10:13 pm

Re: Cant get midi to work with carla

Post by AndyH »

noedig wrote: Tue Aug 08, 2023 10:08 pm

For me, the Carla plugins list shows an LV2 version and an Internal version of the Audio Gain plugin. I can't get the Internal one to react to MIDI, but the LV2 version works.

I will try that once I figure out how to click both "Show Internal" and "Show External" on the Canvas menu. They are mutually exclusive right now.

Thanks/

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: Cant get midi to work with carla

Post by Linuxmusician01 »

@AndyH: Sorry, I didn't realize that you used PW (my bad, one should ask nowadays). I think somebody else should help you on how to use PipeWire and Carla because I don't know if the latest versions of Carla support PW or that it still only works w/ Alsa and JackAudio. My system (Ubuntu 20.04) has got no PW yet because it's too old. The Jack commands that I posted might not work in PW...

I see in your top post that 'aseqdump' shows a reaction to (all?) knobs and sliders of the Korg Nanokontrol (link Korg). So depending on if your favorite plugin/software supports Midi learn it should work.

For my own reference: the K. Nanokontrol is a Midi device with sliders etc. to use w/ a DAW. With a switch on the back it toggles between Bluetooth (i.e. wireless) Midi and USB Midi. It's not an audio device. Unfortunately the command 'cat /proc/asound/cards' lists pure Midi devices as an "USB-Audio" device.

Good luck! :)

User avatar
Impostor
Established Member
Posts: 1392
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 148 times
Been thanked: 366 times

Re: Cant get midi to work with carla

Post by Impostor »

AndyH wrote: Thu Aug 10, 2023 1:27 am
noedig wrote: Tue Aug 08, 2023 10:08 pm

For me, the Carla plugins list shows an LV2 version and an Internal version of the Audio Gain plugin. I can't get the Internal one to react to MIDI, but the LV2 version works.

I will try that once I figure out how to click both "Show Internal" and "Show External" on the Canvas menu. They are mutually exclusive right now.

Thanks/

Doesn't matter: You can connect the internal stuff in "show internal" mode, then select "show external" , and then connect the external stuff. Caveat: I can only connect my alsa midi ports here to Carla's midi in and out. I have disabled "autoconnect" in Carla, and I need to connect Carla's audio in- and output via qjackctl.

Post Reply