how to connect additional soundcards to your jack setup

Nikolaus Gradwohl2017-11-29T07:55:13+00:00

alsa_in

Many hardware synthesizer come with an USB port these days and some of them even connect as a soundcard, allowing you to route the audio from the synth directly to your daw without wasting an input on your soundcard. And sometimes you want to record something using an USB microphone or USB Guitar cable.

To connect such devices to my DAW via jack on linux I created a little startup script that runs every time I start Bitwig Studio to make sure all the external devices are connected. I use alsa_in - a command line tool that allows you to connect an additional alsa sound card. a2jack needs some parameters like the device name, sampling rate or buffer size to use and starts a process. Then it starts a process that listens to the alsa device and forwards the input to jack by connecting as a jack client application with some inputports. These ports can be configured as input routes in your daw like Bitwig or ardor - just like you would do with an input channel on your main sound-card.

To route audio from your daw to the output of an second sound you can use alsa_out

My music startup script connects the audio interface of my Yamaha MX61 and an usb-soundcard, that is connected to my Korg KaosPad Mini, so I can use it as an external effects processor in bitwig-studio

alsa_in -j "MX61" -d hw:CARD=MX49MX61,DEV=0 -r 44100 -p 256 &
alsa_in -j "FX" -d hw:CARD=Device,DEV=0 -r 44100 -p 256 &
alsa_out -j "FX" -d hw:CARD=Device,DEV=0 -r 44100 -p 512

You can get a list of the available alsa device names by running the command

aplay -L

Unfortunately the USB soundcard I use always selects the microphone input when it is plugged in or my computer restarts. To fix this I use the amixer command to change the capture channel to line and mute it - so I don' t generate feedback loops (I spent hours finding out where that distortion came from :-/)

amixer -D "hw:CARD=Device" cset numid=11 on # Line capture on
amixer -D "hw:CARD=Device" cset numid=5 off # Line mute

you can get a list of supported controls and their id by a running

amixer -D "hw:CARD=Device" controls

just replace "hw:CARD=Device" with the device identifier of your sound interface.

Tweet This! submit to reddit Digg! Tags: | 2 comments | no trackbacks

See also:

DIY Zynthian Prototype
Phase Shift
new Track - Phase Shift
new Track - Random Broken Piano
SynthJam 01 2019

Trackbacks

Comments

Leave a response

  1. VvSurLeRiddim 2017-11-30T00:13:50+00:00

    Hi, thanks for the tip. Would it still work if Jack uses ffado as a driver for the main audio interface ?

  2. Nikolaus Gradwohl 2018-01-18T08:02:31+00:00

    As far as I know it should be irrelevant which audio driver the main jackd uses

Leave a comment