-->
Home » , , , , » AVL-MXE Guide: Audio and MIDI in AVL-MXE

AVL-MXE Guide: Audio and MIDI in AVL-MXE

I need to RTFM for AVL-MX for music, audio and midi, jack and carla, etc,  need a link/links to the documentation online that covers audio software  included with AVL-MX. I'm not sure

PulseAudio with JACK : It cannot be overstated that AVL-MXE has the potential to differ significantly from your usual Linux Desktop in its handling of Audio routing and subsystems. AVL-MXE relies on the low-latency Jack Audio Connection Kit (a.k.a JACK) for its powerful interconnectivity. JACK is a low-latency sound server which runs on top of ALSA (Advanced Linux Sound Architecture). ALSA is the basic 'driver' level of Audio hardware support and is both integrated in the Kernel itself as well as being a core component of the Operating System. By default many distributions and Desktop Environments install the ‘PulseAudio’ Audio server, in recent years PulseAudio can be made to peacefully coexist with JACK and AVL-MXE makes this easier by pre-configuring JACK and PulseAudio to work together with a custom ‘pajackconnect’ script . Setting things up with Qjackctl : The most initially confusing thing for many people getting started with Linux Audio is how to get the applications they want to use to 'see' (or perhaps hear) their Audio device. Reading this section will hopefully facilitate getting everything to 'just work'. The biggest step required of the User is to identify and select the Audio device they want to use, after that most of the complexity is looked after for you. The easiest way to setup the JACK Audio server is to use the JACK Control app (a.k.a. Qjackctl). It can easily be launched from the XFCE4 Panel or Whisker Menu. To setup your Audio device click the 'Setup' button.

 

The 'Setup' Window has multiple tabs which we will go over one at a time, the 'Settings' tab is where we initially select and set up the device we want to use with JACK in the 'Parameters' tab. To the left is the 'Driver' select dropdown box. Internal, PCI, and USB 1.1 and 2.0 Audio devices require the 'alsa' driver and FireWire devices require you to select the ‘alsa’ or 'firewire' driver (depending on the firewire driver being used). It is essential that the 'Realtime' checkbox is selected. Next we need to select our desired Audio device from the 'Interface' dropdown box.

 

In the 'Interface' dropdown box we will see a list of available Audio devices on the system, generally speaking whatever appears in the dropdown box should be supported to use with JACK, below is an example with multiple ALSA devices on a system to illustrate what to look for. In the example picture above we can see that the system has a ‘USB Audio CODEC’ device at 'hw:0' and an iRig DUO USB Audio device at ‘hw:1’

 

Underneath the 'Interface' dropdown box we can set the 'Sample Rate' , 'Frames/Period' and 'Periods/Buffer'. By default AVL-MXE is pre-configured for a Sample Rate of 44100, 1024 Frames/Period and 3 Periods/Buffer. Potentially these default settings will work OOTB for most Users but may need to be changed depending on the performance of your hardware. The the most influencial number is 'Frames/Period'. If you are experiencing Audio dropouts or 'Xruns' you may need to increase from '1024', conversely if you want to have lower 'latency' you can decrease from '1024' until Xruns reappear. The 'Periods/Buffer' figure is dependent on the Audio device type, USB and Internal Audio devices generally perform best at a setting of '3' Buffers and PCI(e) Audio devices require a setting of '2'. Once you are happy with your settings you can start JACK by hitting the 'Start' button on Qjackctl.

 

*PLEASE NOTE! - 'Latency' is the delay incurred by your Audio/MIDI signals going into your Audio/MIDI device Inputs and following the signal path of both the hardware and software Applications being used and coming back out of the Audio/MIDI device's Outputs.

 

The 'Advanced' tab of the Setup window contains extra settings for experienced Users and in most cases these settings do not need to be changed. The ability to choose separate Output and Input devices may be of interest to people who want to use multiple Audio devices, a common scenario is using USB microphones to record and another System Audio device to play back. Another important JACK setting is the 'Timeout' value for running MIDI Plugins and editing a setting of 2000ms is recommended and set by default.

 

JACK's L'il Helpers: pajackconnect and a2jmidid : The next 'Options' tab is where we can have Qjackctl execute any optional scripts when it is started, by default AVL-MXE provides a 'pajackconnect' script as one of two very important helper applications when Qjackctl starts JACK. One helper application is 'a2jmidid'' (ALSA to JACK MIDI Daemon). In Linux there are 2 methods of handling MIDI I/O, one is at the ALSA driver level and the other is with JACK. This can be a problem if you are using an application with JACK and trying to connect a MIDI device with ALSA, the two methods cannot be used at the same time so the solution is to bridge any ALSA MIDI devices so they appear available as JACK MIDI and this is exactly what 'a2jmidid' is for, now any ALSA MIDI devices seamlessly appear to be selected as 'a2j' in Applications using JACK. The second helper application is a script known as 'pajackconnect' and it’s purpose is to integrate PulseAudio as a source and sink server and client routed through JACK. The ensures that applications using PulseAudio will route their Audio to the selected running Audio device you’ve selected in Qjackctl.

 

JACK Autostart and Other Settings : The 'Misc' tab of the Qjackctl 'Setup' window gives some other convenient options for getting JACK integrated smoothly. The 'Start JACK Audio server on application startup' checkbox means as soon as you launch Qjackctl it will start JACK without you needing to hit the 'Start' button. You can also have Qjackctl run in the system tray on the XFCE4 panel when you close the GUI. If you have a setup where you are using one Audio device and it doesn't change you can have Qjackctl automatically start when you log in to your computer, for this to work you need to select the option to 'Start JACK Audio server on application startup'. To have Qjackctl automatically start you need to add it to the XFCE4 'Session and Startup' list. Go to the Whisker Menu and type 'Session' into the search bar and the top choice should be 'Session and Startup', go to the 'Application Autostart' tab and click the 'Add' button and create an entry for Qjackctl like the one shown on the next page.

 

Getting Connected : If you are using a monolithic DAW like Ardour or Mixbus with JACK you will find that most of the connectivity you need is managed within the program itself so making manual connections is not necessary, in these cases you simply start JACK and then launch your program. However if you want to use and connect individual JACK-aware programs you may want to use the connection features of Qjackctl. To access the connections window click the 'Connect' button.

 

There are three tabs in the 'Connections' window which pertain to three specific connection points. 'Audio' is for both hardware and software Audio (not MIDI) connections. When you are using the default AVL-MXE settings it is normal and expected for the 'PulseAudio JACK Sink' and 'PulseAudio JACK Source' clients to appear because PulseAudio is still active on the system. If you have a JACK-aware application running it should appear in the 'Readable or Writable Clients' panes and in most cases you will want to connect it to the 'system' playback or 'system' capture ports not the PulseAudio ports.

 

The center 'MIDI' tab is for 'JACK MIDI' connections, because JACK MIDI is being bridged by 'a2jmidid' its ports appear under the 'a2j' Client. You can see the iRig PRO DUO is visible in this tab ready to be connected to JACK-aware MIDI applications.

 

The 'ALSA' tab is for ALSA MIDI hardware and software to be connected, as you can see since the iRig PRO DUO is supported by ALSA it also appears in the ALSA tab

 

Potential Audio Routing Problems with Mozilla Firefox : Recently Mozilla’s Firefox Web Browser changed it’s Audio routing from directly connecting to ALSA to utilizing PulseAudio. It has been noted that if PulseAudio and JACK are working together utilizing the ‘PulseAudio JACK Source/Sink’ Firefox may try to access the default system Audio device directly rather than connecting through the already running PulseAudio JACK Sink. This results in no Browser sound and Audio and Video streams that will not play back. To fix this Firefox needs to be directed to use the JACK Sink by using the PulseAudio Volume Control launched either from Menu→ Multimedia-→PulseAudio Volume Comtrol or clicking the PulseAudio applet on the XFCE4 Panel. Look for ‘Firefox’ in the ‘Playback’ Tab and click on the highlighted Audio device button.

 

Make sure you have the ‘PulseAudio JACK Sink’ selected for Playback rather than the system Audio device.

 

jackd and jackdbus : There are 2 different ways the system can run JACK behind the scenes, the simplest is by running the ‘jackd’ executable with ‘Qjackctl’ and this is what AVL-MXE uses by default, however there is a second way of running JACK and this is with the Desktop interprocess communication mechanism known as ‘D-bus’. Running JACK with D-bus is a selectable option in Qjackctl (Setup → Misc. tab). If you start JACK with Qjackctl before doing Audio and MIDI work you will probably not encounter the D-bus JACK executable known as ‘jackdbus’. Occasionally other JACK-aware programs that are launched before Qjackctl may inadvertently start jackdbus and when you later try to launch JACK with Qjackctl you will see JACK is already running and displaying as ‘Active’ in the Qjackctl GUI and you may even notice that the sample rate may set to a different value than intended. Only one instance of JACK can run at a time so you may not be able to launch other JACK-aware programs or you may find that your Audio setup seems to have a mind of it’s own if jackdbus is running undetected in the background. You can manually kill all JACK processes by running this command in a regular Terminal: killall -9 jackd jackdbus

 

 

 

source

0 commenti:

Post a Comment

Random Posts

Recent Posts

Recent Posts Widget

Popular Posts

Labels

Archive

page counter follow us in feedly
 
Copyright © 2014 Linuxlandit & The Conqueror Penguin
-->