4

I've been trying to get a foss virtual guitar amp to run on my Fedora machine for a while now, Guitarix (which runs on JACK) to be more precise. But I just can't figure it out. People say that it is very straight forward to get it to work by using AV Linux instead. I don't want to install a new distro on my machine, though. So my idea is to create a Docker image based on AV Linux and somehow pass my USB sound card adapter thingy (which I use to connect my guitar) through to the Docker container and then use a VNC tool to interact with the Guitarix GUI in the container. (I also have a normal USB sound card that could be used as the output device in case it would help reduce the latency.)

But my fear is that doing this with Docker would introduce a lot of audio latency, effectively rendering it useless. It is really important to me that the delay between picking a string and hearing the sound is as low as possible. A 100 milliseconds for example would be way too much already. 20-30ms would probably be acceptable.

I have already tried it with a virtual machine and the latency was pretty horrible. I have to admit I was using a Windows VM with a different virtual amp (RockSmith) which is very CPU/GPU intensive, though.

Forivin
  • 779
  • 5
  • 18
  • 37

1 Answers1

1

Some points that can guide you:

  • You don't need AV Linux to use Guitarix once it is in the official repositories in Fedora 26, so I don't see any advantage of using it inside a container/VM.

So my idea is to create a Docker image based on AV Linux and somehow pass my USB sound card adapter thingy (which I use to connect my guitar) through to the Docker container and then use a VNC tool to interact with the Guitarix GUI in the container.

There is no AVLinux docker image, as far as I know.

If you really want to use Guitarix inside a container you can take a look here:

https://blog.jessfraz.com/post/docker-containers-on-the-desktop/

There are some examples of desktop applications running on a container and the respective docker files. You can learn from that.

But my fear is that doing this with Docker would introduce a lot of audio latency, effectively rendering it useless.

No, it will not introduce a lot of audio latency (almost none).

A 100 milliseconds for example would be way too much already. 20-30ms would probably be acceptable.

Above 6-7 ms you can feel it, probably the experience will not be great.

If your intention is to get the job done correctly, put some effort to run it on your host. If you want some adventures, try to understand better the container way of working to avoid some misconceptions.

If you want to try another Linux audio distribution, you can always give a look to http://kxstudio.linuxaudio.org/

Nuno Dio
  • 366
  • 2
  • 9
  • Guitarix already is in the Fedora repo. Setting it up properly is much more complicated than just installing it. And I couldn't get it to work properly. The documentation for AV Linux on this topic is much better than what you find on it for Fedora. And you can always create your own base images for Docker. Your statement about the '6-7 ms' is incorrect fyi. – Forivin Aug 26 '17 at 11:47
  • 1) I will not argue my statement about the latency, you can always search for it. 2) I give you my own opinion about what is best for you to get lower latency. 3) If AV Linux is good for you, fine... Use it. – Nuno Dio Aug 26 '17 at 13:28
  • 1
    I know for a fact that the latency statement is incorrect. ;) I'm not asking you to argue. I know people who didn't even notice a 50ms delay. It is highly subjective. Anyway, can you back up this statement `No, it will not introduce a lot of audio latency (almost none).`. – Forivin Aug 27 '17 at 07:17
  • It's intrinsic to container way of working. What you are running is a process on your host, not an emulation. Check https://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-normal-virtual-machine and by the way: https://www.soundonsound.com/techniques/optimising-latency-pc-audio-interface . I didn't find any decent documentation about "--devices" internals in docker, but I can speak for my self-experiences. The best thing you can do is make your own experiences and take your conclusions. – Nuno Dio Aug 29 '17 at 20:55