Using multiple Sound Cards with alsa_in

I’ve been successfully playing with using multiple sound cards for jack using alsa_in. e.g.
run aplay -l to get an additional usb sound device`

root@zynthian:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplus], device 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card1: Microphone [Yeti Stereo Microphone], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Then use alsa_in to create a jackport for the new soundcard.

 alsa_in -j yeti -d hw:Microphone

once you’ve done this you can create a new effect layer and use something like patchage to connect the yeti ports to whatever effect is in the layer.

I’m thinking about how I could set this up so it can be managed from the Zynthian UI. So far I’ve though about creating a resource in the web interface where you would input the device name and requested jack port name. Then in the ui you’d have a special layer appear that would create a layer for your secondary input which you could use the standard zynth interface for adding effects to, such as a vocoder or effects chain for a guitar input, that would then output though the main jack system out in the normal way. The only constraint I can think of is you should only be able to launch one instance of each secondary input.

Does that sound workable? Does anyone have any better ideas for how to do it?


You could have to choose the audio input when adding an effect layer of they are more than one. Then you just have as many effects layers as you want with associated effects chains, each feed from the input you want. Whilst such work was being done, we could add the ability to select which mono input to use as well as stereo, i.e. present all inputs as: A, B, S.


That sounds like a grand idea.

I’ve a pending task for improving audio-input routing . I will consider this use-case …

1 Like

Looks like there is a better way with jack_load

Definitely one for those that shunt completely different audio down the left & the right channel.

Is the loading of two mono LV2’s the same as one stereo?