jamulussoftware / jamulus

Jamulus enables musicians to perform real-time jam sessions over the internet.
https://jamulus.io
Other
997 stars 222 forks source link

Setting Monitor Mix for Headless Client #590

Closed chigkim closed 3 years ago

chigkim commented 4 years ago

I'm trying to permanently sit a headless Linux client on a server as a streamer, and let the client stream what it hears to somewhere else using Jacktrip. However, what's coming out of Jamulus can get pretty hot and clipping. There doesn't seem to be a way to set the faders in the monitor mix for the client. Setting newclientlevel to 50 in .ini file doesn't seem to work. However, this works if I use client with UI, but not headless client. Also, I'm interested to know how to mute the channel for the client itself in the monitor mix as well, so the client doesn't hear what it transmits to the server. Thanks!

corrados commented 4 years ago

You have the possibility to set the mixer fader levels in headless client mode using MIDI (see here https://github.com/corrados/jamulus/issues/95 and here https://github.com/corrados/jamulus/wiki/Tips,-Tricks-&-More (Using the --ctrlmidich MIDI controller channel option))

chigkim commented 4 years ago

Thanks for letting me know.

Does this work for future faders as well? In other words, for people who have not joined the server yet.

If I set cc 70-127 to value 100, would that pretty much work like setting the newclientlevel for next future 57 faders? Or, it only works for the currently joined faders?

If it only works for the currently joined faders, it won't work for the case where you just sit a headless client permanently. Every time new one joins, you have to manually set it.

Also, is self fader always cc 70, or does it change?

Lastly, if you have multiple midi devices, how do I tell Jamulus to listen to a specific midi device?

Thanks again!

ignotus666 commented 4 years ago

Does this work for future faders as well? In other words, for people who have not joined the server yet.

Yes. The first fader (from left to right) reacts to cc 70, the second to cc 71, etc. BUT, it will not pre-set the fader levels for anyone, you'd need the 'New Client Level' setting to work for that. It just allows you to adjust fader levels of clients after they have connected. And in headless mode, AFAIK you don't really have a way to know whose fader you're moving unless you monitor what order they joined in. BTW, is there a command line option to set New Client Level? If so it needs to be added to the wiki.

Also, is self fader always cc 70, or does it change?

If you join first, then yes.

Lastly, if you have multiple midi devices, how do I tell Jamulus to listen to a specific midi device?

There are command line options to make connections in Jack (or else use the QjackCtl GUI, create a patchbay and then call it from the command line). You'll need to install a2jmidid.

chigkim commented 4 years ago

BTW, is there a command line option to set New Client Level? If so it needs to be added to the wiki.

If there's a such thing, this will solve my problem! If anyone knows, please let me know!

WolfganP commented 4 years ago

BTW, is there a command line option to set New Client Level? If so it needs to be added to the If there's a such thing, this will solve my problem! If anyone knows, please let me know!

You probably need to massage the ini file for that, entry: <newclientlevel>100</newclientlevel>

chigkim commented 4 years ago

You probably need to massage the ini file for that, entry: <newclientlevel>100</newclientlevel>

Yea, I tried that including deleting all <stored..> ones, but headless client seem to ignore newclientlevel. As I wrote in the first post, it works if I makes the exactly same modification to .ini file for the client with GUI.

WolfganP commented 4 years ago

You probably need to massage the ini file for that, entry: <newclientlevel>100</newclientlevel>

Yea, I tried that including deleting all <stored..> ones, but headless client seem to ignore newclientlevel. As I wrote in the first post, it works if I makes the exactly same modification to .ini file for the client with GUI.

https://github.com/corrados/jamulus/pull/570 I think it will be included in the next planned client release (in case you don't build it in your own).

chigkim commented 4 years ago

570 I think it will be included in the next planned client release (in case you don't build it in your own).

That's awesome! Does that mean if I build the latest master branch, headless will utilize .ini file, and I should be able to set newclientlevel as well as muting self monitor?

corrados commented 4 years ago

Unfortunately, the new client level will not work in headless mode since the audio mixer board is not present in the headless mode and this manages all the solo/mute/newclientlevel stuff.

chigkim commented 4 years ago

Thanks @corrados. Maybe I misunderstood @WolfganP comment about #570 then?

WolfganP commented 4 years ago

Thanks @corrados. Maybe I misunderstood @WolfganP comment about #570 then?

Not at all. I misunderstood the changes as well :-)

corrados commented 4 years ago

@chigkim I don't know your intended usecase but you may be interested in the following development: https://github.com/corrados/jamulus/issues/599. In that server mode the clients do not need a separate mix. So you do not need to adjust the levels for each of your headless clients separately.

chigkim commented 4 years ago

Thanks @corrados. Basically I'm trying to connect two servers, so people in both servers can play together. I managed to solve my problems with:

  1. Clipping

I sent headless client output to ecasound with hard limiter. Then I sent ecasound output to Jacktrip.

  1. Muting self monitor to avoid infinite feedback

I installed a2jmidid, created a python script to generate cc70 to 0, and connect the output of Python script to Jamulus midi input with Jack. At the end, I was able to achieve what I wanted, but the process was way more involved than I expected.

corrados commented 4 years ago

Yes, sounds complicated. Anyway, since you now have a solution, should we close this issue then?

chigkim commented 4 years ago

Or, can it stay open as a feature request to launch headless client with cli options to control self monitor fader and future faders of clients who join later? Just a thought.

gilgongo commented 3 years ago

@ignotus666 Does MIDI control cover this? Otherwise, is there something we can raise as a ticket?

ann0see commented 3 years ago

Does MIDI control cover this? Otherwise, is there something we can raise as a ticket?

Also tagging #945 and @dakhubgit here.

dakhubgit commented 3 years ago

MIDI control does not really cover it at the present time because it really needs quite a bit of GUI to work nicely. It does not support motorfeeders, so the current settings cannot percolate to the MIDI controller, and it does not request a scene send, so the settings from the MIDI controller only make it to Jamulus when you actually change a setting. The order of faders is essentially random and none of the sorting options help with that, so when you disconnect everybody and reconnect to a different server instance, the order is a completely new one each time (something like sorting by name does not help since the MIDI controllers are numbered in their own manner). Also Mute/Solo buttons are not yet supported in headless mode.

So basically MIDI controller mode has way to go before it becomes a really comfortable option for headless. Many of the shortcomings are relevant for GUI mode as well but you can compensate better for them once you see what you are doing.

gilgongo commented 3 years ago

@dakhubgit OK so the challenge is to see if we (you? someone?) can write up a spec for the work with an an agreed approach/UI (UI might be separate ticket) and such so that we can add that to the issues list so it can be worked on at some point.

Either way, it sounds like it needs more thought - so we should move it to a discussion until the above points have been worked up, is that OK?