zynthian / zynthian-issue-tracking

Centralized Issue Tracking for Zynthian Project
https://github.com/orgs/zynthian/projects/1
11 stars 3 forks source link

Add Jamulus support #411

Open jwoillez opened 3 years ago

jwoillez commented 3 years ago

I promised a long time ago to share my Jamulus (https://jamulus.io) setup for Zynthian. Jamulus let you play with others across the internet. Configure your server in the web interface, plug your instrument, check your ADC levels, start Jamulus from the admin menu, and you are good to go. Use the Jamulus software one your computer (muted and with headsets) to check that the connection goes through properly.

At the moment, one has to install_jamulus.sh by hand, with the provided recipe. I haven'f found how to make this step automatic.

Note that Jack needs to be configured for 48kHz operation (Jackd option: -r 48000), this is a requirement of the OPUS audio codec used by Jamulus. Also, a slightly lower latency setting is recommended (Jackd option: -p 128).

To try it out:

  1. Configure zynthian-sys, zynthian-ui, zynthian-webconf to use my jwoillez/jamulus branch.
  2. Install Jamulus with /zynthian/zynthian-sys/scripts/recipes/install_jamulus.sh.
  3. Run a local Jamulus server on one of your computers, note its IP address.
  4. In Hardware > Audio > Jamulus Options, replace your_favorite_jamulus_address by the IP address of your server.
  5. Start Jamulus from the Admin menu of your Zynthian.
  6. You should be connected, you can check that this is the case on your server GUI.

See the following three PRs:

Suggestions:

riban-bw commented 3 years ago

Modify /zynthian/zynthian-sys/scripts/recipes.update.buster/00_install_packages.sh to run the install script.

riban-bw commented 3 years ago

Will you give an example of how to connect to a server? I guess you add to the webconf HARDWARE->Audio Jamulus Options something like: -n -j -c hostname:port.

jwoillez commented 3 years ago

@riban-bw Where is the best location to give an example? Should I update the Wiki, or should I add this here in the ticket description?

Note: If you give it a spin, do not pass -j, otherwise Jamulus does not connect to the IN/OUT ports. Would be nice to also have the Jamulus ports available in MOD-UI.

riban-bw commented 3 years ago

Put example here so that we can test it out. If the PR is accepted and merged then the wiki can be updated. (Note: We are considering how we update the wiki to reflect testing/stable branches).

It would be advantageous to display "Zynthian" (or a user defined name) to the server and also name in other clients. I can't see that as a command line option (only --clientname which doesn't do this).

Zynthian autorouter should be updated to route Jamulus otherwise we may end up with unexpeted automatic routing.

jwoillez commented 3 years ago

I pushed a few changes to create and handle /root/Jamulus.ini where, among other things, the name of the client is configured. At the moment, it uses Raspi zynthian. I also added are reminder in webconf to specify the server address. It looks like Jamulus options: -n -i /root/Jamulus.ini -c your_favorite_jamulus_address.

The easiest way to test things is to run your own Jamulus server and use its local/public IP address. I updated the instruction in the ticket description.

riban-bw commented 3 years ago

I made these comments in the PR but will repeat here in case followers don't see them.

I suggest losing "Raspi " from the name. It adds unnecessary / unexpected / unwanted text to the name. Default configuration file is .config/Jamulus/Jamulus.ini which is created and updated when Jamulus stops running. I suggest using this and not providing the explicit ini file in the command line parameters. It would be advantageous to update the configuration when the hostname changes. This may require a hook into the webconf security page where this is set or update the ini at launch.

It is shaping up quite well although I am yet to actually test it end-to-end. I have it working here on my LAN but not done any actual audio tests.

riban-bw commented 3 years ago

Pressing "Save" on the webconf HARDWARE->Audio page flags a reboot is required which is true for changes to jackd but shouldn't be required for changes to Jamulus config. I recommend checking what has changed on the page (which might prove challenging).

The -n flag is not needed with this version because you compile it without GUI support. I wonder if we should compile with GUI support and show the GUI if VNC is enabled?

jwoillez commented 3 years ago

@riban-bw Thanks for all the feedback and trying it out at ZynthClub. I am adding an investigation of Jamulus MIDI control. See https://jamulus.io/de/wiki/Tips-Tricks-More, section "Using ctrlmidich for MIDI controllers".

riban-bw commented 4 months ago

This issue has been superceded by work to fully integrate jamulus in the feature/jamulus dev branch. This is fully working and ready for test.

riban-bw commented 2 months ago

Is it worth adding this to Oram pre-release or would @jofemodo prefer to wait until after we release Oram?