Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnect to Midi input (and output?) ports #204

Open
zigmhount opened this issue May 6, 2020 · 10 comments
Open

Reconnect to Midi input (and output?) ports #204

zigmhount opened this issue May 6, 2020 · 10 comments

Comments

@zigmhount
Copy link

zigmhount commented May 6, 2020

Hello,

I've been having this issue for a while, but I was not sure whether it was due to how I was handling things, till today, so here goes (might be linked to #183 ):
These days I usually use RaySession (based on NSM) to manage my sessions, where the session usually contains Carla or Ardour, a bunch of plugins in those, 1 or 2 mididings scripts and a few jack_mixers when using Carla.
To this I connect 0 to 3 MIDI devices (keyboards and control surface). I've been playing around with seq64's [manual-alsa-ports] and [reveal-alsa-ports] settings to figure out if any combination might work out as I expect, and I usually keep

[manual-alsa-ports]
0
[reveal-alsa-ports]
0

since I use the native Jack setup, which displays (as expected) the names of the ports as detected by Jack.
My problem is that the MIDI connections with Seq64 when I reopen the session are (almost) always messed up.

Most of the time, I've supposed that it depends on the sequence in which I launch the applications: if Seq64 is launched at the same time as Carla or Ardour, Seq64 obviously opens much faster, and all MIDI ports popping up from the tracks and plugins are not auto-detected because they don't exist yet. So I close Seq64 (most likely overwriting the RC file's input/output settings) and reopen, the ports are back, but the connections are lost or messed up (input ports are almost always lost, even when I use a MIDI through plugin to make sure I don't change the connections to Seq64 whether or not I plug my actual MIDI devices).
I guess that it may be due to the fact that Seq64 "remembers" the port to connect based on their ID, rather than their name, so if applications are not started in the same order or MIDI devices not plugged in the same order, the ports may not get the same ID, and connections are subsequently incorrect. Does this make sense? If yes, would it be doable to reconnect based on the port's name?

Today however, I was very careful to not open Seq64 before Ardour, which contains MIDI busses for my devices and MIDI busses for the sequences' synths, so that connections can be restored properly, but it seems that my 2 input ports where still inversed!

So I'm wondering a bit how you use this and whether I do it wrong...

Using [reveal-alsa-ports]=1 or the ones hardcoded in the USR file ([manual-alsa-ports]=1) might work, but then it limits the number of output ports to 16, which may in some cases not be sufficient for my instruments/synths (I could of course use channels and/or instruments for each port, but I'm very reluctant so far because it makes it much more difficult to monitor what goes where and I may have to add plugins to filter the channels to dispatch between the synths... but I'm relatively new to this so it may be the way it should be done?).

What do you think?
I'd be curious to know more about your setup as well if you can share :)

I'm using 0.96.8 from the midi_control branch btw.
And while I'm at it (but maybe I should open another ticket for that), is there any hope for the future to have the RC and USR files in any folder, e.g. a project or session's folder, rather than always in .config/sequencer64?

Thanks!

@Houston4444
Copy link

Hi.
As RaySession dev, I must say that the sequencer64 behavior with jack-midi makes it complex to use in a session manager.

When JACK-midi is choose, it should not create midi ports according to which one is connected. It should just have one midi entry port (or more if needed) and let user connect the hardware or software midi ports (s)he wants. This does not prevent to let the user choose the midi hardware connected in the preferences dialog, It changes just the behavior. Of course, the program could save the connections in the config file or elsewhere.

But, now, if user has set a carla midi output as midi input in sequencer64, when they are launched together in the session, seq64 will be ready before carla and won't see its ports. So, user has to stop and restart sequencer64 to get it correctly connected.

And, it's a small detail, but, a new behavior will prevent to have midi ports will very long names in JACK patch bays (Catia, QJackCtl).

@ahlstromcj
Copy link
Owner

ahlstromcj commented Oct 14, 2020 via email

@Houston4444
Copy link

Argument -m works well, thanks !
I changed the sequencer64 RaySession template to be launched with this argument.
Do you plan to implement NSM support ?

@ahlstromcj
Copy link
Owner

ahlstromcj commented Oct 14, 2020 via email

@ahlstromcj
Copy link
Owner

ahlstromcj commented Oct 26, 2020 via email

@Houston4444
Copy link

Hi.
I tried the nsm branch of qseq66, unfortunately NSM support seems to not work with the simple make method, and I was discouraged by the length of the complex make instructions, I'll give it a new try, sorry for that !

Normally, the client <=> server communication is the same in RaySession than in NSM, it uses the same messages. Given values can be different, and reply time too.

I don't see any attached screenshot in your previous message. You forgot something ?

@Houston4444
Copy link

I don't arrive to build qseq66 with NSM support. When I type ./bootstrap --enable-nsm, it gives me
? Unsupported bootstrap option; --help for more information

@ahlstromcj
Copy link
Owner

ahlstromcj commented Oct 27, 2020 via email

@Houston4444
Copy link

To explain further about the messaging, qseq66 first looks for the NSM URL,
then it sends a client-announce message. qseq66 then uses the announce-reply
to populates the capabilities and session-manager name strings. Then NSM sends
the client-open message with the rest of the session information. Finally, once
the main window is created, the Session tab is populated with the NSM path,
Client ID, etc. obtained from nsmd.

Yes, like all nsm clients does. I don't see why it could not work with raysession at this stage.

@Houston4444
Copy link

Houston4444 commented Oct 27, 2020

making this (on nsm branch):

    $ ./bootstrap --full-clean
    $ ./bootstrap -er
    $ make &> make.log

I don't see any NSM support nor with new-session-manager, nor with raysession.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants