08-03-2018, 03:15 PM | #1 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Connecting midi devices on ALSA
Hey I have a focusrite 2i4 with a miditech keyboard plugged into that
on Ubuntu 18 running freshly installed Reaper 5.94 linux 64 The midi device prefs show hw:USB Enabled with id: 1 But no midi making it to loaded and armed ReaSynth Any idea what I'm doing wrong? Code:
➜ ~ cat /proc/asound/cards 0 [HDMI ]: HDA-Intel - HDA Intel HDMI HDA Intel HDMI at 0xf7f14000 irq 35 1 [USB ]: USB-Audio - Scarlett 2i4 USB Focusrite Scarlett 2i4 USB at usb-0000:00:14.0-3, high speed 2 [PCH ]: HDA-Intel - HDA Intel PCH HDA Intel PCH at 0xf7f10000 irq 34 ➜ ~ aconnect -i client 0: 'System' [type=kernel] 0 'Timer ' 1 'Announce ' client 14: 'Midi Through' [type=kernel] 0 'Midi Through Port-0' client 20: 'Scarlett 2i4 USB' [type=kernel,card=1] 0 'Scarlett 2i4 USB MIDI 1' ➜ ~ |
08-03-2018, 03:46 PM | #2 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
I found this which was really helpful
https://wiki.archlinux.org/index.php/USB_MIDI_keyboards but i don't remember actually changing anything but it works awesomely now after rebooting yay! Any advice to demystify how it works would be great though |
08-04-2018, 05:52 AM | #3 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,721
|
does the record armed track have input monitoring enabled? also does the meter show midi messages being input?
|
08-04-2018, 02:30 PM | #4 | |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Quote:
Cheers Justin Yes it was record armed and monitoring was on. Plus I right clicked and added instrument (Reasynth) to make sure But it is working now and tested again this morning so all good. Not sure what the problem was, whether it was me or it. |
|
08-04-2018, 03:45 PM | #5 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Ok So I did a fresh install of Ubuntu 18.04.1 on an old dell lap top as well
Plugged the focusrite in and same result. But I had also installed qjackctl and ran that before. So I stopped the jack server, rebooted Now Alsa works audio and midi. I'm wondering if I didn't install qjackctl at all, whether Alsa would have worked first pop? |
08-04-2018, 09:20 PM | #6 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Garrick that is interesting. I always had an easier time getting things working (and better performance) with straight up alsa rather than adding jack to the mix. I know that some people tend to say otherwise. But I prefer not using jack, carla, etc. for the above reasons.
__________________
It's time to take a stand against the synthesizer. |
08-04-2018, 10:18 PM | #7 | |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Quote:
Yeah I'm a bit sparse on the knowledge front here, on what can you do with jack that you can't with alsa. I imagine alsa came first. I shall read up |
|
08-04-2018, 11:58 PM | #8 |
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
ALSA == driver
Jack == route between programs Jack is not responsible for realtime. ALSA is realtime as well, but is also not responsible for realtime. The various audio optimizations are responsible for realtime. With ALSA you have assigned your sound card driver, you can only assign 1 program ALSA. Jack's here to route between audio programs. See picture in the appendix && See signature for more details on audio optimizations.
__________________
GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW Last edited by khz; 08-05-2018 at 12:26 AM. Reason: gramatics |
08-05-2018, 01:01 AM | #9 | |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Quote:
Nice one khz and thanks for that. I was just thinking joining up to that forum. So I took this as a sign and joined up So alsa is great until you need to route in a another program like with rewire? |
|
08-05-2018, 02:04 AM | #10 |
Human being with feelings
Join Date: Mar 2012
Posts: 610
|
Check out my post on Linux audio, it relates to these subjects:
https://www.learndigitalaudio.com/ho...ows-audio-2017
__________________
----------> Debian Linux Distribution = Computing Joy & Freedom <---------- |
08-05-2018, 02:37 AM | #11 | |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Quote:
Cool article David ta So is it fair to say alsa has a limited API and usually has the middle man of pulseaudio and jack to do fancy stuff like having 2 programs have sound at the same time? I didn't really get my head around this with asio and wasapi either. Don't get me wrong I'm really really happy how it's working now with reap on linux, but do any of guys look with envy at core audio? |
|
08-05-2018, 09:07 AM | #12 | |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Quote:
I think asio was just steinberg's response to lack of low latency audio performance on windows. And wasapi was the eventual addressing of the same by microsoft (many years later). I'm not familiar with coreaudio. I hear that it does everything and well. But I think that there can be some advantages to multiple projects, where each project COULD BE simple, coherent, efficient, and flexible, like unix commandline tools, as opposed to a system being dependent upon a big monolithic project for even a single useful feature (and accepting all that project's faults for that single feature) - which is the pulseaudio way.
__________________
It's time to take a stand against the synthesizer. |
|
08-05-2018, 12:03 PM | #13 |
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
I built my Gentoo LAW without pulse audio ("-pulseaudio" >> /etc/portage/make.conf). :-)
Pulseaudio >> /dev/null <-- IMHO |
08-05-2018, 01:14 PM | #14 | |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Quote:
I forget the details, but I have ran an arch install in the past without pulseaudio. But it was a pain to use for daily driving. Still, I don't like that so many applications have dropped direct alsa support when all that is required is some possible sample rate conversion and mixing of streams rather than all that is wrapped up into pusleaudio.
__________________
It's time to take a stand against the synthesizer. |
|
08-05-2018, 02:01 PM | #15 | |
Human being with feelings
Join Date: Mar 2012
Posts: 610
|
I think this will the the future:
https://pipewire.org/ https://blogs.gnome.org/uraeus/2018/...ion-an-update/ Quote:
__________________
----------> Debian Linux Distribution = Computing Joy & Freedom <---------- |
|
08-05-2018, 02:24 PM | #16 | |
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
!vote KLANG \o/ ;-)
http://klang.eudyptula.org/ Quote:
|
|
08-05-2018, 02:32 PM | #17 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Ding ding!
|
08-05-2018, 02:55 PM | #18 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Both Pipewire and Klang look interesting, from very different approaches. Ultimately, we want something that is not more complex than it need be, is performant/efficient, reliable, flexible, and not a chore to use.
It seems that Pipewire is much further along in development. I have been seeing the Klang info page in the same state for some years. Klang looks to have a heavier focus on efficiency/performance by placing routing in the kernel. Pipewire looks to have a heavier focus on flexibility and backward compatibility. Who knows which might eventually prevail? Probably the one that focuses on minimal negative impact on current applications and making progress. By the way, I remember this talk with Wolfgang Draxinger (Klang dev) on init systems/desktops, specifically systemd/Lennart Poettering and team taking over like a virus: https://www.youtube.com/results?sear...gang+draxinger
__________________
It's time to take a stand against the synthesizer. |
08-05-2018, 03:18 PM | #19 |
Human being with feelings
Join Date: Jul 2008
Posts: 43
|
KLANG has not been very well received by kernel developers, to put it politely. ;-) I never had anything new from KLANG heard.
The future is more like pulseaudio, which is the worst of all possibilities. IMHO |
08-05-2018, 04:16 PM | #20 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Ok so I did another fresh install, this time Zorin (ubuntu 16.04)
installed 5.941 but unable to connect to the scarlett with alsa even after rebooting have done sudo usermod -aG audio garrick this report shows alsa can see the usb scarlett http://www.alsa-project.org/db/?f=1f...28525bd6d18faf |
08-05-2018, 04:27 PM | #21 | |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Quote:
__________________
It's time to take a stand against the synthesizer. |
|
08-05-2018, 04:46 PM | #22 | |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Quote:
damn I should have checked. I didn't install qjackctl but not sure if jack was installed by default on Zorin 12.3 Now trying fresh install of ubuntu 18.04.1 see how that goes |
|
08-05-2018, 04:58 PM | #23 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
I ask because it seems like I remember a strange config issue with alsa where it would only run when testing half-duplex but would not connect to ardour (full-duplex). And it seems that it was related to jack being present or not (I forget which way). I'm trying to find it in my old notes (it is there somewhere).
So for having a better idea of what is going on, I would suggest testing inputs and outputs separately using alsa-utils to see if your interface is working ok at half-duplex. But maybe before that just see if you can hear anything after adjusting levels in alsa-mixer with a microphone or guitar connected. If all is well in alsa-mixer, then at least your know your interface's inputs and outputs are working as expected. A link for testing interface with alsa: http://mailman.alsa-project.org/main...undcardTesting This might come in handy too: https://alsa.opensrc.org/Alsa-utils https://alsa.opensrc.org/Proc_asound_documentation
__________________
It's time to take a stand against the synthesizer. Last edited by brainwreck; 08-05-2018 at 05:15 PM. |
08-05-2018, 05:10 PM | #24 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
yeah will do bw
the ubuntu install has same prob added to audio group interestingly i searched for jack Code:
garrick@garrick-All-Series:~$ apt list --installed | grep jack libjack-jackd2-0/bionic,now 1.9.12~dfsg-2 amd64 [installed] garrick@garrick-All-Series:~$ |
08-05-2018, 05:17 PM | #25 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
I guess enough people are expecting to see jack be there these days...
__________________
It's time to take a stand against the synthesizer. |
08-05-2018, 05:34 PM | #26 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Yeah it's all good
I'll just go the normal jack way for now heres the report for the ubuntu 18 install http://www.alsa-project.org/db/?f=1e...6c00cb1457448e |
08-05-2018, 05:38 PM | #27 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Yea, whatever works.
Sorry man, I came up with nothing in my notes. It is probably on a different drive. But I remember the problem being usb specific, where the interface was being presented to the application at half-duplex only and failing to connect. I can't remember exactly what the issue was at the moment, but I seem to remember jack being involved somehow.
__________________
It's time to take a stand against the synthesizer. |
08-05-2018, 06:23 PM | #28 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
yay working
and i'm too ashamed to tell what I was doing wrong |
08-05-2018, 06:41 PM | #29 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Come on with it...
__________________
It's time to take a stand against the synthesizer. |
08-05-2018, 06:58 PM | #30 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Well you know where that drop down list is in audio devices
Yeah bdub that sure is a purdy drop down list yeah well it sure was purdy whan I actually clicked on the arrow to the right of that dropdown list to make that droplist go down. I'll get my coat |
08-05-2018, 07:16 PM | #31 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Did a fresh install Ubuntu 18.04.1, just to be sure
no jack installed reaper alsa audio and midi worked first time! |
08-05-2018, 07:33 PM | #32 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
I won't speak of my many own stupidities.
__________________
It's time to take a stand against the synthesizer. |
08-05-2018, 07:42 PM | #33 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
Thank you b
Now all I have to do is wait till this thread makes it to the next page |
08-05-2018, 07:56 PM | #34 |
Human being with feelings
Join Date: Jul 2006
Posts: 20,859
|
Requesting a thread lock. Hey Ollie!
__________________
It's time to take a stand against the synthesizer. |
08-05-2018, 09:57 PM | #35 |
Human being with feelings
Join Date: Jul 2009
Location: Wellington
Posts: 4,622
|
or even a feature request for the love of all things good
before someone gets hurt! |
08-06-2018, 10:45 AM | #36 | |
Human being with feelings
Join Date: Nov 2011
Posts: 971
|
Quote:
Even better, the PulseAudio development guys are in total agreement and don't mind Pipewire replacing their project--that really says something!! |
|
04-25-2019, 04:10 AM | #37 |
Human being with feelings
Join Date: Dec 2012
Posts: 39
|
Jack and MIDI
I have used Reaper in Wine for years. I have just started with Reaper for Linux and I know what the problem is!
Before getting to the point, for my purposes I need to use Carla, because the Windows VST plugins that are fine with wine don't work as native linux plugins. (I'm also having problems with running native linux VST plugins in Reaper and Carla helps with that, as well). Carla is much more flexible when running with jack. Jack is the problem. Start qjackctl and Reaper set to using the jack engine in audio prefs. In Reaper, enable a Midi IN port and a Midi OUT port. Plug in your Scarlett interface. In the qjackctl window, click the Connections pane button. In the Connections pane you will see the Reaper midi ports appear under MIDI, but the Scarlett ports appear under ALSA. None of the alsa midi ports will appear in Reaper and neither can they be patched together with the Connections pane The various Ubuntu distributions, including Ubuntu Studio, bridge alsa midi devices to the jack alsa section and not to the jack MIDI section. With Reaper running in Wine and using WineASIO, the alsa MIDI ports are presented to Reaper and can be enabled directly in Midi prefs. With Reaper for Linux, Reaper is looking in the MIDI connections section and not the Alsa section where the software midi devices like Timidity and the alsa keyboard appear. In addition, the external MIDI devices appear under ALSA as well. The temporary solution (as you have discovered) is to run Reaper with the ALSA engine in which case all the software and hardware midi devices will appear in Reaper. Try using Patchage to connect the various ports together. Out of curiosity, I installed and ran the virtual keyboard for jack. In Reaper, I was able to select the virtual keyboard as a MIDI track source, but recording keystrokes failed. Enabling one of the Reaper MIDI INs, patching it to the keyboard in the qjackctl Connections MIDI panel (just click on the keyboard port and drag to the Reaper Midi Input 1) and selecting Midi Input 1 as the source in Reaper works perfectly. Rather than put this right, I would prefer that Reaper used the jack ports under ALSA. |
04-25-2019, 07:10 AM | #38 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
I have qJackCtl run this script at startup which first issues the ALSA to JACK midi connection command "a2jmidid". That gets midi working in REAPER, even though I'm using JACK which by itself doesn't expose midi on my DAW. The second command links my two M-Audio Delta 2496 cards audio up so they appear as one device, and last I have it launch REAPER for me so that starting qJackCtl also sets up midi, audio and starts REAPER.
a2jmidid -e & sleep .5 zita-a2j -d hw:3 & sleep .5 ~/.local/share/reaper_linux_x86_64/REAPER/reaper & Additionally I use this command in REAPER on the "Autostart jackd" command line. /usr/bin/jackd -P80 -dalsa -dhw:M2496 -r44100 -p64 -n2 -Xseq The -Xseq makes midi available as well, even though JACK is the audio driver. |
04-25-2019, 11:24 AM | #39 |
Human being with feelings
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,922
|
As stated above, try using the JACK (ALSA backend) -Xseq parameter. Then you ought to be able to use your hardware ports with no problem also when running JACK.
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc. :) |
Thread Tools | |
Display Modes | |
|
|