Multiple Audio Interfaces - Roland MC-101 and Blokas Pisound

Discussion of all things Raspberry Pi / Raspberry Pi 2 related

Moderators: MattKingUSA, khz

Post Reply
User avatar
RowdyVoyeur
Established Member
Posts: 9
Joined: Mon May 27, 2024 1:44 pm
Location: Portugal
Been thanked: 1 time
Contact:

Multiple Audio Interfaces - Roland MC-101 and Blokas Pisound

Post by RowdyVoyeur »

Hi,

I'm trying to add multiple audio cards on a Raspberry Pi 4, running Patchbox OS 5.15.36. The main audio card is a Blokas Pisound, with stereo audio in and audio out.

The objective is to add a Roland MC-101 as an additional USB audio card to get the Pisound playing the MC-101 audio and to record onto the MC-101 using the Pisound audio input. So basically: MC-101 > System Out | System In > MC-101 > System Out

I can easily do this by setting the Roland MC-101 in Generic mode and then use either alsa_in /alsa_out or jack_load, together with jack_connect. Both approaches work relatively well with minimal latency, but in both cases I hear occasional audio artefacts like pops and clicks, whether in the audio output (Roland MC-101 playing) or in the audio input (Roland MC-101 receiving the audio coming from the Pisound audio in).

I could end my experiments here and go on making music in Generic mode, but I accidentally found that if I set the Roland MC-101 to Vendor mode and use alsa_in /alsa_out, all the audio artefacts are gone. The only downside is that I can only hear the MC-101 audio out, i.e. it no longer plays back the audio coming from the Pisound audio input.

So, basically, I do the following either in Generic or Vendor modes:

Code: Select all

alsa_in -j "MC101_in" -d hw:MC101,DEV=0 -r 44100 -p 64 -n 4
alsa_out -j "MC101_out" -d hw:MC101,DEV=0 -r 44100 -p 64 -n 4
jack_connect MC101_in:capture_1 system:playback_1
jack_connect MC101_in:capture_2 system:playback_2
jack_connect system:capture_1 MC101_out:playback_1
jack_connect system:capture_2 MC101_out:playback_2

In Generic mode I hear both the MC-101 internal audio and the audio input from the Pisound with, admittedly, ocasional audio artefacts. However, in Vendor mode, I get an absolute pristine sound (I think it sounds even better than the audio coming from Generic mode) with absolutely no audio artefacts, but I can only hear the MC-101 internal sound - I cannot hear the audio input coming from the Pisound.

In both cases, i can see everything properly connected with jack_lsp. I know Vendor mode theoretically required installing drivers, but apparently it seems to work without them.

I tried to change all the parameters such as Sample Rate, Buffer Size, Period, etc, but it doesn't seem to have any major impact (aside from increasing the audio artefacts). I also tried jack_load, but it does not work in Vendor mode (audio gets really distorted). I could't find and difference in using hw: or plughw: either.

So, my question is: Has anyone encountered the same issue and/or understands what's going on with the Generic versus Vendor modes?

Thanks in advance for reading!

User avatar
RowdyVoyeur
Established Member
Posts: 9
Joined: Mon May 27, 2024 1:44 pm
Location: Portugal
Been thanked: 1 time
Contact:

Re: Multiple Audio Interfaces - Roland MC-101 and Blokas Pisound

Post by RowdyVoyeur »

Some important findings that solve the issue, but sort of create another one.

The user manual mentions that channels 3 and 4 (not 1 and 2) should be used for audio input with Vendor mode. I thought this wasn't possible to do with alsa_out and jack_connect, but it's actually quite simple:

Code: Select all

alsa_out -j "MC101_out" -d hw:MC101,DEV=0 -r 44100 -p 64 -n 4 -c 4 &
jack_connect system:capture_1 MC101_out:playback_3
jack_connect system:capture_2 MC101_out:playback_4

Voilá, the MC-101 receives audio from the Pisound audio input via USB, in Vendor mode. Neglectable latency and pristine audio with no artefacts whatsoever.

However, I cannot send the audio back to the Pisound like I could do in Generic mode, i.e. I can only hear it directly from the MC-101 output. When I attempt to to the following (to send the audio back to the Pisound):

Code: Select all

alsa_in -j "MC101_in" -d hw:MC101,DEV=0 -r 44100 -p 64 -n 4 -c 2 &

I'm presented with the following error:

Code: Select all

Unable to set hw params for playback: Invalid argument Setting of hwparams failed: Invalid argument

It would be great if someone could point me in the right direction.

Cheers

User avatar
bluebell
Established Member
Posts: 2053
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 154 times
Been thanked: 174 times

Re: Multiple Audio Interfaces - Roland MC-101 and Blokas Pisound

Post by bluebell »

RowdyVoyeur wrote: Tue May 28, 2024 12:05 am

Some important findings that solve the issue, but sort of create another one.

The user manual mentions that channels 3 and 4 (not 1 and 2) should be used for audio input with Vendor mode. I thought this wasn't possible to do with alsa_out and jack_connect, but it's actually quite simple:

Code: Select all

alsa_out -j "MC101_out" -d hw:MC101,DEV=0 -r 44100 -p 64 -n 4 -c 4 &
jack_connect system:capture_1 MC101_out:playback_3
jack_connect system:capture_2 MC101_out:playback_4

Voilá, the MC-101 receives audio from the Pisound audio input via USB, in Vendor mode. Neglectable latency and pristine audio with no artefacts whatsoever.

However, I cannot send the audio back to the Pisound like I could do in Generic mode, i.e. I can only hear it directly from the MC-101 output. When I attempt to to the following (to send the audio back to the Pisound):

Code: Select all

alsa_in -j "MC101_in" -d hw:MC101,DEV=0 -r 44100 -p 64 -n 4 -c 2 &

I'm presented with the following error:

Code: Select all

Unable to set hw params for playback: Invalid argument Setting of hwparams failed: Invalid argument

It would be great if someone could point me in the right direction.

Cheers

What if you set "-c 4" for alsa_in, too? Or leave it out?

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

User avatar
RowdyVoyeur
Established Member
Posts: 9
Joined: Mon May 27, 2024 1:44 pm
Location: Portugal
Been thanked: 1 time
Contact:

Re: Multiple Audio Interfaces - Roland MC-101 and Blokas Pisound

Post by RowdyVoyeur »

bluebell wrote: Fri May 31, 2024 4:15 pm

What if you set "-c 4" for alsa_in, too? Or leave it out?

Thank you very much! Setting to -c 4 did not work, but setting to -c 10 did!

Apparently the MC-101 has 10 outs and 4 ins in Vendor mode and I need to create ports for all out and in channels to avoid error.

I'll just leave it here if anyone needs to use the MC-101 in Vendor mode on a Raspberry Pi 4 running Patchbox OS 2024-04-04 (without installing any drivers, given there are no drivers for Debian):

Code: Select all

alsa_in -j "MC101_in" -d hw:MC101,DEV=0 -r 44100 -p 64 -n 4 -c 10 &

alsa_out -j "MC101_out" -d hw:MC101,DEV=0 -r 44100 -p 64 -n 4 -c 4 &

This creates ports for the following channels:

  • 10 Channels Out:1+2 for Master Out; 3+4 for Track 1; 5+6 for Track 2; 7+8 for Track 3; 9+10 for Track 4

  • 4 Channels In: 1+2 for Master In (which bypasses controls, i.e. always on regardless of the settings); 3+4 for PC In (which allows controls, i.e. you can pick only L or R channels and route them as you wish)

Which then can be, for example, connected like this:

Code: Select all

jack_connect MC101_in:capture_1 system:playback_1

jack_connect MC101_in:capture_2 system:playback_2

jack_connect system:capture_1 MC101_out:playback_3

jack_connect system:capture_2 MC101_out:playback_4
Post Reply