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

MuseScore not supporting JACK audio anymore (Linux) #16787

Open
lgmventura opened this issue Mar 13, 2023 · 14 comments · May be fixed by #19246
Open

MuseScore not supporting JACK audio anymore (Linux) #16787

lgmventura opened this issue Mar 13, 2023 · 14 comments · May be fixed by #19246
Labels
community Issues we would like the community to address P1 Priority: High playback General playback issue regression_ms3 Regression from MS3 (3.6.2)

Comments

@lgmventura
Copy link

Issue type

General playback bug

Bug description

MuseScore used to support the best audio engine out there, which is JACK Audio Connection Toolkit. On version 4.0.x it is not there anymore. It is highly necessary to route MuseScore audio or MIDI playback to other applications. In the case of MIDI, it can be also used to input MIDI in MuseScore.

Steps to reproduce

  1. Edit > preferences > I/O > JACK is not there anymore 😭
  2. Open any JACK patchbay, such as Catia or Claudia. MuseScore is not there 😭

Screenshots/Screen recordings

image

MuseScore Version

4.0.2

Regression

Yes, this used to work in Musescore 3.x and now is broken

Operating system

Ubuntu 22.04

Additional context

No response

@muse-bot muse-bot added playback General playback issue regression Regression on a prior release labels Mar 13, 2023
@lyrra
Copy link
Contributor

lyrra commented Mar 16, 2023

Jack can emulate an alsa sink, which enable a workaround, see: #13745

@majenkotech
Copy link

majenkotech commented Mar 20, 2023

Switching to PipeWire makes Jack obsolete. However there is no MIDI in MS4 on Linux yet AFAICT. (Also MIDI in general is only partially implemented so far anyway, even in Windows...)

@diedeno
Copy link

diedeno commented Apr 8, 2023

There is NO valid workaround for jack. I wish everybody stopped saying this.
Pipewire does not make Jack obsolete
It is because of comments like this that jack will never come back. Nobody can see the use of it.

@DmitryArefiev DmitryArefiev added the P1 Priority: High label Apr 10, 2023
@DmitryArefiev DmitryArefiev added this to To do in 4.x SHORTLIST via automation Apr 10, 2023
@DmitryArefiev DmitryArefiev changed the title MuseScore not supporting JACK audio anymore MuseScore not supporting JACK audio anymore (Linux) Apr 10, 2023
@dimaugh
Copy link

dimaugh commented Apr 12, 2023

This is really important for many of us, so we can output midi to our DAW directly. This was my main use of MuseScore.

@DmitryArefiev DmitryArefiev added regression_ms3 Regression from MS3 (3.6.2) and removed regression Regression on a prior release labels Apr 20, 2023
@cymno
Copy link

cymno commented May 10, 2023

It's important to me that I can select the MIDI input device.

Currently MU4 only shows the raw instrument from the USB-MIDI adapter as input device, but I need to filter the output to remove some faulty data sent by the keyboard.

Connecting the filtered MIDI signal to other apps (or to older Musescore) works fine, but MU4 doesn't show up in the patch bay. Also means I can't connect any virtual keyboards, or export Musescores MIDI output to other programs
Note: I'm mostly using ALSA MIDI on pipewire, patching the connections in QJackCtl, with JACK MIDI cross-compatibility. Either MIDI support would fix my issue.

@leleogere
Copy link

I want to connect MS to a virtual keyboard in order to get a different/better playback (possible with MS3), but MS4 doesn't show up in qjackctl UI.

@MarcSabatella
Copy link
Contributor

MarcSabatella commented Jul 28, 2023

Even with JACK, or with a physical MIDI keyboard, you will find MU4 not particularly well suited for live MIDI playback. Too much latency, too many limitations. Better to use a program specifically optimized for real-time performance.

That said, implementing JACK would still be useful for other reasons. But also, note this particular issue is about JACK audio. JACK MIDI is perhaps a separate question.

@rrohm
Copy link

rrohm commented Aug 4, 2023

I only can underline/emphasize the importance of JACK support. MuseScore IMHO is the best tool in its category in the Linux world, and also, support for Linux as a free and open source platform can and should not be underestimated - neither for education nor for production. In both areas a seamless, out-of-the-box JACK audio as well as JACK MIDI support is essential for a smooth adoption.
I am very glad to see this issue raised to P1 as a 4.x SHORTLIST item.
Thank you very much - and keep up the good work and Linux support!

@cbjeukendrup cbjeukendrup added the community Issues we would like the community to address label Aug 8, 2023
@cbjeukendrup
Copy link
Contributor

Adding the "Community" label. This does not mean that we are lazy and are not planning to fix it ourselves; this means that we invite the community to give this a try, if anyone gets the chance for that sooner than we do.

If anyone would like to work on this, please reach out to us to discuss the implementation.

@lyrra
Copy link
Contributor

lyrra commented Aug 12, 2023

Doing Jack, more or less gives portaudio for free. More design info on ASIO and Portaudio:
#15354

Trying to shoehorn in jack (it doesn't work for now): https://github.com/lyrra/MuseScore4/tree/jack

@musescore musescore deleted a comment from juancarlangas Aug 31, 2023
@lyrra
Copy link
Contributor

lyrra commented Sep 8, 2023

In progress, by PR #19246 (awaiting first round of review).

@cbjeukendrup cbjeukendrup moved this from To do to In progress in 4.x SHORTLIST Sep 8, 2023
@cbjeukendrup cbjeukendrup linked a pull request Sep 8, 2023 that will close this issue
11 tasks
@cfirwin3
Copy link

I created this video for a discussion on the .org forum. Here it is for the relevant discussion regarding Jack (AUDIO) development vs. Jack (MIDI/Transport). I recognize that these 2 elements are structurally related, but I wanted to point out that they really need NOT be treated as independent in development for M4. In general, Jack (AUDIO) is not necessary at this point for audio routing to Jack applications in Linux due to Pipewire emulation. It seems to me that any development on Jack in M4 should focus on MIDI/Transport which may include audio routing, but not as the focus of development (as it is already addressed in Linux via Pipewire).

Video:
https://youtu.be/3LpXu1-wvlA?si=-EyvbkEzGac1DrAl

In summary, one can already route M4 audio to any Jack application right now. M4 doesn't need Jack to do this. It seems to me that any discussion about Jack that doesn't include MIDI/Transport is a solution looking for a problem.

I also want to reiterate that Pipewire does not make Jack obsolete, as suggested in a comment earlier. Pipewire does the opposite... it makes Jack relevant and useful with non-jack audio packages. Programs (Ardour, Qtractor, Blender, and many more) are absolutely leaning in on Jack feature support because Pipewire makes it smooth and seamless. To say that Jack MIDI/Transport is not useful, dying, or a poor substitute for some other real option requires evidence to the claim.

@lyrra
Copy link
Contributor

lyrra commented Oct 25, 2023

... Here it is for the relevant discussion regarding Jack (AUDIO) development vs. Jack (MIDI/Transport). ... In general, Jack (AUDIO) is not necessary at this point for audio routing to Jack applications in Linux due to Pipewire emulation.

Agreed, alsa can also route audio from client to jack directly.
But emulating alsa does not enable multi-audio channels, which would require a direct connection between Mu4 and jack.

It seems to me that any development on Jack in M4 should focus on MIDI/Transport
In summary, one can already route M4 audio to any Jack application right now. M4 doesn't need Jack to do this. It seems to me that any discussion about Jack that doesn't include MIDI/Transport is a solution looking for a problem.

How useful would it be to use a2jmidid as a workaround for midi-connecting MuseScore to Jack?

@cfirwin3
Copy link

Agreed, alsa can also route audio from client to jack directly. But emulating alsa does not enable multi-audio channels, which would require a direct connection between Mu4 and jack.

It seems to me that this is resolved by M4 providing independent channel and bus outputs Alsa, Jack or otherwise. Pipewire could work with either, but I think this is an issue regarding what M4 provides with respect to channel sockets (unless there are some limitations to Alsa that would prevent this).

How useful would it be to use a2jmidid as a workaround for midi-connecting MuseScore to Jack?

I think that any solution that supplies live midi timecode from M4 should be workable for transport sync. I don't have experience with a2jmidid. What I know is that Pipewire is increasing in implementation without any serious challenge. So perhaps providing any type of MTC output (Jack or Alsa) would likely have a use... I think Xjadeo utilizes both.

I suspect that the bigger issues are with latency in the new play engine / Muse Sounds as it relates to real time external sync... but that's a guess.

Likewise, any sort of midi channel output socket (Alsa, Jack or raw) would probably find sufficient use in the world of Pipewire. I'm sure that I am ignorantly oversimplifying, but I think that folks just want access to data stream output sockets in whatever current forms that are there in M4, with respect to audio midi and midi time.

@jmickelin jmickelin linked a pull request Mar 13, 2024 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues we would like the community to address P1 Priority: High playback General playback issue regression_ms3 Regression from MS3 (3.6.2)
Projects
Status: In progress
Status: Already in progress
4.x SHORTLIST
  
In progress
Development

Successfully merging a pull request may close this issue.