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

Fluidsynth not automatically recognized as a virtual midi port #115

Closed
pissalou opened this issue Aug 21, 2024 · 7 comments
Closed

Fluidsynth not automatically recognized as a virtual midi port #115

pissalou opened this issue Aug 21, 2024 · 7 comments

Comments

@pissalou
Copy link

I start fluidsynth as a server, aconnect commands shows the port is open. When listing the ports using observer.get_output_ports(), fluidsynth port is not listed unless the observer is configured with .track_any=true. I would expect it is not necessary to set .track_any=true in this case as alsa recognize fluidsynth as a virtual port.

Steps to reproduce on ubuntu 23.04:
$ sudo fluidsynth -a alsa -m alsa_seq -o audio.alsa.device=hw:1 -is
$ aconnect -lo
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 128: 'FLUID Synth (76540)' [type=user,pid=76540]
0 'Synth input port (76540:0)'
$ ./build/midiout

Would you like to open a virtual output port? [y/N] NN
No output ports available!

@pissalou
Copy link
Author

Additional info: ports are listed under PipeWire when running midiprobe.
$ ./midiprobe
Displaying ports for: ALSA (sequencer)
0 MIDI input sources:
0 MIDI output sinks:

Displaying ports for: ALSA (raw)
0 MIDI input sources:
0 MIDI output sinks:

Displaying ports for: JACK
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
0 MIDI input sources:
0 MIDI output sinks:

Displaying ports for: PipeWire
1 MIDI input sources:

  • [ client: 0, port: 49, device: Midi Through, portname: Midi Through:(capture_0) Midi Through Port-0, display: Midi Through Port-0]
    2 MIDI output sinks:
  • [ client: 0, port: 48, device: Midi Through, portname: Midi Through:(playback_0) Midi Through Port-0, display: Midi Through Port-0]
  • [ client: 0, port: 482, device: FLUID Synth (80888), portname: FLUID Synth (80888):(playback_0) Synth input port (80888:0), display: Synth input port (80888:0)]

Displaying ports for: Dummy
0 MIDI input sources:
0 MIDI output sinks:

@jcelerier
Copy link
Member

hm, ALSA exposes a SND_SEQ_PORT_TYPE_SOFTWARE property for virtual ports but fluidsynth does not seem to enable it. It enables "SYNTHESIZER" though, I added it to the requirements for being listed as a port. Fixed in 175c8aa and backported to 4.X

@jcelerier
Copy link
Member

Can you check if it works for you now ?

@pissalou
Copy link
Author

I pulled the latest 4.x and compiled the examples but it was the same behaviour as previously: fluidsynth port does not appear on the list unless I set .track_any=true in the observer. I will learn how to use the debugger in vscode and hopefully will be able to report more useful info.

@jcelerier
Copy link
Member

Is track_virtual enabled ? it's off by default: https://github.com/celtera/libremidi/blob/master/include/libremidi/observer_configuration.hpp#L73
It used to be on but people would complain about too many random ports showing up :')

@pissalou
Copy link
Author

Ok, my bad: I was not aware track_virtual was default false. With the parameter set to true, it is now listing fluidsynth as expected :-) Another good reason for setting configuration from the commandline instead of prompting when considering issue #114.

@jcelerier
Copy link
Member

👍 I'll close this one and add an issue to turn input as command-line arguments

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

2 participants