Menu

jambox: Jamulus on Raspberry Pi 4 - an easy to use, pre built microSD card image

2020-11-23
2021-02-28
1 2 3 4 > >> (Page 1 of 4)
  • Kevin Doren

    Kevin Doren - 2020-11-23

    Hello,

    I'm releasing "jambox", a pre-built Raspberry Pi 4 microSD card image for running Jamulus with a web browser UI. We're using it quite successfully at Jazz Night School in Seattle for some weekly jazz ensembles.

    For more info see this post:
    https://sourceforge.net/p/llcon/discussion/hardware/thread/91475bcb82/

    Or the github repo:
    https://github.com/kdoren/jambox-pi-gen

    Kevin Doren

     
    👍
    3
    • DonC

      DonC - 2020-11-23

      This sounds great, can you please give us more details ?
      Does the web interface have the standard Jamulus UI ?
      Can I connect easily to any server ?
      What is the approx. cost of the compete kit and how long do you need to prepare a unit ?
      Please post a screen shot.

       
  • Vincenzo

    Vincenzo - 2020-11-23

    Minutes ago I was just browsing the Raspberry web site for info :) . Is there a way to set sliders, or the aim is totally unsupervised usage? Thanks.

     
  • Kevin Doren

    Kevin Doren - 2020-11-23

    Web browser UI has full Raspberry Pi desktop, including standard Jamulus UI, so you can set sliders and everything else. Laptop or tablet works fine (I use Safari or Firefox on iPad or Edge on laptop). You can connect to any server.

    Costed BOM is in the github README.md. Around $200 including USB audio interface, mic, mic stand, cables and headphone amp, but not including headphones.

    README file is here: https://github.com/kdoren/jambox-pi-gen

     
    👍
    1

    Last edit: Kevin Doren 2020-11-23
  • Kevin Doren

    Kevin Doren - 2020-11-23

    Here's a pic of our assembled board. Boxes are attached with Velcro.

     

    Last edit: Kevin Doren 2020-11-24
  • Vincenzo

    Vincenzo - 2020-11-24

    Thanks again. By the way, for who already have audio interface etc, the BOM is just RPi + SD, i.e., about 70$.
    I see two audio interfaces have been tested, and other might or might not function. I see configuration can be done injamulus_start.conf, alsa-jack patch configuration, andjackdrc.conf . Can you briefly describe what could be needed to have other interfaces working? And, last (at the time) question, is the regular video interface still available? (if I want to connect it to a screen). Thanks.

     
  • Kevin Doren

    Kevin Doren - 2020-11-24

    You can use the HDMI video interface (the one next to the USB-C jack). Monitor needs to be plugged in at boot time. USB mouse and keyboard can be used. We just didn't want to complicate the setup, as our target users already have a laptop or tablet they can use for the UI.

    Interfaces:

    Most likely to work without changes are 2-channel interfaces meant for recording (i.e. low latency and good power supply or filtering). Behringer UM2 gives a lot of bang for the buck. Focusrite 2i2 has been verified to work. Also Behringer UCA222 (but it doesn't have a mic preamp).

    I've tried using some really cheap (i.e. $10-$20) 6 and 7 channel, and little USB headphone + mic interfaces meant for laptops. Don't bother with these, because: (1) power supply filtering is very poor, so there is a lot of noise on the mic input, (2) latency is very bad, and (3) they have some odd internal switching setups that are painful to deal with (but may be settable by right-clicking on the speaker icon at the upper right, then "Output Device Settings").

    Interfaces with higher latency or different device ID might require changes to /etc/jackdrc.conf. This file is where you would change the default NPERIODS=5 to a higher number if you get audio crackling etc. I suggest leaving PERIOD set to 64 as this is needed to run with "small network buffers" enabled for lowest latency.

    Interfaces with more inputs or outputs might require patch changes, especially if using inputs other than 1 & 2. There is a desktop icon for the "Patchage" patch editor; you can run this after starting Jamulus, then drag and drop connection wires until you are happy with the result. Then you'll need to save the patch state, this is done from a command window using the "aj-snapshot" command, i.e. "aj-snapshot .config/aj-snapshot/snapshot-name.xml". Then you need to edit the file ".config/Jamulus/jamulus_start.conf" and change the setting to "AJ_SNAPSHOT=snapshot-name.xml" to use the new patch name when starting Jamulus.

    FYI I did try it with a Focusrite 18i20 and had problems (I think it was with feedback). But that is a much more complex interface with a lot of internal controls meant to be set by the Focusrite Control utility. I expect I could have made it work if I had put more time into it.

    -Kevin

     
    👍
    1
    • Vincenzo

      Vincenzo - 2020-11-24

      Thank you very much for the detailed answer. I have a USB mixer with two channels thus in principle it should work.

       
  • Kevin Doren

    Kevin Doren - 2020-11-26

    I've looked at some of the inexpensive USB mixers out there, even tried one. Problem is that they typically don't support the one thing Jamulus requires, which is to monitor only the playback from USB while sending only the inputs to USB. You don't want to listen to the local mix on the mixer, you want to send that to USB, while listening only to the audio from Jamulus. I think the more expensive USB mixers might have this option, but not the cheap ($50) ones.

     
    • Vincenzo

      Vincenzo - 2020-11-26

      this is a good observation. I use an Ammoon mixer (equivalent to Art Mix4), but I normally use the builtin output of my Mac. I will check - although my Rpi4 is already on the road :) (out of curiosity more than necessity...).

      EDIT: I can select it as output in the Mac sound preferences, should be ok.

       

      Last edit: Vincenzo 2020-11-26
  • Vincenzo

    Vincenzo - 2020-11-27

    Ok, the RPi arrived before the date, I installed everything according to instructions without issues, except that... the USB mixer seems not recognised: repeatedly "ALSA device not available. PLAY_RESULT:1 . RECORD_RESULT:1". I am not particularly expert on hardware, so I do not really know how to start debugging. lsusb and usb-devices seem not to find it; alsamixer lets me choose a bcm2835 card (not sure is the mixer, nor what to do after). Do you have some suggestion? Thanks.

     
  • Kevin Doren

    Kevin Doren - 2020-11-28

    bcm2835 is the Raspberry PI internal audio chip, it's not what you want.
    If alsamixer does not show an option for your mixer, your mixer might not be supported by linux.
    Of course you should double-check the USB cable and connections (I think your mixer likely needs to use the square USB "B" connector).
    you can also list devices with "arecord -l" and "aplay -l".

     
    • Vincenzo

      Vincenzo - 2020-11-28

      ok, both aplay and arecord do not show it. It is described as linux compatible, by the way. Cable is okay, is the one I normally use with my mac. I am not in a hurry - I may end up buying a UM2 or UMC22 interface, in case.

       
  • Vincenzo

    Vincenzo - 2020-12-05

    An UM2 arrived (thanks to recent discounts), but it seems not recognised too. The power light is even not on (while on the mixer it is). I tried inserting USB drives, but nothing can be seen either with lsusb or lsblk. So, likely the issue is with the RPi (or the power supply too weak, but USB drives do not need much). EDIT: I tested with an iPad power supply + USB-C cable, and did not change.

     

    Last edit: Vincenzo 2020-12-05
  • Kevin Doren

    Kevin Doren - 2020-12-05

    if lsusb doesn't show anything (nothing at all?) then there is likely something wrong with your Raspberry Pi. If it at least shows the root hub devices, you've probably already done this, but try the other USB connectors (I suggest a reboot after USB changes). This won't likely help, but you could also try re-flashing the OS image to be certain nothing got corrupted while trying to get your USB mixer working.

    Here is some general info on Raspberry Pi USB which may be useful:
    https://www.raspberrypi.org/documentation/hardware/raspberrypi/usb/README.md

     
    • Vincenzo

      Vincenzo - 2020-12-05

      The root hub device appears, but not any other device in any of the 4 ports. I could re-flash. Looking for info I found different reports of failing USB, however mostly associated with Ubuntu.

       
  • David Sloan

    David Sloan - 2020-12-06

    Just loaded on my raspberry pi and it works great. I have several interfaces such as Prosonus and M-audio and Yamaha mixer. One thing that I did notice that gave me the same results as above is that you probably have to plug into the USB 2.0 plugs = 2 and you may need a powered hub preferably USB 2.0 as there is not much power left for the device especially if you enable the 48v for a microphone or if you do like me - have a cooling fan and crank the CPU to 2.0 Ghz. My suggestion is to put the mouse and keyboard dongle in the USB 3.0 slots. The sound device you plugin should be set as the default by the system and as long as it runs 64 or 2.6 ms everything should be Ok. Otherwise find jackctl in the menu and go into settings then adjust and save.

     

    Last edit: David Sloan 2020-12-06
  • David Sloan

    David Sloan - 2020-12-06

    Just one quick question. After running an update directly off the pi everything worked great on reboot except - when I attached to the pi from chrome and shut Jamulus down then on trying to reload Jamulus from the icon the run / run in terminal mode gave the message xterm no such file or directory comes up. Is there an easy command to fix this?

     
  • Kevin Doren

    Kevin Doren - 2020-12-06

    By "running an update directly off the pi", do you mean "sudo apt-get upgrade"? I tried that and had no issues.

    Where in the startup script did it fail? What was last message before error? any indication what file was not found?

    "find jackctl in the menu": I think I kept qjackctl out of the menu; for patch changes I think Patchage (desktop icon) is much easier to use (then save with aj-snapshot as described in one of my posts above). For settings changes, see the README.md file in github: https://github.com/kdoren/jambox-pi-gen

    Individual jack clients can write directly to the executable file /etc/jackdrc (this strikes me as an awful idea).

    Making changes with qjackctl might have caused trouble, because it may have overwritten /etc/jackdrc. I use a custom /etc/jackrdc that pulls in settings from /etc/jackdrc.conf and supplies defaults. It should look like this:
    https://github.com/kdoren/jambox-pi-gen/blob/jambox/stage3/06-install-jamulus/files/jackdrc

     
  • David Sloan

    David Sloan - 2020-12-07

    Yes the upgrade command. As I said the xterm not found when I hit the execute in command line after it asks me execute or execute command line or open. This question comes up after double clicking on the Jamulus icon.
    Your right about jackctl - I normally use it just to make sure everything connected properly when I plugged in the USB device. In other linux boxes the value does not end up at 64. It is good to explain to me how this works = I am not a Linux person.
    Anyway I just created a Jamulus icon which appears to restart the program with all previous settings intact. Tell me if I am missing something = I called it Restart Jamulus = straight to the executable.

     
  • Kevin Doren

    Kevin Doren - 2020-12-07

    My image is designed run Jamulus with settings controlled by conf files specified in the README.me document. Which includes the alsa device, jack settings, and the patches. It is not intended or expected that the user should run qjackctl (I left it installed - maybe a bad idea - but removed it from the menu).

    My jamulus_start.sh script does a number of things to automate the jamulus launch, by setting environment & jack in the desired state (from conf files), optionally connecting to a server, and optionally shutting down after a timeout. It also starts aj_snapshot as a background process to set the patches after jamulus starts. Code is here: https://github.com/kdoren/jambox-pi-gen/blob/jambox/stage3/06-install-jamulus/files/jamulus_start.sh

    Your icon, which simply launches Jamulus, requires that patches and levels be set up elsewhere, which is what I was trying to avoid (the target audience being non-technical musicians). If you are the end user and you want to do that, go right ahead. However if you are setting up systems up for non-technical users, I suggest you re-flash a new card and try to use the conf files to make config changes, as described in the README.md: https://github.com/kdoren/jambox-pi-gen/blob/jambox/README.md. I believe it's OK to run apt-get upgrade (it worked for me), but the image was built from latest packages only 2 weeks ago so that's not really necessary. You also shouldn't need to overclock, Pi 4 easily performs well enough for this application.

    The reason for using PERIOD=64 is that you can get lower jamulus delay if you do that. If your jamulus server is running the --fastupdate option, any clients have "small network buffers" enabled and also PERIOD=64 will get less delay. This comes at the expense of higher bandwidth, but for our use case it is worth it. You can disable small network buffers on any client that doesn't want this. But if you set PERIOD=128, you won't have the option,; you can check the "small network buffers" box, but it won't do anything.

     
  • David Sloan

    David Sloan - 2020-12-07

    Yes what you said makes perfect sense and I did just what you said because it was the quickest way back to a working system. My intent was to us the raspberry pie as just a box for the Jamulus client so that my main computer could be used for Zoom and music sheets and generating backup tracks to fill in for missing parts. Your system is the best solution. Excuse me for my tinkering habits - you definitely have a great solution for many problems including the ease of creating a new SD.

     
  • David Sloan

    David Sloan - 2020-12-08

    Do you know if anybody is planning/making a packaged system similar to yours for the PI 400. Would it be possible for a person familiar with Linux to add in features such as Zoom without impacting on the Jamulus performance. Just looking at the dual hdmi and upgraded Chrome - or is this a different OS running this device.

     
    • Bryan Flamig

      Bryan Flamig - 2020-12-11

      David: I have a ready-made solution for the Rpi400. See the github site https://github.com/bflamig/RpiJam400

      I had just posted that solution on the hardware forums of this SourceForge site when I noticed this thread.

      My RpiJam400 github site has a pre-configured SD card image, as well as scripts to install Jamulus on an already existing Raspberry installation.

      The pre-configured SD card image is built on the latest Raspian OS image. Do note that I have experimented with running versions of Raspberry Pi OS with run-time kernels and in my experience it makes no difference, or at least isn't worth the trouble. The stock OS works just fine for Jamulus.

      I have used Jamulus with many models of the Raspberry Pi: the 3B +, 4 with 2/GB, 4 with 4/GB, 4 with 8/GB and the 400. They all can work fine. Note that the image I provide was built for the 400. It probably wouldn't work well with the other Pi's, though I haven't tried it. The script files also included on the git hub site will work with all Pi's.

      My solution simply relies on the Jack settings coming from a .jackdrc file in your home directory, instead of the more global /etc location.

       
  • Kevin Doren

    Kevin Doren - 2020-12-08

    We run the Pi headless, for UI we use any browser running on a laptop or tablet. Then run Zoom on laptop or tablet (with mic muted) to get video so people can see each other for a more personal experience. I personally use an iPad running safari for Jamulus UI, and Zoom app on iPad.

    You could if you wanted hook up monitor, keyboard, mouse and camera to the Raspberry Pi, and install Zoom app in the Chromium browser. I think this might work, because Jamulus & jack run at high priority. Chromium/Zoom will get what is left, which is plenty - the Pi 4 is coasting running Jamulus.

    However that does add to the complexity. Our target users all have laptops or tablets which run Zoom and browser. This simplifies the setup, keeps Jamulus isolated on a standardized Raspberry Pi configuration, and leverages what they already have and know.

    Also, I'm not planning to try to sell a packaged system. I might if I thought it was a good business, but I don't think it is, which is why I am open-sourcing it.

    The Jacktrip foundation is selling a Raspberry Pi with an audio card, I think for around $200. I am sure it could also run Jamulus. But it's not hard to assemble a Raspberry Pi and plug in a USB audio interface for less than that (see my github README.md for bill of materials.)

     

    Last edit: Kevin Doren 2020-12-08
1 2 3 4 > >> (Page 1 of 4)