FrancescoCeruti / linux-show-player

Linux Show Player - Cue player designed for stage productions
https://linux-show-player.org
GNU General Public License v3.0
205 stars 49 forks source link

Multi-channel/device sound #37

Closed macdroid53 closed 6 years ago

macdroid53 commented 8 years ago

Looking at the Qlab screenshot in issue #36 brought to mind a question:

Is is possible to select sound device channels or multiple sound devices.

I'm thinking of a venue that has 5.1 capabilities and wants to send a sound to right rear for some reason.

Or, to a speaker hidden under a set piece so the sound is localized to a particular spot on stage, for example a phone or radio on stage.

FrancescoCeruti commented 8 years ago

Unfortunately, AFAIK, GStreamer is a bit limited on this side, unless you write some custom output plugin. The solution is to use JACK, so the answer is yes, if you use the jack-sink and (obviously) a jack server, then, you can manage multi-channel/multi-device, only limitation the LiSP jack-ports are created only when the cue is started (I'm unable to change this behavior).

nodiscc commented 8 years ago

I have tested multichannel output with JACK and came to the same conclusion: LiSP's JACK output channels only stay open as long as the cue is playing. When it stops they are removed. Which is a problem since JACK routing is not restored the next time you play the cue.

cap

@FrancescoCeruti is it possible to open a JACK sink as soon as a media cue is created and assigned to jack out, and leave it open?

macdroid53 commented 8 years ago

That's standard gstreamer behavior, right?

I think there is a way to define which jack port is used as the default connection for gstreamer...but have not figured that out yet. :(

FrancescoCeruti commented 8 years ago

the LiSP out -> Some input-port can be edited in the jack-sink settings, those are restored, if you edit them in qtjackctl you lose the changes, unfortunately GStreamer doesn't keep the ports alive so I need to use a control client to edit/restore the connections before the stream is played.

macdroid53 commented 8 years ago

I think there is a system setting that tells gstreamer to look for a particular port, if that is not set, it will connect to the default out (typically, playback 1/2).

If you edit the jack-sink settings in a cue, that would need to be set for every cue a particular sink was desired, correct?

FrancescoCeruti commented 8 years ago

By default I left all the port disconnected, this option is provided by GStreamer, then LiSP manage the sink connections using a JACK "control client", the default ports are indeed the playback, or whatever is found under "system" in JACK, and all the available media channels are connected 1-1, 2-2, ..., 8-8.

Yes you need to edit all the cues, this can be done using multi-editing, the jack sink must already be in use in the cues, but you can change the default output plugin (for new cues) in the gstreamer settings.

FrancescoCeruti commented 8 years ago

by the way, I've seen your question on linux-audio mailing list, I'm aware of the port-pattern property but since I need a client to query the inputs ports for the "pattern" editing I've decided to do the connection myself

macdroid53 commented 8 years ago

I understand.

But, somewhere over the past few years I figured out how to do this for another situation.

And it is documented for gstreamer 0.01 on the JACK Audio web site.

But, it seems to have gone missing for gs 1.0, 16.04, and the switch to dconf.

Mac

On Tue, Aug 23, 2016 at 11:53 AM, Francesco Ceruti <notifications@github.com

wrote:

by the way, I've seen your question in linux-audio, I'm aware of the port-pattern property but since I need a client to query the inputs ports for the "pattern" editing I've decided to do the connection myself

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FrancescoCeruti/linux-show-player/issues/37#issuecomment-241780900, or mute the thread https://github.com/notifications/unsubscribe-auth/AGg-iEK_eb3kZIgDffHrPe9FUy3mPE5cks5qixdigaJpZM4Jq54c .

FrancescoCeruti commented 8 years ago

I've take a look at the gstjackaudiosink code, the auto-connection is done in 2 possible ways:

  1. port-pattern is not set: query JACK for all the physical and input ports line 461
  2. port-pattern is provided: query JACK for the ports that respect the pattern line 465

Then it go through the N stream channels and connect them to a n port, if possible. line 476

There is no evidence of possible way to influence the connections other then port-pattern, to solve your problem we need to find a way to configure port-pattern system-wide, and even in this case currently you cannot alter the LiSP jackaudiosink connection because the auto-connection is disabled by the application code.

macdroid53 commented 8 years ago

Playing around with the latest LISP. (please note, this is not a complaint. Being able to connect like this is great!)

My jack is setup as follows:

jack_setup

When I add a cue in LISP it defaults to JACK, but have to set the connection for each new cue:

lisp-jack

Is there a way to set the default connection?

Also, if this can't be changed globally, moving from one venue to another could be annoying.

macdroid53 commented 8 years ago

Sorry, hit the wrong button.

FrancescoCeruti commented 8 years ago

Currently the only way is to select all the media cues and then multi-edit them. I'll try to have a global settings option for the jack-sink in the 0.4.1, anyway probably there will be at least one other release for the 0.4.x cycle ;)

macdroid53 commented 8 years ago

Multi-edit is fine...hmm, well, it would be nice have a select "all media cues", since a show with 100 cues would have action cues mixed in. Selecting (as in ctrl-left click each of the desired cues) one at a time to multi-edit could be error prone and tedious.

FrancescoCeruti commented 8 years ago

Multi-edit is fine...hmm, well, it would be nice have a select "all media cues", since a show with 100 cues would have action cues mixed in. Selecting (as in ctrl-left click each of the desired cues) one at a time to multi-edit could be error prone and tedious.

Done :) take a look at the last commit, you can find it in the Edit menu.