Navigation Menu

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

Linux Installation with MIDI sound #1537

Open
cinephos opened this issue Feb 26, 2023 · 12 comments
Open

Linux Installation with MIDI sound #1537

cinephos opened this issue Feb 26, 2023 · 12 comments

Comments

@cinephos
Copy link

cinephos commented Feb 26, 2023

Here are instructions for a functioning installation of Frescobaldi with MIDI sound, tested on an Ubuntu 22.04LTS system.
Posted here in order to get the attention of the programmers, as well as the community, in an effort to improve this procedure.
No compilation of source files is necessary, hence easier for the user.

  1. Install Frescobaldi (current version 3.2) and Qsynth (current version 0.9.9) from Flatpak. In order to do that you need to install Flatpak beforehand.
  2. Install fluidsynth with terminal command sudo apt-get install fluidsynth. This step is necessary in order to store the necessary soundfonts in your system.
  3. Run Qsynth in order to customize it. Select Setup.
  • On MIDI tab select: MIDI Driver=alsa-seq, MIDI channels=16, MIDI Bank select mode=gm, MIDI CLient name ID=pid, then tick (select) Auto Connect MIDI Inputs.
  • On Audio tab select: Audio driver=Alsa, Sample Format=16bit, Sample rate=44100, Buffer size=512, Buffer count=2, Audio device=(leave this box empty), Audio Channels=2, Audio Groups=1, Polyphony=256
  • On Soundfonts tab, select Open and then browse directory /usr/share/sounds/sf2. FluidR3_GM.sf2 and TimGM6mb.sf2 soundfonts should work correctly. You may select either of them. I prefer the larger first one.
  1. Open Frescobaldi, go to Preferences/MIDI settings and select Player Output=Synth Input Port (2:0)

That's it! Now you can play the midi output of your Frescobaldi *.ly file.

Notes

  • Run Qsynth first, then Frescobaldi. Both programs must be running in order to hear the MIDI file.

  • Qsynth saves its setup upon exiting.

  • If you wish to investigate further Qsynth setup while playback, have in mind that you need to restart Qsynth. (There is a button for this.)

  • If you restart Qsynth, you also need to Refresh MIDI ports on Frescobaldi's Preferences/MIDI settings.

  • If your MIDI player is in the middle of the score, then you are going to hear the default instruments assigned to the channel(s). You need to return to the start of the midi file in order to hear the instruments defined in your *.ly file with commands like \set Staff.midiInstrument = "flute" or \set ChordNames.midiInstrument = "percussive organ" etc.

@fedelibre
Copy link
Member

The MIDI output page in the user manual is just a stub. It needs to be expanded.

There are also guides in the wiki:

@cinephos
Copy link
Author

More soundfonts can be found in fluidsynth's wiki page.

@reznaeous
Copy link

reznaeous commented Feb 26, 2023 via email

@cinephos
Copy link
Author

cinephos commented Feb 26, 2023

So, I suppose that flatpak is not necessary and Frescobaldi (downloaded from any repository) can work together with Qsynth (downloaded from any repository). The Qsynth settings and the soundfont are important. I tested a sounfont from fluidsynth's wiki (the one that reminds of some other software) and it works. It can be saved anywhere on your computer. As a result, installation of fluidsynth from terminal may also not be necessary.
Upon re-confirmation from the programmers that a functioning result can be reproduced again and again, I suggest that they provide this procedure (Qsynth settings, soundfont URL or FTP link, and Notes like the ones in my original post) on their project's Download page.

@papioara
Copy link
Contributor

First of all: Thank you for this great howto! I agree that flatpak is not necessary. On Linux Mint 21.1 Cinnamon the flatpak freezes right after launch and cannot be configured. I had to kill it and installed a slightly earlier version from the repos. I also installed jackd just in case, although I do not need it. There is an error about jackd right after startup, but when you ignore it and continue anyway, you can do your config as described. MIDI playback works great like this in Frescobaldi. I had Timidity before, but it always wanted a MIDI port refresh after every compilation. Now no longer necessary...

@fedelibre
Copy link
Member

fedelibre commented Feb 28, 2023

On Linux Mint 21.1 Cinnamon the flatpak freezes right after launch and cannot be configured.

Can you please open an issue here? Post the output of flatpak run org.frescobaldi.Frescobaldi. It's very likely a problem in your computer, but I'd like to check.

@papioara
Copy link
Contributor

It seems that I was not clear enough in my statement about the freezing flatpak. I did not mean the frescobaldi one, but the Qsynth flatpak.

On launching it, I get errors which all my installed flatpaks throw. But apart from that they all work great:

image

And so just ignore them. Qsynth throws this here:

image

The window is there, but the buttons do not react to clicks. It's just dead. I do not understand the second line in the error message. What network connection is this about? The Qsynth from the repos throws different errors (see my previous post), but it works after all.

@jrd10
Copy link

jrd10 commented Mar 1, 2024

Thanks for this information. With QSynth, the Frescobladi MIDI player works fine :).
On Ubuntu 22.04.4 + Dell G3 15

Is there a way/view to follow the notes you hear from the MIDI player?

Thank you for Frescobladi.

@papioara
Copy link
Contributor

papioara commented Mar 1, 2024

I do not think that this is possible in Frescobaldi itself. The only software I know for such a purpose is PianoBooster. It is available as an AppImage. Its limitation is, though, that its audience is piano players. As long as you have piano music on two staves, it works great. But if you have something with more staves, e.g. a string quartet score, you can only see and follow along the notes from two staves, while you hear all the parts/notes in the score. It is better than nothing, though, if you want something along these lines.

In Frescobaldi, the player can only show which beat in bar X you are on.

@papioara
Copy link
Contributor

papioara commented Mar 1, 2024

Edit: I have discovered another software which is also capable of displaying all parts of a score and following the notes along:
you can download it here: https://www.notation.com/Player.php. It's called Notation Player. Only downside: it is a Windows program, and you need to have Wine installed to be able to run it. It just did a test drive (Linux Mint 21.3 Cinnamon), and it works great on my machine - tested several scores with it. If you get it to run, this definitely is an option.

@ksnortum
Copy link
Contributor

ksnortum commented Mar 1, 2024 via email

@jrd10
Copy link

jrd10 commented Mar 2, 2024

Thank you @ksnortum @papioara
Yes I use Musescore too. From a .midi file :)

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

No branches or pull requests

6 participants