A Jamulus layer for a confined world?

I was doing some research and also reviewing jamulus integration PRs.
As you say, @riban, we need Jamulus running as an “engine” (an audio generator), so we can control jamulus mixer using CC, like explained here:

https://jamulus.io/kb/2022/02/01/Midi-Mixerboard-Control.html

I envision the engine having:

  • 1 controller screen for client parameters: mute-me, pan, reverb
  • 1 controller screen per connected musician, including “me” : fader, mute, solo, group

Regarding the client init options (aka, server URL) , it could be managed via the bank/preset mechanism.

@jwoillez , i’m sorry for the delay. Ii really like the concept of Jamulus and it fit zynthian 100%. I’m quite sure it will improve until reaching an acceptable performance. Would you like to improve your integration by implementing a proper zynthian engine?

I could run a “zynthian jamulus server” so community member can join for jamming at anytime, and yes, for sure, we would connect the PD “generative relax” when nobody is connected!!! :grin:

Regards,

2 Likes

Ha ha! I was inside your head again @jofemodo - I looked at Jamulus at the weekend too and saw the later release introduces JSON-RPC API so we may have more remote control of a headless client.

1 Like

But then no one would hear it!!!

The MIDI CC control is suboptimal for Zynthian integration. It uses toggle mode and does not provide feedback so Zynthian cannot know if it’s state is in step/sync with jamulus. I think we would need to use the API.

Unfortunately the API doesn’t seem to support control and monitoring of the parameters we need such as fast, mute, etc. So it will be challenging to implement a reliable engine. Maybe the jamulus developer can add the API calls we need?

Oy you two!!

Yes, you know who you are…

Back to the stable release !!!

1 Like

image

And you @riban minor !

One hundred lines . . .

The-Shining-008

I have opened a discussion (equivalent to a feature request) on the jamulus site. Let’s see if something happens upstream to facilitate its integration in Zynthian (which I would really like).

1 Like

This is the point!! :grin: Anyway, i would note there are a lot of IAs listening the network, so perhaps there is “some one” listening. Machines listening music made by machines, yesss :thinking:

Generative Relax reminds me of the sounds played in a spa in Brighton on the south coast of England. Plinky plonky sounds designed to relax for a while then make you want to leave :smile: :sweat_drops:

Like counting bots as a website visitors :joy:

Sounds like the perfect use case for euclidean and turing music.

2 Likes

That will please @riban. He’s a big fan.

And another thing… jamulus only works at 48000 samples per second but may users run there Zynthian at different sample rate, e.g. its default 44100.

@jofemodo Very sorry about the late answer. Confinements are behind us, and the need to play remotely is not as present as before. I am not sure I can commit to working on a Jamulus integration. As you may have seen, I have another zynthian project that I would prefer to tackle first.

2 Likes

We are less confined but have some interesting learned behaviour. Some of us prefer the reduction in physical intamacy that working from home provides so I still think this subject is worthy of discussion. Even without an aversion to seeing other people (IRL) there are many advantages to online music sessions which include:

  • Rehearsal without the logistics of transporting self and equipment to and from studio space
  • Colabrative composition
  • Working on structures of musical pieces - this may not require simultanous playing and synchonisation
  • Social interaction including club nights ((similar to Zynthclub but with ability to jam), remote ceilidh or similar party, product demonstration, etc.

To that end I have done some work to more fully integrate Jamuls into Zynthian and would like help to test it. There is a development branch based on the 64-bit Oram (testing) branch called feature/jamulus that provides substantial integration. (zynthian-ui, zynthian-sys & zynthian-data repos need selecting.) There are missing elements, most notably an inablitiy to join public sessions. (I have raised the subject in the previously mentioned discussion on the Jamulus site.) This will require someone to write code to enable the feature, either within Jamulus (my preferred solution) or within Zynthian / as a standalone process (more challenging).

Here is a brief description of the Zynthian integration:

The plugin is available as a Special Engine. (I am not sure which catagory to place it.) It is added to a new chain. You can only have one instance of Jamulus, i.e. it only appears in the list of engines if it is not already in a chain.
Servers (jam sessions) are presented as Zynthian presets. By default there is only one preset which connects to a Jamulus session running on the same Zynthian. Presets can by downloaded / uploaded using webconf LIBRARY->Presets & Soundfonts and are in the form of a simple key=value text file:

uid=some unique identifier for the preset
url=server hostname:port
name=Name that appears in preset list

The control view for Zynthian Jamulus processor has several pages of controls and a GUI widget. The first page of controls inclues:

  • Connect - Connect to or disconnect from the currently selected Jamulus session
  • Mute Self - Mutes audio from Zynthian reaching the Jamulus session
  • Local Server - Starts and stops a Jamulus server on the Zynthian

When connected to a session, there will be a page of controls for each musician connected to the session. There will also be a channel strip for each musician shown in the GUI widget. These controls set your local monitoring mix of the session, i.e. allow you to balance how you hear each musician without affecting anyone else’s monitoring. The parameters are:

  • Fader - Adjust channel level
  • Pan - Position channel in stereo mix
  • Mute - Mute this channel
  • Solo - Mute all non-selected channels

There is also a scribble strip showing the name of the musician (as they have set in their client) and an audio level meter.


The screen reacts to touch, e.g. drag fader / pan or tap mute / solo.
The last received chat message is displayed near the top of the screen, scrolling as necessary.

There is an indication in the top right (grey/green) to show if the local server is running. (Useful if you are not on the first controller page.)

If the Zynthian has VNC enabled then the native Jamulus GUI is shown in on the VNC desktop (engines). Full control is possible including some extra configuartion and joining public sessions but control is unidirectional. Any changes made in the naitive GUI may not be reflected in Zynthian integration. There are also some parameters that are set by Zynthian when starting Jamulus which will overwrite settings made in the naitive GUI.

The Jamulus user’s name is set to the Zynthian’s hostname. This can be changed with webconf SYSTEM->Security / Access. I feel this is suboptimal. I would prefer to have a separate user name and machine name. We can discuss this.

My recent testing has provided these insights:

To set up a local private server you need to expose / forward UDP port 22124 from your Interent router to Zynthian.

Latency can be high, especially as distance between users increases, e.g. the round-trip latency between me and @wyleu is appox. 60ms with a physical distance of approx. 350km. This needs some consideration of how best to configure and play.

Use of headphones and microphone (ideally a headset combining boom mic) is strongly recommended.

Listen to the Jamulus output in preference to the local direct feed but adding local direct feed to the local mix can help to cope with latency.

With Oram we have the ability to create audio only channels and route audio chains to each other using the chain options (bold press SELECT on a chain). You can also rename chains from the same menu which can improve this workflow considerably.

I would recommend:

  • Add a Jamulus chain
  • Disconnect Jamulus chain inputs. Leave output routed to Main Mixbus
  • Add an audio chain with no processor to act as a group fader (this is required due to a fault in audio mixer I need to fix soon)
  • Add a chain for each instrument you wish to play, including seperate audio channels for mic, guitar, etc.
  • Route each chain’s audio inputs as required, e.g. Mic from input 1, Guitar from input 2, etc.
  • Route each chain’s audio outputs to Jamulus and group chains. Unroute from main mixbus

This will give a set of chains that you can mix to suit your performance that feed directly into Jamulus. You also have two faders to adjust your own monitoring feed: Jamulus session and local direct mix via the group fader.

You can then join a Jamulus session and adjust the session member’s levels in the Jamulus chain control view. I highly recommend muting yourself before joining a session to avoid any unexpected behaviour, especially if joining a public session.

We have more to do and testing will be important so, I would like to arrange some sessions to validate and refine the workflows, improve the implementation and have fun. These may be jamming sessions, composition sessions, technical demonstration, etc.

In summary - I think we have a fantastic tool that when used correctly could be of great benefit to the Zynthian community and beyond but it needs testing and refining so let’s all help.

9 Likes

How dare you call me a musician…

1 Like

I noticed when doing a Zynthian Oram software update today some Jamulus things being installed. Does this mean I can stay on the Oram branch and try it?

Hi @tunagenes!

No! We added a patched version of Jamulus to the zynthian repo which facilitates some of the integration but the actual integration is done in the feature/jamulus development branches. The patches to jamulus have been submitted upstream as a PR which is undergoing review. It is likely to change before being merged upstream so we may change our integration to match upstream if / when there is a release with these enhancements to its JSON-RPC interface.

I did push changes to the development branches yesterday which provide better integration including:

  • Access to public servers using the default Jamulus directories
  • User presets (servers) in banks - must currently upload presets using webconf

We don’t currently plan to merge this development into Oram. We want to concentrate on stabalising Oram for release without extra features so I anticipate Jamulus support to be in the following release.

1 Like