#34 add emulator name to jack client name

closed
5
2010-04-30
2010-04-27
No

When several instances of Bristol are running, the first one's jack client name is 'bristol', with subsequent instances appearing as 'bristol-01', 'bristol-02', etc. which is the default behaviour for multiple jack clients of the same name.

It'd be handy (for me anyway) if the emulation name were appended to the jack client name, so I'd instead see (e.g.) bristol-mini, bristol-solina and so forth in qjackctl. I assume this wouldn't be too terribly difficult to do: if I get a few moments I might even try to implement it myself.

Colin.

Discussion

  • Andrew C

    Andrew C - 2010-04-27

    I could've sworn there was a command-line option in bristol to name the jack-clients?

    On a related note, doing the same for alsa/jack midi would be also welcome (they get named 128:Bristol 129:Bristol etc etc).

    Andrew.

     
  • Nick Copeland

    Nick Copeland - 2010-04-27

    Good, this is a bit better than the other response. The other request you sibmitted today is something I have known about but never fixed - the input signal buffer. This one appears to be something I do know about and should already be fixed: what version of bristol are you using since this is dependent, it has been there since 0.50.something.

    startBristol -mini -audiodev mini1 &
    startBristol -mini -audiodev mini2

    The audiodev string should be fead into the jack registration, it then appears:

    a. in the qjackclt connections tab
    b. in the synth title bar so that you can see which window is which jack connection.

    I did consider using the emulator name but then there are two issues that come along. One regarding what happens when you run the same emulator twice as in the above example. The second is that iif you add -engine to the second request you can get the Mini and Solina to run on the same engine:

    startBristol -mini -audiodev mini -jack &
    startBristol -solina -engine

    In the first example I did not use the '-jack' flag. You can build the code now with a flag called --enable-jack-default-audio to have it default along with ALSA for MIDI. Jack MIDI is not quite there at the moment: it works, but I don't think everybody uses the bridging daemon yet.

    Kind regards, nick

     
  • Nick Copeland

    Nick Copeland - 2010-04-27

    > On a related note, doing the same for alsa/jack midi would be also welcome

    This should be '-mididev mini' and '-mididev solina' for the ALSA drivers. The Jack midi device name is derived from its audio registration name now.

    Ah, jack used to be called bristol (audio) and bristolmt (midi), that was dropped when I collapsed the Jack midi registration back onto the audio device. Long story, it was for LADI support, it didn't like one process with two Jack clients. You can still get this functionality with -jdo if you want, I left the possibility there as it may solve a problem that I have not been told about yet.

    Kind regards, nick.

     
  • Colin Fletcher

    Colin Fletcher - 2010-04-27

    I'm using Bristol 0.60.1, but I didn't know the -audiodev parameter could be used for this. startBristol -h output mentions -audiodev, but only in the context of selecting the ALSA/oss device to use, not in conjunction with -jack.

    Using the emulation name by default shouldn't be a problem for the first case you mention, running two instances of the same emulator: I think jack_client_open() automatically appends the '-01', -02', etc. if you try to create a new client of the same name (unless you pass the JackUseExactName flag).

    I agree that the second case (of a single engine shared between multiple emulations) might prove confusing if the engine took its audiodev name from the first emulation started, though IMO it's maybe not so bad, since you have to explicitly pass -engine for this to happen. What about a simple parameter to say 'use emulation name as jack client name', to save typing the name twice?

    Anyway, it's not such a big deal: now I know what -audiodev does, I can make some aliases to start different emulators with appropriate names.

    Colin.

     
  • Nick Copeland

    Nick Copeland - 2010-04-27

    The suggestion of another flag is probably a good one, let it define using the emulator name for the device names. Or perhaps if you give it an optional value then that will be used.

    I agree that attempting the same name will not break the Jack connections - jack does assign an alternative now, but I don't like the idea of letting Jack name the client connection and bristol give the window a title. If they do not appear coherrent (because jack has given some other name due to a collision) then it gets to be very confusing which window relates to which client.

    I could do something like:

    -register [name]

    If you don't give the optional [name] then I will default it to the algorithm you have selected, then use the result for both Jack names and ALSA names?

    Kind regards, nick

     
  • Colin Fletcher

    Colin Fletcher - 2010-04-27

    I don't know for sure, but I imagine there must be a way to query jack for the client name it's actually assigned?

    Colin.

     
  • Nick Copeland

    Nick Copeland - 2010-04-27

    A client can request its name, that is not the issue: unfortunately only the engine is the client, the GUI is another process that might even be on another system, it knows nothing of Jack. I can add a -register option that will set the audio and midi device names togethern but I cannot let it 'default' to the name of the algorithm you want to emulate. When the engine starts it has to open its midi library to listen for GUI connections but at this point it does not know what to emulate - the GUI tells it what to initialise much later.

    The whole point is that the engine is a server waiting for the GUI to tell it what to do. Within the engine there are no 'named' algorithms, this was with an eye to eventually having the GUI be able to direct the engine to start some selection osc/filt/env configuration, direct it how to route the data and then run it.

    So -register <name> is possible, -register [name] isn't, ie, you always have to give the name.

    Maybe we can work it the other way around: there is a GUI option called '-emulate' which directs the GUI to use a selected algrithm AND to set some defaults for that algorithms. Perhaps I could make the GUI use that to title it's window and make the engine recoginse -emulate to configure it's device names, kind of as an alias for -audiodev and -mididev?

    At least that way, using startBristol on a single system, you only need to give the emulator name once.

    Regards, nick.

     
  • Colin Fletcher

    Colin Fletcher - 2010-04-28

    OK, I see why it's more complicated than I thought.

    Anyway, I think your idea of making startBristol set the port names when engine and GUI are running on the same system makes sense if you want to do it, but I'm quite content using -audiodev to set the port names myself, now that I know I can.

    Cheers,
    Colin.

     
  • Nick Copeland

    Nick Copeland - 2010-04-28
    • status: open --> pending
     
  • Nick Copeland

    Nick Copeland - 2010-04-28

    This is going to be put on pending. The option -emulate will set the algo, jack, alsa and window titlebar to the keyboard you are emulating. If you want two of the same then the -register <name> will allow the second one to have a unique name, again in the whole address space.

     
  • Nick Copeland

    Nick Copeland - 2010-04-30
    • status: pending --> closed
     
  • Nick Copeland

    Nick Copeland - 2010-04-30

    This should be in 0.60.2, closing.

     
  • Nick Copeland

    Nick Copeland - 2010-05-16

    This has actually been closed but the original argument is actually quite sensible. The default name for the registration should be the emulator name, if somebody wants to go further and use multiple versions of the same emulator then an override should be used in that case.

    The -emulate option does assign the synth name to jack and ALSA, I can generatlise that to always do it if the selected audio is jack and the selected MIDI is SEQ (ALSA RAW still uses a physical interface).

    Will review it for the next release.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks